Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 527 Bytes

README.md

File metadata and controls

28 lines (24 loc) · 527 Bytes

node-test-snippets

Minimal code snippets to test stuff

typescript examples

To launch ts code from command line, this seems to be the way:

node --experimental-specifier-resolution=node --loader ts-node/esm path/to/example/

or even

node --loader ts-node/esm path/to/example/

tsconfig.json need the module and target set to something recent.

{
  "compilerOptions": {
    "esModuleInterop": true,
    "module": "ESNext",
    "target": "ES2020"
  },
  "include": [
    "./**/*.ts"
  ]
}