Skip to content
푸땡로그
Go back

TypeScript 6.0 업그레이드: 깨지는 설정과 고치는 방법, 7.0에서 달라지는 점

TypeScript 6.0은 5.9와 7.0 사이를 잇는 마지막 JavaScript 기반 릴리스입니다. 정식판 6.0.2는 2026년 3월 23일에 나왔고, 6.0의 최신 버전은 4월 16일에 나온 6.0.3입니다. 7.0은 Go로 다시 만든 네이티브 컴파일러입니다. 6.0은 7.0과 동작을 맞추려고 오래된 옵션과 문법을 deprecated로 지정했습니다.

그래서 5.9에서 문제없이 통과하던 프로젝트도 6.0에서는 tsconfig.json 오류로 멈출 수 있습니다. 이 글은 이미 TypeScript를 쓰는 프론트엔드·Node.js 프로젝트를 6.0으로 올리는 개발자를 대상으로 합니다. deprecated 옵션은 대체 설정으로 바꾸고, 바뀐 기본값은 types·rootDir·strict를 tsconfig에 적어 맞춥니다. ignoreDeprecations: "6.0"은 7.0으로 넘어가기 전까지만 쓰는 유예 설정입니다.

기준: 2026년 10월 24일 · TypeScript 6.0.3(6.0 최신 안정판), 7.0.2(npm latest). 근거는 TypeScript 6.0 발표 ↗와 TypeScript 7.0 발표 ↗입니다.


6.0은 typescript@6으로 설치합니다

지금 npm install -D typescript를 실행하면 7.0.2가 설치됩니다. npm의 latest 태그가 7.0을 가리키기 때문입니다. 6.0으로 올리려면 메이저 버전을 지정합니다.

Bash
npm install -D typescript@6
npx tsc -v
Text
Version 6.0.3

package.json에는 "typescript": "^6.0.3"이 기록됩니다. 6.0.2로 고정해 두었다면 6.0.3으로 올립니다. 6.0.3은 클래스 속성 초기값의 타입 추론 회귀를 고쳤습니다(PR #63310 ↗). 아래 코드는 5.9와 6.0.3에서 통과하고, 6.0 RC와 6.0.2에서는 오류가 납니다.

TypeScript
type AB = "A" | "B";
const DEFAULT: AB = "A";

export class C {
  D = DEFAULT;

  flip() {
    this.D = "B";
  }
}
Text
src/index.ts(8,5): error TS2322: Type '"B"' is not assignable to type '"A"'.

6.0 RC와 6.0.2는 속성 D의 타입을 AB가 아니라 "A"로 좁혔습니다. 모듈 최상위에서 좁혀진 DEFAULT의 타입이 클래스 속성 추론으로 새어 들어간 회귀입니다.

7.0이 나왔어도 6.0에 머물러야 하는 프로젝트가 있습니다. 7.0은 아직 프로그래밍 API를 제공하지 않습니다. 그래서 Vue, MDX, Astro, Svelte처럼 TypeScript를 언어 서버 플러그인으로 끼워 쓰는 프로젝트는 당분간 6.0을 계속 써야 합니다(7.0 발표 ↗).


업그레이드 직후 오류를 한 번에 봅니다

6.0으로 올린 뒤 타입 검사부터 실행합니다. deprecated 옵션 오류는 tsconfig.json의 줄·열 위치와 함께 한꺼번에 나옵니다. 아래 설정은 설명용으로 만든 예제입니다. 5.9에서는 오류 없이 통과하고, 6.0에서 deprecated 된 옵션 다섯 개가 들어 있습니다.

tsconfig.json

JSON
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    },
    "esModuleInterop": false,
    "downlevelIteration": true,
    "outDir": "dist"
  },
  "include": ["src"]
}
Bash
npx tsc --noEmit
Text
tsconfig.json(3,15): error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
tsconfig.json(5,25): error TS5107: Option 'moduleResolution=node10' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.
tsconfig.json(6,5): error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.
tsconfig.json(10,24): error TS5107: Option 'esModuleInterop=false' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
tsconfig.json(11,5): error TS5101: Option 'downlevelIteration' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.

오류 코드는 두 가지입니다. TS5101은 옵션 자체가 deprecated라는 뜻이고, TS5107은 옵션의 특정 값이 deprecated라는 뜻입니다. "moduleResolution": "node"가 메시지에 node10으로 찍히는 이유는 node가 node10의 별칭이기 때문입니다. 종료 코드가 2이므로 CI도 여기서 실패합니다. 메시지의 aka.ms/ts6은 TypeScript 저장소의 6.0 Migration Guide 이슈 ↗로 연결됩니다.

