mirror of
https://github.com/denoland/deno.git
synced 2024-11-16 16:53:20 -05:00
14 lines
254 B
TypeScript
14 lines
254 B
TypeScript
|
/* eslint-disable */
|
||
|
export interface D {
|
||
|
resolve: any;
|
||
|
reject: any;
|
||
|
}
|
||
|
|
||
|
export function d(): D {
|
||
|
let methods;
|
||
|
const promise = new Promise((resolve, reject) => {
|
||
|
methods = { resolve, reject };
|
||
|
});
|
||
|
return Object.assign(promise, methods);
|
||
|
}
|