๋ด๊ฐ ๋๋ง tslint -p .
w ์ผ์ธ /์ tsconfig.json
๊ฐ์๋ค "strict": true
,ํ์ง๋ง์ด ๋ฌด์์
๋๊น :
strict-type-predicates does not work without --strictNullChecks
#2786์์ ์ด๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค. ๋ด๊ฐ ๋ญ๊ฐ๋ฅผ ๋์น๊ณ ์์ต๋๊น?
์๋ฅผ ๋ค์ด https://github.com/cretz/awss/tree/05eb0c7adb22fb4feab92c1f190a752f8cfec921 , cd ๋ฅผ proj
๋ณต์ ํ๊ณ npm run lint
strict
์ compilerOption
์ด๋ฉฐ tsconfig.json์ ์ต์์ ์์ค์์ ์ฌ๋ฐ๋ฅด์ง ์์ต๋๋ค. ๋ค์๊ณผ ๊ฐ์ด ํ์๋์ด์ผ ํฉ๋๋ค.
{
"compilerOptions": {
"strict": true
}
}
๋ด ์ค์, ๊ฐ์ฌํฉ๋๋ค!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
strict
์compilerOption
์ด๋ฉฐ tsconfig.json์ ์ต์์ ์์ค์์ ์ฌ๋ฐ๋ฅด์ง ์์ต๋๋ค. ๋ค์๊ณผ ๊ฐ์ด ํ์๋์ด์ผ ํฉ๋๋ค.