import {expectType} from 'tsd'; import pDefer = require('.'); import {DeferredPromise} from '.'; expectType>(pDefer()); expectType>(pDefer()); pDefer().resolve(); pDefer().resolve('foo'); pDefer().reject(); pDefer().reject(new Error('foo')); expectType>(pDefer().promise);