Skip to content

TS7.0移行: tsconfig.json / ソースコード移行 #43

Description

@9c5s

概要

TypeScript 6.0 → 7.0 移行に向けた tsconfig.json の設定変更とソースコード互換性対応。

影響度: 小 — TS5.x モダナイゼーション済みのため大半は対応不要。

tsconfig.json 変更項目

項目 現在の値 必要な変更 理由
rootDir 未設定 "." を明示追加 TS6.0 で rootDir 推論ロジックが変更されるため、現在の暗黙の動作を明示して固定する
esModuleInterop 未設定 true を明示追加 TS6.0 で強制化
compileOnSave true 削除を検討 非標準オプション、TS6.0/7.0 での扱い要確認
lib ["es2022", "DOM", "DOM.Iterable"] "DOM.Iterable" 削除可 TS6.0 でデフォルト含有
module "NodeNext" 変更不要 明示指定済み
target "ES2022" 変更不要 明示指定済み
strict true 変更不要 TS6.0 デフォルトと一致
types ["node"] 変更不要 明示指定済み
forceConsistentCasingInFileNames true 変更不要 TS6.0 で strict に含有
noFallthroughCasesInSwitch true 変更不要 削除・変更予定なし
noImplicitReturns true 変更不要 削除・変更予定なし
skipLibCheck true 変更不要 削除・変更予定なし

ソースコード影響

影響なし。以下は全て互換:

  • strict: true — 既設定
  • types: ["node"] — 既に明示指定
  • target: ES2022 — ES3/ES5 非使用
  • module: NodeNext — AMD/UMD 非使用
  • JSDoc タグ — @enum, @constructor 未使用
  • as const satisfies パターン (network.ts L904, L918) — 完全サポート
  • enum / namespace — 未使用
  • import assertions (assert) — 未使用

注: tsconfig.json の include は ["src/**/*", "examples/**/*"] のため、型チェック対象は src/ (6ファイル) + examples/ を含む。

検証手順

  • ts5to6 ツールによる自動検証
  • npm run build で dist 再生成
  • npm run test で全テスト実行

チェックリスト

  • tsconfig.json に rootDir 追加
  • tsconfig.json に esModuleInterop 追加
  • compileOnSave の扱い判断 (削除 or 維持)
  • lib から DOM.Iterable 削除 (任意)
  • ts5to6 ツール実行
  • ビルド・テスト検証

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions