mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
4294b5e7ba
swc_bundler: - Bundler rework. (denoland/deno#6802) - Reexports are not transitive. (denoland/deno#8246) - Dependencies of module with circular dependency. (denoland/deno#8302) - Order of injection between import vs export. (denoland/deno#8302) - `export *` in wrapped modules. (denoland/deno#8308, denoland/deno#8399) - `export { a as b }` in wrapped modules. - Fix denoland/deno#8314. - Fix denoland/deno#8325. - Fix denoland/deno#8344. - Make deno test verify exported names. - Handle `export * from './foo'`. swc_ecma_parser: - Don't panic on private name in interface (Closes #1211) swc_ecma_transforms: - dce: Prevent infinite loop - Faster constant propagation pass.
23 lines
355 B
TypeScript
23 lines
355 B
TypeScript
function d() {
|
|
let methods;
|
|
const promise = new Promise((resolve, reject)=>{
|
|
methods = {
|
|
resolve,
|
|
reject
|
|
};
|
|
});
|
|
return Object.assign(promise, methods);
|
|
}
|
|
const d1 = d;
|
|
const d2 = d1;
|
|
class A {
|
|
s = d2();
|
|
a() {
|
|
this.s.resolve();
|
|
}
|
|
b() {
|
|
this.s = d2();
|
|
}
|
|
}
|
|
new A();
|