Limit JSDoc typedefs to file, opt-in to exporting them #43207
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Suggestion
π Search Terms
jsdoc typedef export
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Keep
@typedef
and@type
local to file (or scope?) unless exported (at top-level of file).π Motivating Example
I've come to find JSDoc + VS Code the best way to use TypeScript:
It's overall a pretty good alternative to TypeScript in small/medium projects.
But it has this one big caveat: All types/typedefs in any files are visible in all files.
Fixing this would make JSDoc an extremely useful way to use TypeScript with the "almost zero config" VS Code approach.
(There's also #42949 which is unrelated to this except that it's one small but fixable thing making JSDoc support not as useful as TypeScript syntax.)
π» Use Cases
^
The text was updated successfully, but these errors were encountered: