🔎 Search Terms
@type {const}
const
definition types
🕗 Version & Regression Information
- This is a crash in all versions
⏯ Playground Link
https://www.typescriptlang.org/play?target=99&jsx=0&ts=5.3.2&filetype=ts#code/KYDwDg9gTgLgBAYwgOwM7wLYE8DCL1wC8cA9AFRlwACMWYwcA3kmjAL5xklMCwAUAEgAZhAgAuOAHIARgEMokgDT9hAV1UTGK4aIkz5klW35sA3PyA
💻 Code
// Typescript fileexportconstmyConst=/** @type {const} */{foo: 'bar',fuu: {foo: 'bar'}};// Javascript fileexportconstmyConst=/** @type {const} */{foo: 'bar',fuu: {foo: 'bar'}};🙁 Actual behavior
// .D.TS from Typescript fileexportdeclareconstmyConst: {foo: string;fuu: {foo: string;};};// .D.TS from Javascript fileexportnamespacemyConst{letfoo: string;namespacefuu{letfoo_1: string;export{foo_1asfoo};}}🙂 Expected behavior
Same output in both cases. Typescript file output is the correct one.
Additional information about the issue
No response
🔎 Search Terms
@type {const}const
definition types
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?target=99&jsx=0&ts=5.3.2&filetype=ts#code/KYDwDg9gTgLgBAYwgOwM7wLYE8DCL1wC8cA9AFRlwACMWYwcA3kmjAL5xklMCwAUAEgAZhAgAuOAHIARgEMokgDT9hAV1UTGK4aIkz5klW35sA3PyA
💻 Code
🙁 Actual behavior
🙂 Expected behavior
Same output in both cases. Typescript file output is the correct one.
Additional information about the issue
No response