CascadeStudio
CascadeStudio copied to clipboard
[FEAT] ImportLibrary() and Proper Typescript Support
This PR properly transpiles the editor code from typescript back to javascript, allowing for inline type specification and increased usability/robustness.
This PR also adds support for importing libraries from external URLs with IntelliSense, so users can use alternative "Standard Libraries" that meet their needs without having to fork the editor entirely.
Here is an example of a library being imported with IntelliSense.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/zalo/cascade-studio/6SMWdmNkaJTwSrqsWYEf86KaU2gZ
✅ Preview: https://cascade-studio-git-feat-typescript-zalo.vercel.app
Instead of ImportLibrary(['../Libraries/InvoluteGear.ts']); it would be way better IMO if we could use standard ES6 imports.
eg: import { foo, bar } from "../Libraries/InvoluteGear"
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
@Irev-Dev I'm primarily worried the Typescript PR just makes everything slower; the way I have it architected now has all of the library imports strung out as a series of dependent requests. To get it merged, I'll probably want to add some kind of prefetching, caching, and loading mechanism...
(Also some rough edges around clicking to the source in the intellisense documentation and caching preventing changes from propagating...)