mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
12 lines
248 B
TypeScript
12 lines
248 B
TypeScript
|
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);
|
||
|
}
|