π Search Terms
import export class declarations
π Version & Regression Information
This changed in PR #55472, commit 5ce34ca, version 5.3.0-dev.20230829.
β― Playground Link
No response
π» Code
index.js:
import { Something } from './something';
export { Something } from './something';
export const something = new Something();
something.ts (or something.js):
export class Something {}
tsconfig.json:
{
"compilerOptions": {
"checkJs": true,
"declaration": true,
"outDir": "dist"
}
}
π Actual behavior
The import of Something is missing in the emitted declarations file index.d.ts:
export { Something } from "./something";
export const something: Something;
π Expected behavior
The import of Something should be included in the emitted declarations file index.d.ts:
export { Something } from "./something";
export const something: Something;
import { Something } from './something';
Additional information about the issue
The problem does not occur if
- the file name is
index.ts instead of index.js
export const something includes an explicit JSDoc type annotation (/** @type {Something} */)
π Search Terms
import export class declarations
π Version & Regression Information
This changed in PR #55472, commit 5ce34ca, version
5.3.0-dev.20230829.β― Playground Link
No response
π» Code
index.js:something.ts(orsomething.js):tsconfig.json:{ "compilerOptions": { "checkJs": true, "declaration": true, "outDir": "dist" } }π Actual behavior
The import of
Somethingis missing in the emitted declarations fileindex.d.ts:π Expected behavior
The import of
Somethingshould be included in the emitted declarations fileindex.d.ts:Additional information about the issue
The problem does not occur if
index.tsinstead ofindex.jsexport const somethingincludes an explicit JSDoc type annotation (/** @type {Something} */)