$ mkdir ts_sample
$ cd st_sample
$ git init
$ yarn init -y
$ touch .gitignore
$ yarn add -D typescript
$ touch tsconfig.json
$ yarn run build
$ node lib/index.js
Hello
https://www.typescriptlang.org/docs/handbook/advanced-types.html
https://www.typescriptlang.org/docs/handbook/advanced-types.html#index-types
https://www.typescriptlang.org/docs/handbook/advanced-types.html#mapped-types