| ▲ | mirekrusin 20 hours ago | |
that's not "jsdoc is typescript" anymore because you're falling back to something else - type definition files where you do have access wider typescript functionality. also not a full solution - for .d.ts types to be available globally without explicit import the .d.ts file itself cannot use any imports/exports. this means you can't reuse types from other places to construct your types. you can workaround this by explicitly importing .d.ts in jsconfig/tsconfig but you're still left with other issues. those types do actually become globally visible everywhere polluting global namespace which is bad in itself there are no guarantees about them being in sync with actual code, which violates the whole point of using type safety. they don't solve cases where you need typescript inlined functionality locally in your code or to perform assertion with satisfies operator etc. | ||