--noEmit만으로는 잡히지 않는 오류도 있습니다. rootDir 기본값 변경으로 생기는 TS5011은 파일을 출력할 때만 나옵니다. 타입 검사가 통과하면 실제 빌드 명령도 한 번 실행합니다.


deprecated 옵션별로 바꿀 설정

아래 설정은 6.0에서 오류가 나고, 7.0에서는 제거됩니다. 대체 설정은 6.0 발표의 Breaking Changes and Deprecations ↗ 절을 따릅니다.

6.0에서 오류가 나는 설정오류바꿀 설정
target: "es5"TS5107es2015 이상. ES5 출력이 필요하면 외부 컴파일러로 후처리
downlevelIteration(true·false 모두)TS5101삭제. ES5 출력에만 쓰이던 옵션
moduleResolution: "node"·"node10"TS5107Node.js에서 바로 실행하면 nodenext, 번들러·Bun을 쓰면 bundler
moduleResolution: "classic"TS5107bundler 또는 nodenext
module: "amd"·"umd"·"system"·"none"TS5107esnext나 preserve로 바꾸고 번들러 사용
outFileTS5101번들러로 파일 합치기
baseUrlTS5101삭제하고 paths 값마다 ./src/ 같은 접두사 추가
esModuleInterop: false, allowSyntheticDefaultImports: falseTS5107삭제. 6.0은 두 옵션을 항상 켭니다
alwaysStrict: falseTS5107삭제. 모든 코드를 strict mode로 해석합니다

6.0 발표는 outFile과 moduleResolution: "classic"이 “removed”됐다고 적었습니다. 6.0.3에서는 둘 다 다른 항목처럼 ignoreDeprecations로 끌 수 있는 deprecated 오류입니다. 모듈 파일을 outFile 하나로 합치려면 module이 amd나 system이어야 하는데(TS6082), 두 값도 deprecated입니다.

alwaysStrict: false를 지우면 strict mode 예약어를 변수 이름으로 쓴 코드가 TS1212 오류를 냅니다. private, static, public, await 같은 이름을 바꿉니다.

옵션이 아닌 코드 문법과 명령에서 나는 오류도 있습니다.

6.0에서 오류가 나는 코드·명령오류바꿀 코드·명령
import data from "./data.json" assert { type: "json" }TS2880assert를 with로
import("./data.json", { assert: { type: "json" } })TS2880{ with: { type: "json" } }
module Foo { } 형태의 namespace 선언TS1540namespace Foo { }
/// <reference no-default-lib="true"/>오류 없이 무시noLib 또는 libReplacement
tsconfig.json이 있는 폴더에서 tsc foo.tsTS5112tsc -p . 또는 tsc --ignoreConfig foo.ts

예제 설정을 고친 결과

앞의 설정은 아래처럼 바꿉니다.

tsconfig.json

JSON
{
  "compilerOptions": {
    "target": "es2015",
    "module": "commonjs",
    "moduleResolution": "bundler",
    "paths": {
      "@/*": ["./src/*"]
    },
    "rootDir": "./src",
    "outDir": "dist"
  },
  "include": ["src"]
}

이 설정은 6.0.3과 7.0.2에서 오류 없이 빌드되고, dist/index.js와 dist/utils/sum.js를 만듭니다. 6.0 발표는 commonjs와 bundler 조합을 node10에서 옮겨 가기 쉬운 경로로 소개합니다(근거 ↗). 장기적으로는 번들러로 묶는 웹 앱이면 module: "preserve"와 bundler로, Node.js 앱이면 module: "nodenext"로 옮깁니다.

baseUrl과 rootDir은 ts5to6로 고칠 수 있습니다

ts5to6 ↗는 6.0 발표가 소개한 실험적 마이그레이션 도구입니다. baseUrl 삭제와 rootDir 지정 두 가지만 처리합니다. references와 extends로 연결된 설정 파일도 따라가 고칩니다.

Bash
npx @andrewbranch/ts5to6 --fixBaseUrl .
npx @andrewbranch/ts5to6 --fixRootDir .

앞의 예제 설정에 두 명령을 실행하면 tsconfig가 다음처럼 바뀝니다.

diff
     "moduleResolution": "node",
