Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] ImportLibrary() and Proper Typescript Support #15

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

zalo
Copy link
Owner

@zalo zalo commented Sep 22, 2020

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.

Runs the Editor code through the typescript transpiler before execution.

This is in preparation for typescript library importation.

Soon you will be able to use whatever typescript syntax you like!  No longer will you be constrained by the tyrrany of the standard library!
@zalo zalo added the enhancement New feature or request label Sep 22, 2020
@vercel
Copy link

vercel bot commented Sep 22, 2020

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

@zalo zalo changed the title [FEAT] Proper Typescript Support [FEAT] ImportLibrary() and Proper Typescript Support Sep 22, 2020
@brad-jones
Copy link

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

@zalo
Copy link
Owner Author

zalo commented Jan 12, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants