module.exports = { 'parser': '@typescript-eslint/parser', 'plugins': ['@typescript-eslint'], 'env': { 'commonjs': true, 'browser': true, 'es2021': true, 'node' : true }, 'extends': [ 'airbnb', 'airbnb/hooks', 'plugin:@typescript-eslint/recommended' ], 'parserOptions': { 'project': './tsconfig.json', 'ecmaFeatures': { 'jsx': true, }, 'ecmaVersion': 12, 'sourceType': 'module', }, 'rules': { 'inden..
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FqypNd%2FbtqP6nZo3uk%2FMsqTCMSK06nkrP1gR5hTA0%2Fimg.png)
Typescript ์ฐธ๊ณ : https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html (Typescript ๊ณต์ ์ฌ์ดํธ) ๋ฐฐ์ฐ๋ ์ด์ JS์์๋ Type์ด ๊ณ์ ์ฒดํฌ๋์ง ์๋๋ค. 1. ์ด๋ ์๋ฌต์ ํ๋ณํ, hoisting, ๋ณต์ก์ฑ ๋ฌธ์ ๋ฅผ ์ผ์ผํฌ ์ ์๋ค. ์ด๋ฌํ ์ฝ๋ ์์ ์์์น ๋ชปํ ๋ฒ๊ทธ๋ฅผ ์์ ๊ธฐ ์ํด typescript๋ฅผ ์ฃผ๋ก ์ฌ์ฉํ๋ค. hoisting : ๋์ด์ฌ๋ฆฐ๋ค๋ ๋ป. javascript์์ ์ ์ธ๋ฌธ์ ๋์ด์ฌ๋ ค ์ฝ๋์์ ์ฌ์ฉํ ๋ ์์์ ์๊ด์์ด ์ฌ์ฉ ๊ฐ๋ฅํ๋๋ก ํ๋ ๊ธฐ์ . typescript๋ ๋ณต์กํ ์์ธ์ฒ๋ฆฌ ์ฝ๋ ์์ด ์ด๋ฅผ ์ํํ๋ค. 2. ํ์ ์์๋ ์ถํ์ ๋ณธ์ธ์ด ์ง ์ฝ๋๋ฅผ ๋ณด์์ ๋ ํ์ ์ด ์ ์๋์ด ์์ง ์๋ค๋ฉด ํ๋..
TS2691: import .ts file ์ฐธ๊ณ : https://github.com/microsoft/TypeScript/issues/37582 https://github.com/microsoft/TypeScript/issues/27481 https://github.com/microsoft/TypeScript/issues/39965 ์ด ์ค๋ฅ๋ typescript ํ์ผ์ ์ฐพ์ ์ ์์ด์ ๋๋ ์ค๋ฅ์ด๋ค. import A from 'A.tsx'; ์์ ๊ฐ์ด ํ์ผ์ ๋ถ๋ฌ์ค๋ฉด, import ์ ์ ts / tsx ํ์ผ์ด js / jsx ๋ก ๋ณํ๋๊ธฐ ๋๋ฌธ์ ํด๋น ํ์ผ์ ์ฐพ์ ์ ์๋ค๋ ์๋ฌ๊ฐ ๋ฌ๋ค. ๋ฐ๋ผ์, ๋จ์ํ ํ์ฅ์๋ฅผ ๋ถ์ด์ง ์๊ณ import ํด์ค๋ ๊ฒ์ด ๊ฐ์ฅ ๊ฐ๋จํ ๋ฐฉ๋ฒ์ธ๋ฐ ๊ทธ๋ ๊ฒ ํ๋ฉด esl..
Comment