Skip to content

Instantly share code, notes, and snippets.

@matey-jack
Last active October 27, 2019 12:23
Show Gist options
  • Save matey-jack/339fcd3994e67ffb7a79983bcd46b851 to your computer and use it in GitHub Desktop.
Save matey-jack/339fcd3994e67ffb7a79983bcd46b851 to your computer and use it in GitHub Desktop.
my skillset applied to Deno

TypeScript side of things:

  • none yet

Rust side:

  • Stringify for Log: denoland/deno#3165
  • CLI argument parsing: denoland/deno#3138 (after script name treat like after -- and always pass to script. then the assignment of args to deno/script will not depend on whether Deno knows the arg, but only on the position.) and denoland/deno#3011 (after -- not even script name should be fetched from args, Deno REPL instead entered)
  • using TypeScript language service in REPL: denoland/deno#3112

Docs and Website:

  • none yet
@matey-jack
Copy link
Author

Notes on current arg parsing:

  • there is no subcommand for the repl
  • 'run' subcommand exists, but is implicit when a script name is given
  • script name can't be distinguished from an argument to to script, so that means to enter the repl and pass arguments to the script (that one is about to type into the repl), one needs to use the '--' hack which is not even documented yet (but seems to work when passing script name on cli)

Since options come before the subcommand, there should be no other case, where -- is needed at all. Except, of course when running a script that starts with '-' although one could be explicitly saying "deno run -s.ts", for instance.

It only applies to this rare use-case, but is something to be wary of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment