Closed
Description
TypeScript Version: 2.2.2
Code
function main( options: Options )
{
console.log( options );
}
interface Options
{
option: string;
}
export {
main as default,
Options,
};
{
"compilerOptions": {
"target": "es2015",
"declaration": true
},
"files": [
"index.ts"
]
}
Expected behavior:
It should compile without errors.
Actual behavior:
index.ts(1,25): error TS4078: Parameter 'options' of exported function has or is using private name 'Options'.
But all works with this change:
function main( options: Options )
{
console.log( options );
}
export interface Options
{
option: string;
}
export {
main as default,
};
It's the same code, but TypeScript can't recognise export of the interface in list. I want to see module interface in one place and I prefer to use list export.