mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
9bc074ed46
swc_ecma_utils: - Use `&mut` for inject_after_super. swc_ecma_transforms_typescript: - Merge `typescript_class_properties` into `strip`. Co-authored-by: 강동윤 <kdy1997.dev@gmail.com>
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();
|