Reference missing with declare module
🔎 Search Terms
missing reference
🕗 Version & Regression Information
- Typescript 5.8.3 with VisualStudio Code 1.100.2
- Typescript 5.0.2 with MonacoEditor 0.39.0
⏯ Playground Link
No response
💻 Code
bugReportApi.d.ts
declare module '@bug/api/index' {
export * from "@bug/api/miscFunctions";
}
declare module '@bug/api/miscFunctions' {
export function myFunction(testParam: string): Promise<void>;
}
declare namespace bug.v0 {const api: typeof import('@bug/api/index')}
test.ts
bug.v0.api.myFunction('test')
🙁 Actual behavior
When I search for references to "myFunction", I only find the declaration in 'bugReportApi.d.ts', but not its usage in 'test.ts'. However, if I copy the contents of 'bugReportApi.d.ts' into a new file named 'bugReportApiC.d.ts' and search for references again, I find two declarations ('bugReportApi.d.ts' and 'bugReportApiC.d.ts') as well as the usage in 'test.ts'.
🙂 Expected behavior
The usage in 'test.ts' is found as reference.
Additional information about the issue
Maybe it's the same issue as https://github.com/microsoft/TypeScript/issues/61741
Hi is this is open ? i would like to work on this
Closing language service bugs related to the 6.0 implementation. For more information, see #62827