-    "baseUrl": ".",
     "paths": {
-      "@/*": ["src/*"]
+      "@/*": ["./src/*"]
     },
     "esModuleInterop": false,
     "downlevelIteration": true,
-    "outDir": "dist"
+    "outDir": "dist",
+    "rootDir": "./src"

target, moduleResolution, esModuleInterop, downlevelIteration 오류는 그대로 남습니다. 나머지는 표를 보고 직접 바꿉니다.

esModuleInterop: false를 지우면 namespace import를 default import로 바꿉니다

5.9에서 esModuleInterop을 끈 채 CommonJS 패키지를 namespace import로 불러 호출했다면 6.0에서 오류가 납니다. 아래는 express 4와 @types/express 4를 쓰는 예입니다.

TypeScript
import * as express from "express";

const app = express();
app.listen(3000);
Text
src/index.ts(3,13): error TS2349: This expression is not callable.
  Type 'typeof e' has no call signatures.

esModuleInterop이 켜지면 namespace import는 호출할 수 없는 객체가 됩니다. default import로 바꿉니다.

TypeScript
import express from "express";

import assertion은 with로 바꿉니다

아래 예제는 module: "esnext", moduleResolution: "bundler", resolveJsonModule: true 설정을 기준으로 합니다.

TypeScript
import data from "./data.json" assert { type: "json" };
Text
src/index.ts(1,32): error TS2880: Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'.

정적 import와 동적 import() 모두 with로 바꿉니다.

TypeScript
import data from "./data.json" with { type: "json" };
const lazy = import("./data.json", { with: { type: "json" } });

