mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 05:32:09 +03:00
17 lines
353 B
TypeScript
17 lines
353 B
TypeScript
|
// @filename: types.ts
|
||
|
declare module "*.foo" {
|
||
|
let everywhere: string;
|
||
|
}
|
||
|
|
||
|
|
||
|
// @filename: testA.ts
|
||
|
import { everywhere, onlyInA, alsoOnlyInA } from "a.foo";
|
||
|
declare module "a.foo" {
|
||
|
let onlyInA: number;
|
||
|
}
|
||
|
|
||
|
// @filename: testB.ts
|
||
|
import { everywhere, onlyInA, alsoOnlyInA } from "b.foo"; // Error
|
||
|
declare module "a.foo" {
|
||
|
let alsoOnlyInA: number;
|
||
|
}
|