cardinal icon indicating copy to clipboard operation
cardinal copied to clipboard

Support TypeScript and Flow

Open mohsen1 opened this issue 8 years ago • 3 comments

Highlighting TypeScript and Flow would be nice. Not sure how you can achieve both syntaxes.

mohsen1 avatar Jan 11 '17 00:01 mohsen1

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?

thlorenz avatar Jan 11 '17 13:01 thlorenz

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:

image

ariya avatar Jan 11 '17 15:01 ariya

Any update here? I'd like to have the @types/cardinal for ts user.

HairyRabbit avatar Jul 12 '19 09:07 HairyRabbit