Closed
Description
Noticed via https://stackoverflow.com/q/52326378 .
TypeScript Version: master (e471856)
Search Terms: cannot compile modules outFile emitDeclarationOnly
Code
// tsconfig.json
{
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"outFile": "out.d.ts"
}
}
// a.ts
export default 42;
Expected behavior: Successful declaration file generation.
Actual behavior: a.ts:1:1 - error TS6131: Cannot compile modules using option 'outFile' unless the '--module' flag is 'amd' or 'system'.
Playground Link: N/A
Related Issues: None found