mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
26944e159d
swc_ecma_transforms_base: - Reimplement `hygiene`.
25 lines
455 B
JavaScript
25 lines
455 B
JavaScript
// @Filename: use.js
|
|
import * as s from './mod';
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @Filename: mod.js
|
|
module.exports.n = {
|
|
};
|
|
module.exports.n.K = function C() {
|
|
this.x = 10;
|
|
};
|
|
module.exports.Classic = class _class {
|
|
constructor(){
|
|
this.p = 1;
|
|
}
|
|
};
|
|
var k = new s.n.K();
|
|
k.x;
|
|
var classic1 = new s.Classic();
|
|
/** @param {s.n.K} c
|
|
@param {s.Classic} classic */ function f(c, classic) {
|
|
c.x;
|
|
classic.p;
|
|
}
|