mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 14:16:12 +03:00
23 lines
358 B
TypeScript
23 lines
358 B
TypeScript
function d() {
|
|
let methods;
|
|
const promise = new Promise((resolve, reject)=>{
|
|
methods = {
|
|
resolve,
|
|
reject
|
|
};
|
|
});
|
|
return Object.assign(promise, methods);
|
|
}
|
|
class A {
|
|
a() {
|
|
this.s.resolve();
|
|
}
|
|
b() {
|
|
this.s = d();
|
|
}
|
|
constructor(){
|
|
this.s = d();
|
|
}
|
|
}
|
|
new A();
|