with를 쓰려면 module이 esnext, node18, node20, nodenext, preserve 중 하나여야 합니다. 6.0 발표는 module 기본값이 esnext라고 적었지만, 6.0.3은 기본 target(es2025)에서 es2022를 계산합니다(이슈 #63330 ↗). module을 비워 두면 with에서 TS2823 오류가 나므로 값을 적습니다.

namespace는 module 대신 namespace 키워드로 씁니다

TypeScript
module Foo {
  export const bar = 10;
}
Text
src/index.ts(1,8): error TS1540: A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.

module을 namespace로 바꿉니다. declare module "some-module" { }처럼 문자열 이름을 쓰는 선언은 그대로 둡니다. 이 오류는 ignoreDeprecations로 끌 수 없습니다.

파일을 지정하는 tsc 명령은 -p나 --ignoreConfig로 바꿉니다

Bash
npx tsc src/foo.ts
Text
error TS5112: tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.

5.9까지는 이 명령이 tsconfig.json을 조용히 무시했습니다. tsconfig 설정을 적용하려면 tsc -p .를 씁니다. 기본값으로 그 파일만 검사하려면 tsc --ignoreConfig src/foo.ts를 씁니다. --ignoreConfig는 6.0에서 생긴 옵션이라 5.9는 TS5023(Unknown compiler option)으로 거부합니다. package.json scripts, Git 훅, 에디터 작업 설정에서 tsc <파일> 형태를 찾아 바꿉니다.


기본값이 바뀌어 나는 오류

tsconfig에 값을 적지 않았던 옵션은 6.0의 새 기본값을 따릅니다. 아래 표의 마지막 열을 tsconfig에 적으면 이전과 같은 동작을 얻습니다.

옵션6.0 기본값나타나는 증상되돌리는 설정
types[]process, describe 같은 전역 이름을 못 찾음(TS2591)"types": ["node"]처럼 패키지 나열
rootDirtsconfig가 있는 폴더출력이 dist/src/로 한 단계 깊어지고 TS5011"rootDir": "./src"
stricttrue암시적 any(TS7006) 같은 엄격 검사 오류"strict": false
noUncheckedSideEffectImportstrueimport "./styles.css"에서 TS2882선언 파일 추가 또는 false
targetes2025출력 JavaScript 문법이 최신 표준으로 바뀜이전 값 명시(es2015 이상)
moduletarget에서 계산(현재 es2022)import attributes(with)에서 TS2823esnext·nodenext·preserve 명시
libReplacementfalse@typescript/lib-* 대체 패키지를 찾지 않음"libReplacement": true

types: 쓰는 전역 타입 패키지를 직접 적습니다

5.9는 node_modules/@types의 패키지를 모두 전역으로 불러왔습니다. 6.0은 @types/node가 설치돼 있어도 types에 적지 않으면 불러오지 않습니다.

TypeScript
export const cwd = process.cwd();
Text
src/index.ts(1,20): error TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.

메시지대로 types에 패키지 이름을 적습니다. Jest처럼 전역 함수를 만드는 테스트 도구도 같이 적습니다.

tsconfig.json

JSON
{
  "compilerOptions": {
    "types": ["node", "jest"]
  }
}

import로 불러오는 패키지는 types에 없어도 그대로 해석됩니다. "types": ["*"]는 5.9처럼 @types 전체를 불러옵니다. 하지만 5.9는 이 값을 이해하지 못해 TS2688(Cannot find type definition file for ’*’) 오류를 냅니다. 5.9와 6.0이 섞인 모노레포에서는 패키지 이름을 직접 나열합니다. 6.0 발표에 따르면 types를 정한 프로젝트 상당수가 빌드 시간을 20~50% 줄였습니다.

rootDir: 출력 폴더 구조를 지키려면 ./src를 적습니다

5.9는 입력 파일들의 공통 폴더를 rootDir로 추론했습니다. 6.0은 tsconfig가 있는 폴더를 rootDir로 씁니다. 아래 설정을 npx tsc로 빌드하면 오류와 함께 dist/src/index.js가 생깁니다.

tsconfig.json

JSON
{
  "compilerOptions": {
    "outDir": "dist"
  },
  "include": ["src"]
}
Text
tsconfig.json(3,5): error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
  Visit https://aka.ms/ts6 for migration information.

"rootDir": "./src"를 적으면 출력이 dist/index.js로 돌아옵니다. 이 오류는 --noEmit에서는 나오지 않고, ignoreDeprecations로도 꺼지지 않습니다.

noUncheckedSideEffectImports: CSS import에 선언을 줍니다

번들러 프로젝트에서 CSS를 부수 효과 import로 불러오면 6.0은 이를 해석할 수 없는 모듈로 봅니다.

TypeScript
import "./styles.css";
Text
src/index.ts(1,8): error TS2882: Cannot find module or type declarations for side-effect import of './styles.css'.

선언 파일에 와일드카드 모듈 선언을 두면 오류가 사라집니다. 이 선언은 존재하지 않는 경로의 오타도 통과시킨다는 점을 알고 씁니다.

src/global.d.ts

TypeScript
declare module "*.css";

ignoreDeprecations: "6.0"이 끄는 것과 끄지 못하는 것

ignoreDeprecations: "6.0"은 6.0에서 deprecated 된 옵션을 5.9처럼 계속 동작하게 하고 그 오류를 끕니다. 앞의 예제 설정에 이 한 줄을 넣으면 npx tsc --noEmit이 오류 없이 끝납니다.

tsconfig.json

JSON
{
  "compilerOptions": {
    "ignoreDeprecations": "6.0"
  }
}

이 설정이 끄는 오류는 TS5101·TS5107(deprecated 옵션)과 TS2880(import assertion)입니다. 아래 오류는 그대로 남습니다.

ignoreDeprecations에 넣는 값은 "6.0"입니다. 6.0에 "7.0"을 넣으면 TS5103(Invalid value for ‘—ignoreDeprecations’) 오류가 납니다. 5.9에 "6.0"을 넣어도 같은 TS5103 오류가 납니다. 여러 패키지가 공유하는 기본 tsconfig에는 모든 패키지를 6.0으로 올린 뒤에 넣습니다.

7.0에서는 아무 효과가 없습니다

7.0.2는 ignoreDeprecations: "6.0"을 오류 없이 받아들이지만 deprecated 옵션을 되살리지 않습니다. 앞의 예제 설정을 7.0.2로 검사하면 이 설정이 있든 없든 같은 오류가 나옵니다.

Text
tsconfig.json(3,15): error TS5108: Option 'target=ES5' has been removed. Please remove it from your configuration.
tsconfig.json(5,25): error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration.
tsconfig.json(6,5): error TS5102: Option 'baseUrl' has been removed. Please remove it from your configuration.
  Use '"paths": {"*": ["./*"]}' instead.
tsconfig.json(8,15): error TS5090: Non-relative paths are not allowed. Did you forget a leading './'?
tsconfig.json(10,24): error TS5108: Option 'esModuleInterop=false' has been removed. Please remove it from your configuration.
tsconfig.json(11,5): error TS5102: Option 'downlevelIteration' has been removed. Please remove it from your configuration.

메시지가 “is deprecated”에서 “has been removed”로 바뀌고, 오류 코드도 TS5102·TS5108로 바뀝니다. module: "none"처럼 값 자체가 사라진 경우에는 허용 값 목록을 보여 주는 TS6046 오류가 납니다. baseUrl이 사라지면 paths의 src/* 같은 상대 표기도 TS5090 오류가 됩니다.

7.0의 baseUrl 메시지는 "paths": {"*": ["./*"]}를 제안합니다. 이 매핑은 baseUrl을 모듈 탐색 루트로 쓰던 동작을 그대로 옮깁니다. paths의 접두사로만 baseUrl을 쓰던 프로젝트는 baseUrl을 지우고 paths 값에 ./를 붙입니다. 6.0 발표도 대부분의 프로젝트에 이 방법을 권합니다.

7.0 발표는 전환 기준도 하나 제시합니다(근거 ↗). stableTypeOrdering을 켜고 ignoreDeprecations 없이 6.0에서 통과하는 코드는 7.0에서도 같은 결과를 냅니다. 다만 JSDoc으로 타입을 붙인 JavaScript 파일 검사와 template literal 타입 추론은 7.0에서 일부 달라집니다(CHANGES.md ↗).


RC와 정식판 사이에 바뀐 점

RC 발표를 보고 설정을 바꿨다면 아래 차이를 확인합니다. 날짜는 공식 발표와 npm 배포일 기준입니다.

버전날짜바뀐 점
6.0 Beta2026-02-11deprecated 목록과 기본값 변경을 처음 공개
6.0.1-rc2026-03-06generic 호출 안 함수 표현식 검사 조정(#63163 ↗), import()의 assert도 deprecated(#63172 ↗), DOM·Temporal 타입 갱신
6.0.2(정식판)2026-03-23컴파일러 API 수정 1건(#63239 ↗). 발표문의 #/ 지원 범위와 예제 수정
6.0.32026-04-16클래스 속성 추론 회귀 수정(#63310 ↗), 자동 타입 설치(ATA)의 패키지 이름 검사 강화(#63368 ↗)

RC의 generic 호출 조정은 generic 호출 안의 함수 표현식 검사를 7.0과 맞춥니다. JSX 안의 generic 호출에서 기존 코드의 오류를 더 많이 잡고, 일부 호출에는 타입 인수를 직접 적어야 할 수 있습니다. RC에서 정식판 6.0.2까지 바뀐 컴파일러 코드는 #63239 한 건입니다. 프로그램을 재사용할 때 API 함수 isSourceFileDefaultLibrary가 틀린 값을 돌려주던 문제를 고쳤습니다.

RC 발표문의 #/ 절에는 틀린 내용이 두 군데 있었고, 정식 발표에서 고쳐졌습니다.


6.0에서 새로 쓸 수 있는 기능

this를 쓰지 않는 메서드도 먼저 추론합니다

아래는 6.0 발표의 예제입니다. 5.9는 consume의 y를 unknown으로 보고 오류를 냅니다.

TypeScript
declare function callIt<T>(obj: {
  produce: (x: number) => T;
  consume: (y: T) => void;
}): void;

callIt({
  consume(y) {
    return y.toFixed();
  },
  produce(x: number) {
    return x * 2;
  },
});
Text
src/index.ts(8,12): error TS18046: 'y' is of type 'unknown'.

메서드 문법으로 쓴 함수는 암묵적인 this를 가집니다. 5.9는 이런 함수를 문맥에 민감한 함수로 보고 타입 인수 추론에서 뒤로 미뤘습니다. 6.0은 함수 본문이 this를 쓰지 않으면 이 제약을 풀어, 같은 코드가 오류 없이 통과합니다(PR #62243 ↗). 6.0.3이 고친 클래스 속성 회귀도 이 변경에서 생겼습니다.

#/로 시작하는 서브패스 import를 씁니다

Node.js의 서브패스 import ↗는 package.json의 imports 필드로 패키지 안의 경로 별칭을 정합니다. 이전에는 #root/*처럼 # 뒤에 이름을 붙여야 했습니다. 이제는 번들러의 @/ 별칭처럼 #/로 시작할 수 있습니다.

package.json

JSON
{
  "name": "my-package",
  "type": "module",
  "imports": {
    "#/*": "./dist/*"
  }
}

tsconfig.json

JSON
{
  "compilerOptions": {
    "module": "nodenext",
    "rootDir": "./src",
    "outDir": "./dist"
  },
  "include": ["src"]
}
TypeScript
// src/index.ts
import { formatDate } from "#/utils/date.js";

console.log(formatDate(new Date("2026-03-23T00:00:00Z")));

imports는 빌드 결과인 dist를 가리킵니다. TypeScript는 rootDir과 outDir을 보고 원본 src/utils/date.ts를 찾습니다. 6.0은 moduleResolution이 nodenext나 bundler일 때만 #/를 해석하고, 5.9는 TS2307 오류를 냅니다.

런타임 지원은 Node.js 버전에 따라 다릅니다. Node.js 문서의 변경 이력은 v24.14.0과 v25.4.0에서 #/를 허용했다고 적습니다. TypeScript 발표는 “Node.js 20 최신 릴리스”에서 지원한다고 적었지만, Node.js v20·v22 문서에는 이 변경이 없습니다. 위 예제를 빌드해 Node.js 22.22.0으로 실행하면 ERR_INVALID_MODULE_SPECIFIER 오류가 납니다. Node.js 24.14.0에서는 2026-03-23을 출력합니다.

표준 라이브러리 타입이 늘었습니다

--stableTypeOrdering으로 7.0과의 차이를 진단합니다

7.0은 병렬 타입 검사 때문에 타입의 내부 순서를 내용 기준으로 정렬합니다. 그래서 6.0과 7.0의 선언 파일(.d.ts)이나 오류를 비교하면 union 순서 같은 차이가 잡음으로 섞입니다. --stableTypeOrdering은 6.0의 정렬 방식을 7.0과 맞춥니다(근거 ↗).

타입 검사가 최대 25% 느려질 수 있으므로 차이를 진단할 때만 켭니다. 이 옵션을 켰을 때 새 오류가 나면 대개 추론 차이입니다. 해당 호출에 타입 인수를 적거나 변수에 타입을 명시합니다. 7.0에서는 이 동작이 항상 켜져 있고 끌 수 없습니다.


업그레이드 순서

  1. npm install -D typescript@6으로 6.0.3 이상을 설치합니다.
  2. npx tsc --noEmit으로 deprecated 오류를 모읍니다. 이어서 실제 빌드를 실행해 TS5011(rootDir)을 확인합니다.
  3. 바뀐 기본값부터 tsconfig에 적습니다. 대개 types와 rootDir이고, 필요하면 strict와 module입니다.
  4. deprecated 옵션과 문법을 앞의 표대로 바꿉니다. baseUrl과 rootDir은 ts5to6로 처리할 수 있습니다.
  5. 당장 바꾸지 못하는 옵션이 남으면 ignoreDeprecations: "6.0"을 넣고 남은 옵션을 기록합니다. 모노레포는 5.9 패키지가 남아 있지 않은지 먼저 봅니다.
  6. ignoreDeprecations 없이 통과하면 7.0의 tsc를 시험합니다. typescript-eslint처럼 6.0 API가 필요한 도구와 함께 쓰는 방법은 7.0 발표의 병행 설치 절 ↗에 있습니다.

참고 자료

2026년 10월 24일 정정: 폐기 대상 import assertion 예시의 키워드를 asserts에서 assert로 바로잡았습니다. 공식 발표문의 해당 절이 asserts로 적었지만, asserts는 원래 유효한 문법이 아니어서 TypeScript가 구문 오류(TS1005)를 냅니다. 6.0이 폐기한 문법은 assert { type: "json" }입니다.

2026년 10월 24일 추가: TypeScript 6.0 정식판은 2026년 3월 23일에 나왔고, 4월 16일 6.0.3에서 클래스 속성 추론 회귀가 고쳐졌습니다. TypeScript 7.0 ↗은 7월 8일에 나와, 지금 npm install typescript는 7.0.x를 설치합니다. 7.0은 6.0에서 deprecated 된 옵션과 문법을 오류로 처리합니다.

2026년 10월 24일 수정: RC 소개 글을 6.0.3 기준 업그레이드 안내로 다시 쓰고, deprecated 옵션별 오류·대체 설정과 ignoreDeprecations의 7.0 동작을 넣었습니다. RC 발표에서 옮긴 #/ 예제도 바로잡았습니다.


Share this post on:

Previous Post
키오스크·모바일앱 접근성 의무화와 WCAG 3.0 초안의 구조·용어 변경 — A11Y 주간 다이제스트 2026.03.02 ~ 03.08
Next Post
Claude Show me 살펴보기: 텍스트를 넘어 시각적으로 설명하는 AI