-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
tsconfig.json
{
"compilerOptions": {
"strict": true,
"noImplicitReturns": true,
"target": "es2015",
"module": "commonjs",
"outDir": "./build"
},
"include": ["./repro.ts"],
"exclude": ["./source/**/*"]
}
Working:
$ /Users/jason.kuhrt/projects/ssense/experiment/node_modules/.bin/tsc --project ./tsconfig.json --declaration --outDir build
✨ Done in 1.98s.
export interface Bar {
a: boolean
}
export interface Foo {
bar: Bar
}
const f = (x: any): Foo => {
return { bar: { a: false } }
}
export { f }Not working:
$ /Users/jason.kuhrt/projects/ssense/experiment/node_modules/.bin/tsc --project ./tsconfig.json --declaration --outDir build
repro.ts(9,7): error TS4025: Exported variable 'f' has or is using private name 'Foo'.
interface Bar {
a: boolean
}
interface Foo {
bar: Bar
}
const f = (x: any): Foo => {
return { bar: { a: false } }
}
export { f, Bar, Foo }I Don't see mention of support for export { A, B, C } style in https://www.typescriptlang.org/docs/handbook/modules.html but nor do I see it mentioning lack of support. So I assume there is support? Maybe I missed something.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesFixedA PR has been merged for this issueA PR has been merged for this issue