Closed
Description
TypeScript Version: 2.0.2
Code
sampleA.ts
{
// local types
type Data = string | boolean;
let obj: Data = true;
console.log(obj);
}
export { }
sampleB.ts
let v = "str" || true;
export { v }
tsconfig.json
{
"compilerOptions": {
"declaration": true,
"skipDefaultLibCheck": true
},
"include": [
"sample*.ts"
]
}
This is minimal settings.
When "declaration": true
and "skipDefaultLibCheck": true
, this issue is occured.
Expected behavior:
We can compile this code.
Actual behavior:
$ tsc -v
Version 2.0.2
$ tsc -p ./
sampleB.ts(1,5): error TS4023: Exported variable 'v' has or is using name 'Data' from external module "/private/tmp/hogehogehoge/sampleA" but cannot be named.