CascadeStudio icon indicating copy to clipboard operation
CascadeStudio copied to clipboard

[FEAT] ImportLibrary() and Proper Typescript Support

Open zalo opened this issue 5 years ago • 3 comments

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.

zalo avatar Sep 22 '20 01:09 zalo

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

vercel[bot] avatar Sep 22 '20 01:09 vercel[bot]

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

brad-jones avatar Dec 10 '20 10:12 brad-jones

@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...)

zalo avatar Jan 12 '21 22:01 zalo