nl_tokens: Gets the promised type of a promise .
pl_tokens: function getPromisedType ( promise ) { // //  { // promise //      then( // thenFunction //          onfulfilled: ( // onfulfilledParameterType //              value: T // valueParameterType //          ) => any //      ): any; //  } // if ( promise . flags & 1 /* Any */ ) { return undefined ; } if ( ( promise . flags & 4096 /* Reference */ ) && promise . <mask> === tryGetGlobalPromiseType ( ) ) { return promise . typeArguments [ 0 ] ; } var globalPromiseLikeType = getInstantiatedGlobalPromiseLikeType ( ) ; if ( globalPromiseLikeType === emptyObjectType || ! isTypeAssignableTo ( promise , globalPromiseLikeType ) ) { return undefined ; } var thenFunction = getTypeOfPropertyOfType ( promise , "then" ) ; if ( thenFunction && ( thenFunction . flags & 1 /* Any */ ) ) { return undefined ; } var thenSignatures = thenFunction ? getSignaturesOfType ( thenFunction , 0 /* Call */ ) : emptyArray ; if ( thenSignatures . length === 0 ) { return undefined ; } var onfulfilledParameterType = getUnionType ( ts . map ( thenSignatures , getTypeOfFirstParameterOfSignature ) ) ; if ( onfulfilledParameterType . flags & 1 /* Any */ ) { return undefined ; } var onfulfilledParameterSignatures = getSignaturesOfType ( onfulfilledParameterType , 0 /* Call */ ) ; if ( onfulfilledParameterSignatures . length === 0 ) { return undefined ; } var valueParameterType = getUnionType ( ts . map ( onfulfilledParameterSignatures , getTypeOfFirstParameterOfSignature ) ) ; return valueParameterType ; }