Replies: 1 comment 1 reply
-
|
Can we convert TS on the fly and then cache it to indexedDB? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Are we interested in adding TypeScript support for component authoring? It is possible to transform TypeScript in the browser to JS in a way that is compatible with the VM via a config option to preserve JSX (see here)
Performance wasn't ideal in my POC, but that could likely be worked out.
Concerns:
We would probably need to save two sets of source to SocialDB: the TypeScript and the transpiled JS.
Storing both would about double the space required on-chain for a component.
Possible attack vector: Component author saves JS which does not match the TS, adding in malicious code. A user audits only the TS and believes the component to be safe
Beta Was this translation helpful? Give feedback.
All reactions