cardinal
cardinal copied to clipboard
Support TypeScript and Flow
Highlighting TypeScript and Flow would be nice. Not sure how you can achieve both syntaxes.
I haven't used either TS or flow, but I agree it'd be nice. Are you interested in researching this a bit and submit a prototype PR just to get us started?
It's going to be challenging since type annotation is a syntax feature while highlighting is much more low-level.
Currently Cardinal already gracefully handles TS code quite well (since it operates at the token level), i.e. it doesn't stop working or bail out when encountering type annotations:
Any update here? I'd like to have the @types/cardinal
for ts user.