Switch language한국어
Back to the list

Your Build Target Is Not an API Contract: Enforcing Baseline with TypeScript

TL;DR AI

Key summary

2 min read
  1. Vite 7 and standard TypeScript type checking do not guarantee browser API availability.

  2. Code using non-Baseline APIs like `Promise.withResolvers` or `document.startViewTransition` can still pass the build.

  3. To enforce policy, add a separate TypeScript Baseline config such as `tsconfig.baseline.json` in CI using baseline-oriented declaration packages.

Read the original