static final JSType getTemplateTypeOfThenable ( JSTypeRegistry registry , JSType maybeThenable ) { return maybeThenable // Without ".restrictByNotNullOrUndefined" we'd get the unknown type for "?IThenable<null>" . restrictByNotNullOrUndefined ( ) . getInstantiatedTypeArgument ( registry . getNativeType ( JSTypeNative . I_THENABLE_TYPE ) ) ; }
If this object is known to be an IThenable returns the type it resolves to .