Breaking Changes
lib.d.ts Changes
Promiseのメソッドの戻り値の型がAwaitedに変わった。
https://github.com/microsoft/TypeScript/pull/45350
Promise.all
Promise.race
Promise.allSettled
Promise.any
function foo<T>(p: Promise<T>) {
// Promise<T[]>
return Promise.all<T>([p]);
}
影響
Promise.all
の戻り値を Promise<T[]>
型の変数に代入しているような場合、書き換える必要がある。
Compiler Options Checking at the Root of tsconfig.json
tsconfig.jsonの「compilerOption」で宣言するべきオプションが「compilerOption」の外にある時、警告されるようになった。
// tsconfig.json
{
"target": "2017", // <=== 本来「compilerOptions」の下にないといけないやつ
"compilerOptions": {
...
}
}
エラーなし
影響
スルーされていた記述ミスがエラーとして検出された場合、tsconfig.jsonを書き換える必要がある。
Last updated