Steps to reproduce
Example code taken from CHANGES.md:
Practical example: simplematter
Behavior with typescript@6.0
Nested typedef names are supported and translate to a type-only namespace.
Behavior with tsgo
This is explicitly no longer supported.
I like type-only namespaces. I also like being able to use them in JSDoc. It appears to be a deliberate choice to no longer support that, so I wanted to provide some feedback that some people actually like this feature.
The proposed substitute is to translate it to a .d.ts file. This is not a substitute however.
- This means the types and implementation can no longer live in the same file.
- This conflicts with the use of
"rootDir" and "outDir", because declaration files are not compiled.
- This conflicts with
tsc --init, which now emits skipLibCheck: true by default. This means declaration files are not type checked.
So really, there’s no substitute for this syntax.
Steps to reproduce
Example code taken from CHANGES.md:
/** @typedef {1} NS.T */Practical example:
simplematterBehavior with
typescript@6.0Nested typedef names are supported and translate to a type-only namespace.
Behavior with
tsgoThis is explicitly no longer supported.
I like type-only namespaces. I also like being able to use them in JSDoc. It appears to be a deliberate choice to no longer support that, so I wanted to provide some feedback that some people actually like this feature.
The proposed substitute is to translate it to a
.d.tsfile. This is not a substitute however."rootDir"and"outDir", because declaration files are not compiled.tsc --init, which now emitsskipLibCheck: trueby default. This means declaration files are not type checked.So really, there’s no substitute for this syntax.