export declare function resolvedSyncPromise(): PromiseLike; export declare function resolvedSyncPromise(value: T | PromiseLike): PromiseLike; /** * Creates a rejected sync promise. * * @param value the value to reject the promise with * @returns the rejected sync promise */ export declare function rejectedSyncPromise(reason?: any): PromiseLike; type Executor = (resolve: (value?: T | PromiseLike | null) => void, reject: (reason?: any) => void) => void; /** * Thenable class that behaves like a Promise and follows it's interface * but is not async internally */ export declare class SyncPromise implements PromiseLike { private _state; private _handlers; private _value; constructor(executor: Executor); /** @inheritdoc */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): PromiseLike; /** @inheritdoc */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | null): PromiseLike; /** @inheritdoc */ finally(onfinally?: (() => void) | null): PromiseLike; /** Excute the resolve/reject handlers. */ private _executeHandlers; /** Run the executor for the SyncPromise. */ private _runExecutor; } export {}; //# sourceMappingURL=syncpromise.d.ts.map