Remix.run Logo
jitl 4 days ago

I used the older online notebooks for a bit and really loved the immediacy but I’m always hurting for TypeScript syntax support. The is this a thing w 2.0? Something I’ll need to add later with Vite and only available locally?

It was a bunmer to not be able to copy paste code from my projects into observable. With local notebooks I see more potential for homegrown workflow but for me the benefit was always the platform and how starting a new thing was as simple as going to a webpage and clicking plus.

Anyways excited to play with this once it ends up in the online editor

mbostock 4 days ago | parent [-]

We’re interested in adding a TypeScript cell mode, probably first with type stripping rather than validating types. I was hoping for a pure JavaScript implementation; maybe we’ll try https://github.com/bloomberg/ts-blank-space? I’ve also been looking at https://github.com/val-town/codemirror-ts for the editor, but it’s a lot of machinery.

jitl 3 days ago | parent | next [-]

I would only expect type stripping, although it seems you already have the TypeScript language server hanging out in the editor for completion and docs and such, it’s not much extra challenge to get the VFS hooked up enough to show red squiggles in CodeMirror. I built a CodeMirror + typescript for the React docs site and it’s definitely machinery but not too bad maybe 600-800 LoC (never got merged, sad)

4 days ago | parent | prev [-]
[deleted]