mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +03:00
21 lines
322 B
TypeScript
21 lines
322 B
TypeScript
// @module: commonjs
|
|
|
|
// @filename: a.ts
|
|
export var x = 1;
|
|
var y = 1;
|
|
export { y };
|
|
|
|
// @filename: b.ts
|
|
import { x, y } from "./a";
|
|
import * as a1 from "./a";
|
|
import a2 = require("./a");
|
|
const a3 = a1;
|
|
|
|
x = 1; // Error
|
|
y = 1; // Error
|
|
a1.x = 1; // Error
|
|
a1.y = 1; // Error
|
|
a2.x = 1;
|
|
a2.y = 1;
|
|
a3.x = 1;
|
|
a3.y = 1; |