swc/bundler/tests/fixture/issue-1156-2/input/q.ts

12 lines
248 B
TypeScript
Raw Normal View History

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);
}