internal hidden export class DeferredPromise < T > { /**
     * Internal promise to store the result of the deferred executor function.
     */ readonly promise : Promise < T > ; private resolveFunc ? : ( result : T ) => void ; private rejectFunc ? : ( reason ? : any ) => void ; param executor constructor ( private readonly executor ) { this . promise = new Promise < T > ( ( resolve , reject ) => { this . resolveFunc = resolve ; this . rejectFunc = reject ; } ) ; } /**
     * When `exec` is called the deferred executor function is executed.
     */ exec ( ) { this . executor ( ) . then ( result => this . resolveFunc ! ( result ) ) . catch ( error => this . rejectFunc ! ( error ) ) ; } }