An open API service indexing awesome lists of open source software.

https://github.com/trasherdk/node-test-snippets

Minimal code snippets to test stuff
https://github.com/trasherdk/node-test-snippets

Last synced: about 1 year ago
JSON representation

Minimal code snippets to test stuff

Awesome Lists containing this project

README

          

# node-test-snippets
Minimal code snippets to test stuff

# typescript examples

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

```sh
node --experimental-specifier-resolution=node --loader ts-node/esm path/to/example/
```
or even
```sh
node --loader ts-node/esm path/to/example/
```

`tsconfig.json` need the `module` and `target` set to something recent.
```json
{
"compilerOptions": {
"esModuleInterop": true,
"module": "ESNext",
"target": "ES2020"
},
"include": [
"./**/*.ts"
]
}
```