public:computer:typescript

This is an old revision of the document!


TypeScript

npm i -D typescript  // devDependency로 설치
npm i -g typescript  // global로 설치
npx tsc myFirstTypescript.ts  // devDependency로 설치 시
tsc myFirstTypescript.ts  // global 설치 시
tsc --init

  "outDir": "./dist",
  "rootDir": "./src",

npm i -g tslint  // tslint package module 설치
tslint --init

{
  ...
  "rules": {
    "semicolon": true
  },
  ...
}

  "editor.formatOnSave": false,
  "tslint.autoFixOnSave": true,

npm i tslint-config-prettier  // 패키지 설치 후 아래 진행

{
  ...
  "extends": ["tslint:recommended", "tslint-config-prettier"],
  ...
}

  editor.formatOnSave: true
  ...
  "prettier.tslintIntegration": true

  • public/computer/typescript.1639386480.txt.gz
  • Last modified: 2021/12/13 18:08
  • by alex