TypeScript integration #237
Replies: 4 comments 19 replies
-
Hey @aboveyunhai, thanks for raising up this topic. Let me know if you have any examples, and then we can consider them into our roadmap |
Beta Was this translation helpful? Give feedback.
-
Here's a working in progress sandbox: |
Beta Was this translation helpful? Give feedback.
-
If anyone else stumbles on this thread, found another good read on monaco vs codemirror technical blog post |
Beta Was this translation helpful? Give feedback.
-
I wonder is autocomplete avaliable in sandpack?
I see it used codemirror internally, but I did not find any apis about this feature. It's one of most important feature when we are looking for this kind of editors.
Edit:
Under @danilowoz help, I was able to create a working Sandpack typescript in next.js
https://playground-ts.vercel.app/
Source Code: https://github.com/aboveyunhai/playground-ts
Something wrong with the initial render, but once you start to edit the code or change tab (trig render basically), ts-server will start to kick in.
There are some tiny optimization to avoid recreating ts-server for each instance.
You might also be aware of some ref errors inside the code.
Beta Was this translation helpful? Give feedback.
All reactions