79570278

Date: 2025-04-12 09:54:19
Score: 3
Natty:
Report link

unfortunately i cant comment since i dont have 50rep but there’s no special @ts-self-types. You just need to: Add // @ts-check to your .js files or define the types in a .d.ts next to the file and avoid @ts-check if only using declarations. As for a way to make JSDoc types work directly with deno doc / JSR, No, not currently. deno doc and JSR ignore JSDoc types. They only parse TypeScript declarations with what i am aware of.

Use .ts for new libraries if publishing on JSR. If you want .js compatibility, keep .js as the implementation and .d.ts for API or for better maintainability, consider generating .d.ts from .ts and bundling for JSR.

Reasons:
  • RegEx Blacklisted phrase (1): cant comment
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @ts-self-types
  • User mentioned (0): @ts-check
  • User mentioned (0): @ts-check
  • Low reputation (1):
Posted by: Frenk Side