3 ms·
Shame typescript doesn't support flow-like mode where types can sit in comments – making whole file valid js. Not everything can be expressed with jsdoc types.
by mirekrusin 5y ago
Shame typescript doesn't support flow-like mode where types can sit in comments – making whole file valid js. Not everything can be expressed with jsdoc types.
- machiaweliczny 5y agoYou still can have .d.ts file and refer to that in JSDOC
- mirekrusin 5y agoAnnotations on exported part only is not the whole picture of typescript.
- cprecioso 5y agoYou can have full TypeScript types in JSDoc-type comments: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html https://www.typescriptlang.org/docs/handbook/jsdoc-supported...
- mirekrusin 5y agoNot really, I want to inline /*: ... */ type annotations with terse ts code _and_ use /*:: ... */ to escape into normal typescript language where I can define arbitrary number of intermediate types and just use typescript as normal typescript, not some stripped down nonsense at limited positions.