-
Notifications
You must be signed in to change notification settings - Fork 4
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
What is the difference between this and using TypeScript? #3
Comments
A lightweight runtime is required but it is bundled as part of the TySON libraries, so that users of TySON don't need any external dependencies (no dependencies on Node or V8). I'll work on documenting the differences w/ full TypeScript, but at a high-level, TySON only supports ES5-ES6 features. As an example, async/await is not part of TySON. |
It'd also be nice to have a comparison with deno, as it share some similarities with tyson's. for example, deno runs scripts sandboxed by default, and require fine-grained permission control: ~/r/e/deno-security deno run --no-prompt io.ts 2023년 08월 11일 (금) 오후 05시 59분 50초
hello
error: Uncaught PermissionDenied: Requires read access to "io.ts", run again with the --allow-read flag
const text = await Deno.readTextFile('io.ts')
^
at Object.readTextFile (ext:deno_fs/30_fs.js:749:29)
at file:///home/scarf/repo/etc/deno-security/io.ts:2:25
! ~/r/e/deno-security deno run --no-prompt net.ts
error: Uncaught PermissionDenied: Requires net access to "www.example.com", run again with the --allow-net flag
await fetch("https://www.example.com")
^
at opFetch (ext:deno_fetch/26_fetch.js:73:14)
at mainFetch (ext:deno_fetch/26_fetch.js:182:59)
at ext:deno_fetch/26_fetch.js:461:9
at new Promise (<anonymous>)
at fetch (ext:deno_fetch/26_fetch.js:424:18)
at file:///home/scarf/repo/etc/deno-security/net.ts:1:7
! ~/r/e/deno-security deno run --no-prompt run.ts
error: Uncaught PermissionDenied: Requires run access to "deno", run again with the --allow-run flag
await new Deno.Command("deno", { args: ["--version"] }).output()
^
at spawnChildInner (ext:runtime/40_process.js:162:17)
at spawn (ext:runtime/40_process.js:348:10)
at Command.output (ext:runtime/40_process.js:421:12)
at file:///home/scarf/repo/etc/deno-security/run.ts:1:57 tho deno is quite heavy (109MiB as of in |
Yeah, I can write up a comparison with
|
I don't really understand which TypeScript features are not supported. Since functions and string interpolation are included, how is this different from TypeScript itself? Maybe it would be helpful to specify what is not included in TSON.
In other words, is a JS runtime needed to parse TSON?
The text was updated successfully, but these errors were encountered: