mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
25 lines
548 B
TypeScript
25 lines
548 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @declaration: true
|
|
// @emitDeclarationOnly: true
|
|
|
|
// @Filename: vue.js
|
|
export class Vue {}
|
|
export const config = { x: 0 };
|
|
|
|
// @Filename: test.js
|
|
import { Vue, config } from "./vue";
|
|
|
|
// Expando declarations aren't allowed on aliases.
|
|
Vue.config = {};
|
|
new Vue();
|
|
|
|
// This is not an expando declaration; it's just a plain property assignment.
|
|
config.x = 1;
|
|
|
|
// This is not an expando declaration; it works because non-strict JS allows
|
|
// loosey goosey assignment on objects.
|
|
config.y = {};
|
|
config.x;
|
|
config.y;
|