4 ms·
Types as comments is what jsdoc supports. Flow is compiled like typescript. tsc does also support jsdoc though, so technically I think tsc is closer to support
by pcthrowaway 2y ago
Types as comments is what jsdoc supports. Flow is compiled like typescript.
tsc does also support jsdoc though, so technically I think tsc is closer to supporting types as comments, though it's possible Flow has this also.
- spankalee 2y agoTypes _in_ comments is different from types _as_ comments. "Types as comments" refers to how type expressions are parsed.
- pcthrowaway 2y agojsdoc is a format for supplying types (and annotations) as comments as well. I think I get the distinction you're trying to make, but I don't think the nuance there is significant enough to merit differentiating the two.
- dgellow 2y agohttps://flow.org/en/docs/types/comments/ https://flow.org/en/docs/types/comments/
- pcthrowaway 2y agoThanks, I've never used flow and didn't know this. I've only seen it used in the non-comment form.