-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 3.6.0-dev.20190730 (and 3.5.1)
Search Terms: missing declaration module outdir
Code
tsconfig.json:
{
"compilerOptions": {
"outDir": "../out",
"declaration": true
}
}main.ts:
import * as SomeDeclarationModule from "./SomeDeclarationModule";
export function fun() : typeof SomeDeclarationModule {
return { someDeclarationModuleExport: "hi" }
}SomeDeclarationModule.d.ts
export const someDeclarationModuleExport: string;Expected behavior:
SomeDeclarationModule.d.ts gets copied into the "outdir".
Actual behavior:
No SomeDeclarationModule.d.ts => an invalid main.d.ts because the module is missing.
The generated main.d.ts:
import * as SomeDeclarationModule from "./SomeDeclarationModule"; // <- !!! missing !!!
export declare function fun(): typeof SomeDeclarationModule;Playground Link: Sry no repro in playground, but here: typescript-missing-declaration-module-issue.zip (run npx tsc -p src).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug