http://json.schemastore.org/tsconfig
//base.json
{
"complierOptions" : {
"strict" : true
}
}
//tsconfig.json
{
"extends" : "./base.json"
...
}
//test.ts
const a : number = undefined //extends 주석처리시
const a : number = undefined //오류 발생
//어떤 설정으로 컴파일 할 것인가
complileOptions
{
"conmplieOnSave" : "true"
}
//어떤 파일을 컴파일 할 것인가
file / include / exclude
files
include
*
같은걸 사용하면, .ts / .tsx/ .d.ts 만 include(allowJS) exclude
compileOption : typeRoots / types
"typeRoots": {
"description": "Specify multiple folders that act like `./node_modules/@types`.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"markdownDescription": "Specify multiple folders that act like `./node_modules/@types`.\n\nSee more:
https://www.typescriptlang.org/tsconfig#typeRoots"
},
"types": {
"description": "Specify type package names to be included without being referenced in a source
file.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
},
"markdownDescription": "Specify type package names to be included without being referenced in a
source file.\n\nSee more: https://www.typescriptlang.org/tsconfig#types"
},
...,
}
@types
TypeScript 2.0 부터 사용 가능해진 내장 type definition 시스템
아무 설정을 하지 않을 경우