<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Leo</title>
    <description>The latest articles on DEV Community by Leo (@ryuya).</description>
    <link>https://dev.to/ryuya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F573247%2F1003e13a-ce59-439d-a392-f6f1d216aa5f.jpg</url>
      <title>DEV Community: Leo</title>
      <link>https://dev.to/ryuya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ryuya"/>
    <language>en</language>
    <item>
      <title>Your Build Target Is Not an API Contract: Enforcing Baseline with TypeScript</title>
      <dc:creator>Leo</dc:creator>
      <pubDate>Sat, 25 Jul 2026 20:33:45 +0000</pubDate>
      <link>https://dev.to/ryuya/your-build-target-is-not-an-api-contract-enforcing-baseline-with-typescript-epn</link>
      <guid>https://dev.to/ryuya/your-build-target-is-not-an-api-contract-enforcing-baseline-with-typescript-epn</guid>
      <description>&lt;p&gt;Vite 7 and later use &lt;a href="https://vite.dev/guide/#browser-support" rel="noopener noreferrer"&gt;Baseline Widely Available&lt;/a&gt; as the default production build target.&lt;/p&gt;

&lt;p&gt;Now put this in a Vite application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;withResolvers&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startViewTransition&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Update the DOM.&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx vite build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The build succeeds.&lt;/p&gt;

&lt;p&gt;Regular TypeScript accepts the same code when the standard &lt;code&gt;ESNext&lt;/code&gt; and &lt;code&gt;DOM&lt;/code&gt; libraries are loaded:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tsc &lt;span class="nt"&gt;--noEmit&lt;/span&gt; &lt;span class="nt"&gt;--target&lt;/span&gt; ESNext &lt;span class="nt"&gt;--lib&lt;/span&gt; ESNext,DOM

&lt;span class="c"&gt;# exit code 0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the time of testing, however, neither API was Baseline Widely Available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://web-platform-dx.github.io/web-features-explorer/features/promise-withresolvers/" rel="noopener noreferrer"&gt;&lt;code&gt;Promise.withResolvers()&lt;/code&gt;&lt;/a&gt; was Baseline 2024 Newly Available.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://web-platform-dx.github.io/web-features-explorer/features/view-transitions/" rel="noopener noreferrer"&gt;&lt;code&gt;Document.startViewTransition()&lt;/code&gt;&lt;/a&gt; was Baseline 2025 Newly Available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That result is not a bug in Vite or TypeScript.&lt;/p&gt;

&lt;p&gt;It exposes a gap between two different contracts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;What it controls&lt;/th&gt;
&lt;th&gt;What it does not control&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vite build target&lt;/td&gt;
&lt;td&gt;Which JavaScript syntax must be transformed for the target browsers&lt;/td&gt;
&lt;td&gt;Whether every runtime API you call is available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TypeScript &lt;code&gt;lib&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Which global APIs exist in the type environment&lt;/td&gt;
&lt;td&gt;Whether those APIs meet your Baseline policy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;Cross-browser availability of web platform features&lt;/td&gt;
&lt;td&gt;Your build output or runtime polyfills&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A build target is not an API contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-second version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;a href="https://github.com/3ru/TypeScript-Baseline-lib-generator" rel="noopener noreferrer"&gt;&lt;code&gt;typescript-baseline-lib&lt;/code&gt;&lt;/a&gt; for JavaScript built-ins such as &lt;code&gt;Promise&lt;/code&gt;, &lt;code&gt;Array&lt;/code&gt;, and &lt;code&gt;Map&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://github.com/uhyo/TypeScript-Baseline-Types" rel="noopener noreferrer"&gt;&lt;code&gt;@baseline-types/dom-widely-available&lt;/code&gt;&lt;/a&gt; for browser APIs such as &lt;code&gt;Document&lt;/code&gt;, &lt;code&gt;ResizeObserver&lt;/code&gt;, and &lt;code&gt;fetch&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Load both from a dedicated TypeScript configuration and run it as a separate CI check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is an ordinary &lt;code&gt;tsc&lt;/code&gt; error. No additional source-code parser is involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the build passes
&lt;/h2&gt;

&lt;p&gt;Vite describes its TypeScript support as &lt;a href="https://vite.dev/guide/features.html#transpile-only" rel="noopener noreferrer"&gt;transpile-only&lt;/a&gt;. It removes TypeScript syntax but does not run type checking by itself.&lt;/p&gt;

&lt;p&gt;Its build target tells the transformer which JavaScript syntax needs to be lowered. It does not automatically reject every API that falls outside the corresponding Baseline target, and it does not generally inject API polyfills.&lt;/p&gt;

&lt;p&gt;TypeScript checks APIs through declaration files such as &lt;code&gt;lib.esnext.d.ts&lt;/code&gt; and &lt;code&gt;lib.dom.d.ts&lt;/code&gt;. Those files model a selected ECMAScript or web platform surface. They are not filtered by Baseline status.&lt;/p&gt;

&lt;p&gt;Both tools are doing their intended jobs. The missing layer is a declaration set that represents the API policy we want to enforce.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add a Baseline API check
&lt;/h2&gt;

&lt;p&gt;Install TypeScript and the two generated declaration packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  typescript@^7 &lt;span class="se"&gt;\&lt;/span&gt;
  typescript-baseline-lib &lt;span class="se"&gt;\&lt;/span&gt;
  @baseline-types/dom-widely-available
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Commit the lockfile. The package versions determine the exact Baseline snapshots evaluated in CI.&lt;/p&gt;

&lt;p&gt;Keep your existing build configuration and add a dedicated TypeScript project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;tsconfig.baseline.json&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ESNext"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ESNext"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"moduleResolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bundler"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"strict"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"noEmit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"noLib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"allowImportingTsExtensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"@baseline-types/dom-widely-available"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"include"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"src/**/*.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"**/vite-env.d.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important options are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"noLib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"@baseline-types/dom-widely-available"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;noLib&lt;/code&gt; removes TypeScript's standard ES and DOM libraries. The &lt;code&gt;types&lt;/code&gt; entries replace them with the Baseline-oriented declarations.&lt;/p&gt;

&lt;p&gt;Do not combine this configuration with the standard &lt;code&gt;es*&lt;/code&gt; libraries. Doing so would reintroduce the APIs the gate is intended to remove.&lt;/p&gt;

&lt;p&gt;I also recommend leaving &lt;code&gt;skipLibCheck&lt;/code&gt; disabled. Declaration conflicts are useful signals here, not noise to suppress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this config does not extend the build config
&lt;/h3&gt;

&lt;p&gt;Many frontend projects already declare &lt;code&gt;compilerOptions.lib&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Combining an inherited &lt;code&gt;lib&lt;/code&gt; with &lt;code&gt;noLib: true&lt;/code&gt; produces a configuration error. A standalone file is therefore the safest copy-paste starting point.&lt;/p&gt;

&lt;p&gt;For a larger codebase, extract options such as &lt;code&gt;strict&lt;/code&gt;, &lt;code&gt;jsx&lt;/code&gt;, &lt;code&gt;paths&lt;/code&gt;, and module resolution into a shared config that contains neither &lt;code&gt;lib&lt;/code&gt; nor &lt;code&gt;types&lt;/code&gt;. The normal build and Baseline check can then extend that shared configuration independently.&lt;/p&gt;

&lt;p&gt;If the project contains TSX, add &lt;code&gt;src/**/*.tsx&lt;/code&gt; to &lt;code&gt;include&lt;/code&gt; and copy its existing &lt;code&gt;jsx&lt;/code&gt; option into the Baseline config.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
  Vite client declaration note
  &lt;p&gt;A typical Vite project contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;/// &amp;lt;reference types="vite/client" /&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vite's client declarations include asset modules and environment types, but they can also reference Worker APIs. Worker declarations are outside the scope of the DOM package used here.&lt;/p&gt;

&lt;p&gt;For a strict browser-only gate, exclude the existing &lt;code&gt;vite-env.d.ts&lt;/code&gt; and declare only the asset types your application uses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/baseline-env.d.ts&lt;/span&gt;
&lt;span class="kr"&gt;declare&lt;/span&gt; &lt;span class="kr"&gt;module&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kr"&gt;declare&lt;/span&gt; &lt;span class="kr"&gt;module&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*.svg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;declare&lt;/span&gt; &lt;span class="kr"&gt;module&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your application uses &lt;code&gt;import.meta.env&lt;/code&gt;, add only the required &lt;code&gt;ImportMetaEnv&lt;/code&gt; declarations to the same file.&lt;/p&gt;

&lt;p&gt;This avoids widening the Baseline type surface with unrelated Worker globals.&lt;/p&gt;



&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  See what the gate catches
&lt;/h2&gt;

&lt;p&gt;Add a mix of established and newer APIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newestOdd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;findLast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;observer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ResizeObserver&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;

&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;withResolvers&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromAsync&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;EyeDropper&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startViewTransition&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;newestOdd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;observer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the dedicated check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tsc &lt;span class="nt"&gt;-p&lt;/span&gt; tsconfig.baseline.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The established APIs compile, while the APIs outside Widely Available are rejected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error TS2550: Property 'withResolvers' does not exist on type 'PromiseConstructor'.

error TS2550: Property 'fromAsync' does not exist on type 'ArrayConstructor'.

error TS2304: Cannot find name 'EyeDropper'.

error TS2339: Property 'startViewTransition' does not exist on type 'Document'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the time of testing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;API&lt;/th&gt;
&lt;th&gt;Baseline status&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Array.prototype.findLast()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Widely Available&lt;/td&gt;
&lt;td&gt;Accepted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fetch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Widely Available&lt;/td&gt;
&lt;td&gt;Accepted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ResizeObserver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Widely Available&lt;/td&gt;
&lt;td&gt;Accepted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Promise.withResolvers()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2024 Newly Available&lt;/td&gt;
&lt;td&gt;Rejected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Array.fromAsync()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2024 Newly Available&lt;/td&gt;
&lt;td&gt;Rejected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;EyeDropper&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Limited availability&lt;/td&gt;
&lt;td&gt;Rejected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Document.startViewTransition()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2025 Newly Available&lt;/td&gt;
&lt;td&gt;Rejected&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Baseline status changes over time. These results were verified on July 23, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn it into a CI contract
&lt;/h2&gt;

&lt;p&gt;Add a separate package script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"check:baseline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tsc -p tsconfig.baseline.json"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your existing CI job already installs dependencies, adding this command may be enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run check:baseline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A standalone GitHub Actions workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# .github/workflows/baseline-types.yml&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Baseline API check&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;main&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;baseline&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;timeout-minutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v6&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v6&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24&lt;/span&gt;
          &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm run check:baseline&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an existing project, introduce this as a separate check first. Review the initial findings, decide how each API should be handled, and only then make the check required.&lt;/p&gt;

&lt;p&gt;That avoids turning a useful policy migration into an unexplained wall of CI failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling target or fixed year?
&lt;/h2&gt;

&lt;p&gt;A moving target is appropriate for applications that want to adopt APIs as they become Widely Available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"@baseline-types/dom-widely-available"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The declaration set advances when the underlying compatibility data and packages are updated.&lt;/p&gt;

&lt;p&gt;A fixed Baseline year is more suitable for a library contract, a long-lived release branch, or a product that updates its browser policy deliberately.&lt;/p&gt;

&lt;p&gt;Install the matching DOM target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; @baseline-types/dom-2024
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then use the cumulative 2024 targets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"noLib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib/year/2024"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"@baseline-types/dom-2024"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A year target contains APIs that became Baseline Newly Available by the end of that year. It is not the same as saying every API was already Widely Available during that year.&lt;/p&gt;

&lt;p&gt;Do not combine a fixed &lt;code&gt;year/*&lt;/code&gt; entry with the rolling root package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make polyfills explicit
&lt;/h2&gt;

&lt;p&gt;Sometimes an API is outside the selected Baseline target, but your runtime intentionally provides it.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;core-js&lt;/code&gt; can provide &lt;code&gt;Promise.withResolvers&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;core-js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Load the runtime implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;core-js/proposals/promise-with-resolvers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add the matching audited declaration entry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"noLib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"typescript-baseline-lib/allow/promise-withresolvers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"@baseline-types/dom-widely-available"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This permits only that API. The rest of the Baseline boundary remains unchanged.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;allow/*&lt;/code&gt; entry changes type availability only. It does not install or load a runtime polyfill.&lt;/p&gt;

&lt;p&gt;That separation is intentional: the runtime implementation and the type-level exception should both be visible in review.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this check does not guarantee
&lt;/h2&gt;

&lt;p&gt;This is an API-surface gate, not a complete browser compatibility system.&lt;/p&gt;

&lt;p&gt;It does not guarantee:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;That an API works without browser-specific bugs.&lt;/li&gt;
&lt;li&gt;That requirements such as HTTPS, permissions, or user activation are met.&lt;/li&gt;
&lt;li&gt;That your actual audience matches the Baseline browser population.&lt;/li&gt;
&lt;li&gt;That JavaScript syntax, CSS, or HTML features meet the same target.&lt;/li&gt;
&lt;li&gt;That dynamically accessed or deliberately untyped APIs will be detected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The DOM declarations also preserve some supporting types to keep references valid. They should not be interpreted as a perfect rejection of every non-Baseline DOM symbol.&lt;/p&gt;

&lt;p&gt;If your users include old embedded WebViews, managed enterprise browsers, or unusually long-lived devices, Baseline Widely Available may still be too broad. Browser analytics and runtime testing remain necessary.&lt;/p&gt;

&lt;p&gt;For broader JavaScript checks, I also use &lt;a href="https://github.com/3ru/eslint-plugin-baseline-js" rel="noopener noreferrer"&gt;&lt;code&gt;eslint-plugin-baseline-js&lt;/code&gt;&lt;/a&gt;. It covers syntax and Web API cases that cannot be represented by a TypeScript declaration file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scope the check carefully in monorepos
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;noLib: true&lt;/code&gt; replaces the complete global TypeScript library.&lt;/p&gt;

&lt;p&gt;That is useful for browser code, but it should not automatically be applied to every package in a monorepo.&lt;/p&gt;

&lt;p&gt;For example, current Node.js declarations may depend on standard-library APIs that are newer than your selected Baseline target. A universal configuration combining browser, Node.js, test-runner, and framework globals can therefore produce dependency-level errors unrelated to your browser contract.&lt;/p&gt;

&lt;p&gt;Run the gate over the source that actually shares the browser compatibility policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"include"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"packages/browser/src/**/*.ts"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep separate build configurations for Node-only entry points, tooling, tests, and browser applications.&lt;/p&gt;

&lt;p&gt;The boundary should follow the deployment environment, not the repository root.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why generated declaration files?
&lt;/h2&gt;

&lt;p&gt;Manually maintaining a list of APIs would become stale almost immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/3ru/TypeScript-Baseline-lib-generator" rel="noopener noreferrer"&gt;&lt;code&gt;typescript-baseline-lib&lt;/code&gt;&lt;/a&gt; generates its JavaScript declarations from the &lt;code&gt;web-features&lt;/code&gt; compatibility dataset and TypeScript's own library declarations. The repository checks in its dataset snapshot, classification reports, declaration inventory, generated output, and audit results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/uhyo/TypeScript-Baseline-Types" rel="noopener noreferrer"&gt;&lt;code&gt;@baseline-types&lt;/code&gt;&lt;/a&gt; applies Baseline filtering to the generator used for TypeScript's DOM declarations.&lt;/p&gt;

&lt;p&gt;The two projects deliberately cover different surfaces:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;Surface&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;typescript-baseline-lib&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;JavaScript built-ins such as &lt;code&gt;Promise&lt;/code&gt;, &lt;code&gt;Array&lt;/code&gt;, &lt;code&gt;Map&lt;/code&gt;, and &lt;code&gt;Intl&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;@baseline-types/dom-*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;DOM and web platform APIs such as &lt;code&gt;Document&lt;/code&gt;, &lt;code&gt;Window&lt;/code&gt;, and &lt;code&gt;ResizeObserver&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The package lock then makes a given CI run reproducible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this is going
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;typescript-baseline-lib&lt;/code&gt; is currently a public alpha. I recommend adopting it as an additional CI gate before making it the only TypeScript configuration for a production application.&lt;/p&gt;

&lt;p&gt;The longer-term goal is first-class TypeScript support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"lib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"baseline"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The corresponding &lt;a href="https://github.com/microsoft/TypeScript/issues/62536" rel="noopener noreferrer"&gt;TypeScript proposal&lt;/a&gt; is currently awaiting more real-world feedback.&lt;/p&gt;

&lt;p&gt;If you try the package, the most useful feedback is concrete:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which project and TypeScript version did you test?&lt;/li&gt;
&lt;li&gt;Which API did the gate catch?&lt;/li&gt;
&lt;li&gt;Was the result expected?&lt;/li&gt;
&lt;li&gt;Did a framework or ambient type package introduce a conflict?&lt;/li&gt;
&lt;li&gt;Could the check remain enabled in CI?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try it on one browser-only package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  typescript@^7 &lt;span class="se"&gt;\&lt;/span&gt;
  typescript-baseline-lib &lt;span class="se"&gt;\&lt;/span&gt;
  @baseline-types/dom-widely-available

npx tsc &lt;span class="nt"&gt;-p&lt;/span&gt; tsconfig.baseline.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Browser compatibility policies should not depend on every reviewer remembering the support status of every API.&lt;/p&gt;

&lt;p&gt;A small, reproducible CI check is a better contract.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Bringing Baseline into Product Development — and Keeping It Safe in Practice</title>
      <dc:creator>Leo</dc:creator>
      <pubDate>Wed, 10 Sep 2025 04:10:25 +0000</pubDate>
      <link>https://dev.to/ryuya/bringing-baseline-into-product-development-and-keeping-it-safe-in-practice-3pb8</link>
      <guid>https://dev.to/ryuya/bringing-baseline-into-product-development-and-keeping-it-safe-in-practice-3pb8</guid>
      <description>&lt;p&gt;&lt;a href="https://web-platform-dx.github.io/web-features/" rel="noopener noreferrer"&gt;Baseline&lt;/a&gt; gives teams a simple way to answer a hard question: when is a web platform feature safe to use everywhere that matters? Instead of juggling browser-version matrices, you align on a shared, function-level line and make consistent, defensible decisions.&lt;/p&gt;

&lt;p&gt;There is also a clear business angle. If a user’s browser silently lacks a feature you rely on, you can lose conversions, trigger avoidable support tickets, and erode trust without anyone noticing the root cause. Treating Baseline as a product standard reduces that risk. It turns a nebulous, recurring debate into a policy you can document, audit, and enforce automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick primer on Baseline
&lt;/h2&gt;

&lt;p&gt;Baseline tracks when a feature reaches parity across the four major engines (Safari, Chrome, Edge, and Firefox). It communicates readiness in three stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Limited availability — Not yet supported in all Baseline browsers; treat as experimental and avoid for production unless you have a well‑designed fallback.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2maystjc3gfzn2o6btf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2maystjc3gfzn2o6btf.png" alt="Baseline Widely Available" width="800" height="102"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Newly available — Supported in all current stable releases; good default for early adoption with care.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiy0t1vje49ku8f3ic344.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiy0t1vje49ku8f3ic344.png" alt="Baseline Newly available" width="797" height="116"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Widely available — Newly, plus 30 months of universal support; practical proxy for very low risk in the wild.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrbsyttq4xxr6q0b6poq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrbsyttq4xxr6q0b6poq.png" alt=" " width="799" height="113"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also target by year. For example, “2023” means: allow anything that became Baseline newly available in 2023 or earlier.&lt;/p&gt;

&lt;p&gt;It is a feature‑first lens. Rather than anchoring on version lists for each browser, you ask, “Has this capability reached the line?” and get a single answer you can reason about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing “our Baseline”
&lt;/h2&gt;

&lt;p&gt;Start with Widely as the default. It’s a conservative, low‑friction starting point because it bakes in real‑world adoption time after universal support lands.&lt;/p&gt;

&lt;p&gt;Then estimate “our Year.” Use your analytics or RUM to understand the browsers your users actually run. Vary the year (2021, 2022, 2023, …) and estimate coverage. If you use Google Analytics, &lt;a href="https://chrome.dev/google-analytics-baseline-checker/" rel="noopener noreferrer"&gt;the Google Analytics Baseline Checker&lt;/a&gt; can visualize this; otherwise, you can massage internal logs into the same shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25wxccpx641szuq72aob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F25wxccpx641szuq72aob.png" alt=" " width="800" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, define your exception policy. Some features come with reasonable fallbacks you can ship today and progressively enhance later. Others carry more cross-browser risk and should wait even if they are technically Widely. Write down how exceptions are proposed, reviewed, and documented.&lt;/p&gt;

&lt;p&gt;This sequence—safe default, data-informed tuning, explicit exceptions—makes the policy clear and keeps decisions explainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not rely on UA tables alone?
&lt;/h2&gt;

&lt;p&gt;User-Agent strings are easy to spoof and often polluted by crawlers and scanners. Even when they are accurate, a version label does not capture enterprise policies, flags, or safety modes that can disable capabilities. UA-led policies also force you to manage version matrices, which age poorly and rarely map cleanly to how specifications group features.&lt;/p&gt;

&lt;p&gt;Baseline draws the line at the capability itself. Keep UA data for coverage estimates and stakeholder communication, but let features drive the decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing it into the workflow
&lt;/h2&gt;

&lt;p&gt;First, set your build/transpile targets to align with your chosen Baseline. Some tools default to Widely already; others let you convert Baseline to a Browserslist query or an esbuild target. The goal is that the code you ship matches the line you agreed on.&lt;/p&gt;

&lt;p&gt;Second, catch issues where they happen: in the editor and in CI. ESLint can enforce Baseline for JavaScript, and complementary plugins can do the same for CSS and HTML. When someone reaches for a feature that sits beyond the line, they see a precise, actionable message before it merges.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F360cp83ysrlsnvfshusy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F360cp83ysrlsnvfshusy.png" alt=" " width="800" height="49"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Third, document the policy. State the default (for example, “Widely”), the way you set the year, and how exceptions work. That turns a tribal norm into policy-as-code and keeps newcomers aligned.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Example&lt;/strong&gt;: don’t use &lt;code&gt;Date#getYear()/setYear()&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getYear" rel="noopener noreferrer"&gt;&lt;code&gt;Date#getYear()&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;Date#setYear()&lt;/code&gt; are deprecated. They also fall below a sensible Baseline threshold. Reaching for them is a recipe for subtle bugs.&lt;/p&gt;

&lt;p&gt;With a Baseline rule enabled, you would see a message like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8eykcopqq20qupyqsyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8eykcopqq20qupyqsyo.png" alt=" " width="800" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  One policy, three surfaces: JS, CSS, and HTML
&lt;/h2&gt;

&lt;p&gt;The easiest way to make Baseline “real” for your team is to enable it where code is written. JavaScript is the obvious starting point, but it helps to bring CSS and HTML into the same conversation so your policy feels coherent.&lt;/p&gt;

&lt;p&gt;Here is a Flat Config example that wires the three together. Adjust the file globs and the strictness to match your repo. The JavaScript section uses the built‑in presets exposed by &lt;code&gt;eslint-plugin-baseline-js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// eslint.config.js (Flat Config)&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;tsParser&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typescript-eslint/parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;baselineJs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BASELINE&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eslint-plugin-baseline-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;cssPlugin&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@eslint/css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;htmlPlugin&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@html-eslint/eslint-plugin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;htmlParser&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@html-eslint/parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="c1"&gt;// Register the JS plugin once&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;baseline-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;baselineJs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="c1"&gt;// JavaScript (JS) — recommended preset (auto Web APIs + JS builtins)&lt;/span&gt;
  &lt;span class="nx"&gt;baselineJs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;configs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recommended&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;available&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;BASELINE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WIDELY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;

  &lt;span class="c1"&gt;// TypeScript (TS) — attach parser + type-aware preset&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;**/*.{ts,tsx}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;languageOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;tsParser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parserOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./tsconfig.json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;baselineJs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;configs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;recommended-ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]({&lt;/span&gt; &lt;span class="na"&gt;available&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;BASELINE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WIDELY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;

  &lt;span class="c1"&gt;// CSS: Baseline&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;**/*.{css,scss}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;cssPlugin&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;language&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@css/css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@css/use-baseline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;available&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;widely&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="c1"&gt;// HTML: Baseline&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;**/*.{html,htm}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@html-eslint&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;htmlPlugin&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;languageOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;htmlParser&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@html-eslint/use-baseline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;available&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;widely&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;JS: &lt;a href="https://github.com/3ru/eslint-plugin-baseline-js" rel="noopener noreferrer"&gt;&lt;code&gt;eslint-plugin-baseline-js&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CSS: &lt;a href="https://github.com/eslint/css" rel="noopener noreferrer"&gt;&lt;code&gt;@eslint/css&lt;/code&gt;&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;HTML: &lt;a href="https://github.com/yeonjuan/html-eslint" rel="noopener noreferrer"&gt;&lt;code&gt;@html-eslint/eslint-plugin&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can target a specific year (e.g., &lt;code&gt;{ available: 2022 }&lt;/code&gt;). Items with “Limited availability” are treated as beyond the configured year, so they will be flagged until they enter Baseline.&lt;/li&gt;
&lt;li&gt;The single rule is &lt;code&gt;baseline-js/use-baseline&lt;/code&gt;. Presets above expand it for JS and TS with sensible defaults (auto for JS, type‑aware for TS).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing thought
&lt;/h2&gt;

&lt;p&gt;Baseline is a way to agree on reality. Pick a line, show your work, and let tooling hold it for you. That is how teams move fast without gambling with user experience.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>Translate Markdown to Any Language (GitHub Bot)</title>
      <dc:creator>Leo</dc:creator>
      <pubDate>Fri, 31 Mar 2023 14:38:32 +0000</pubDate>
      <link>https://dev.to/ryuya/translate-markdown-to-any-language-github-bot-3pde</link>
      <guid>https://dev.to/ryuya/translate-markdown-to-any-language-github-bot-3pde</guid>
      <description>&lt;p&gt;Most open-source projects are written in English, raising barriers to participation from speakers of other languages. In addition, translation is a labor-intensive process, so documentation has yet to be internationalized to a great extent. &lt;br&gt;
I have created a &lt;a href="https://github.com/marketplace/actions/gpt-translate" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt; that automatically translate documents using multiple AI models.&lt;br&gt;
It is &lt;a href="https://github.com/3ru/gpt-translate" rel="noopener noreferrer"&gt;open source&lt;/a&gt; and requires an individual API key, but it is free.&lt;/p&gt;


&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;All you need is an Open AI API Key and Actions workflow settings. Please see &lt;a href="https://github.com/3ru/gpt-translate#readme" rel="noopener noreferrer"&gt;README &lt;/a&gt;for details.&lt;/p&gt;

&lt;p&gt;To prevent your API KEY from being misused, we only allow people who have write permission to access the repository to run the bot.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Once the workflow is set up, comment on the issue or pr with a command to translate the input file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/gpt-translate &lt;span class="o"&gt;[&lt;/span&gt;input filepath] &lt;span class="o"&gt;[&lt;/span&gt;output filepath] &lt;span class="o"&gt;[&lt;/span&gt;target language] 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Comment on Issues
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfzm2dfv8be2ahizdqgy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frfzm2dfv8be2ahizdqgy.png" alt="Entering commands" width="766" height="214"&gt;&lt;/a&gt;&lt;a href="https://github.com/3ru/gpt-translate/issues/1#issuecomment-1491882236" rel="noopener noreferrer"&gt;View Actual Issues&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Auto-generated PR
&lt;/h3&gt;

&lt;p&gt;A PR is created depending on where the command is entered. (If you comment on a PR, the commit is added to that PR.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rfay4lq60nfn0rczhyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3rfay4lq60nfn0rczhyo.png" alt="Auto-generated PR" width="800" height="672"&gt;&lt;/a&gt;&lt;a href="https://github.com/3ru/gpt-translate/pull/4" rel="noopener noreferrer"&gt;View actual PR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Interestingly, I could translate Voynich's Manuscript (undeciphered script), ancient Greek, and other languages. (Not possible with GPT-4)&lt;br&gt;
We could also build a kind of OSS document for time travelers :)&lt;/p&gt;
&lt;h2&gt;
  
  
  Human-in-the-Loop
&lt;/h2&gt;

&lt;p&gt;Originally, the texts translated by GPT are of fairly high quality.&lt;/p&gt;

&lt;p&gt;However, a human can also review the translation files created by this bot to perfect the translation further.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xx41cfhlg83cnmd9rmc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xx41cfhlg83cnmd9rmc.png" alt="PR review" width="799" height="527"&gt;&lt;/a&gt;&lt;br&gt;
GitHub's function to accept reviews as is on a new commit allows us to build a very seamless translation experience.&lt;/p&gt;



&lt;p&gt;If you have any suggestions for improvement or bugs, please feel free to write them in Issues!&lt;/p&gt;

&lt;p&gt;🌎As a non-English speaking person, I would be happy if the various OSS are easier to understand!&lt;/p&gt;


&lt;h3&gt;
  
  
  Repo
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Thanks for the 250 stars🌟&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/3ru" rel="noopener noreferrer"&gt;
        3ru
      &lt;/a&gt; / &lt;a href="https://github.com/3ru/gpt-translate" rel="noopener noreferrer"&gt;
        gpt-translate
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      💬Translate Files into Any Languages with AI
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🌎 Markdown Translation BOT&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://codeclimate.com/github/3ru/gpt-translate/maintainability" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7efcc0ea773f525a6a2d9a76671b3c59772296d52f1decc0976ee573c50bf672/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61313365613466333739313362613662613537302f6d61696e7461696e6162696c697479" alt="Maintainability"&gt;&lt;/a&gt;
&lt;a href="https://github.com/3ru/gpt-translate/actions/workflows/gpt-translate.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/3ru/gpt-translate/actions/workflows/gpt-translate.yml/badge.svg" alt="GPT Translate"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://openai.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/64261f71e27ddab9c698be8f05050d90b5f220848fd1c871db9489f6dbfaf6b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4f70656e41492d77686974653f7374796c653d666c61742d737175617265266c6f676f3d6f70656e6169266c6f676f436f6c6f723d626c61636b" alt="OpenAI"&gt;&lt;/a&gt;
&lt;a href="https://azure.microsoft.com/en-us/products/ai-services/openai-service" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/82d957fccf28b66d9351166f1fa252233a53481cef585e1772d32d295267855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4d6963726f736f6674253230417a7572652d77686974653f7374796c653d666c61742d737175617265266c6f676f3d6d6963726f736f6674617a75726526636f6c6f723d303037384434" alt="Azure"&gt;&lt;/a&gt;
&lt;a href="https://www.anthropic.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/97b45a4a3a8e5dbe4ae3141e1677b5d834e4dd4a1df13723c7db76e688a6d550/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d416e7468726f7069632d626c61636b3f7374796c653d666c61742d737175617265266c6f676f3d616e7468726f706963266c6f676f436f6c6f723d626c61636b26636f6c6f723d643461323766" alt="Anthropic"&gt;&lt;/a&gt;
&lt;a href="https://docs.perplexity.ai/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/45b9e726174faa2db4907cba1fec98ffc1bd3ce4f63941f24d0fa447ed737b2f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d506572706c65786974792d626c61636b3f7374796c653d666c61742d737175617265266c6f676f3d706572706c657869747926636f6c6f723d626c61636b" alt="Perplexity"&gt;&lt;/a&gt;
&lt;a href="https://ai.google/discover/generativeai/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2348059e6527a9f6b4bbe388451dfc4804512e42ebb59942a9e2d710eab96c43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d476f6f676c6525323067656d696e692d77686974653f7374796c653d666c61742d737175617265266c6f676f3d676f6f676c6567656d696e6926636f6c6f723d7768697465" alt="Google"&gt;&lt;/a&gt;
&lt;a href="https://groq.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/282837532f20f23a75dde87a882c3820618fea6cbda94c95ac8c729408b2219a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d47726f712d626c61636b3f7374796c653d666c61742d737175617265266c6f676f436f6c6f723d626c61636b26636f6c6f723d463535303336" alt="Groq"&gt;&lt;/a&gt;
&lt;a href="https://fireworks.ai/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/15ee62da722548b36b153aca8f98ca6e5a9f92a547b4249afdeee8b337bb2dd1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d46697265776f726b7325323041492d626c61636b3f7374796c653d666c61742d73717561726526636f6c6f723d363331666565" alt="Fireworks"&gt;&lt;/a&gt;
&lt;a href="https://mistral.ai/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/161cf6f615fcb66de558ca805047cc735fdddc5d74d4f940f35981b0d97ad4c0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4d69737472616c25323041492d626c61636b3f7374796c653d666c61742d73717561726526636f6c6f723d666637303030" alt="Mistral"&gt;&lt;/a&gt;
&lt;a href="https://cohere.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24e19cacdc15df16cc40ca6cbb42e27d74aa86f2c4a77f5d45ec3956ca4c6268/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d436f686572652d626c61636b3f7374796c653d666c61742d73717561726526636f6c6f723d333935393463" alt="Cohere"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/README.md" rel="noopener noreferrer"&gt;English&lt;/a&gt; |
&lt;a href="https://github.com/README/README.zh-CN.md" rel="noopener noreferrer"&gt;简体中文&lt;/a&gt; |
&lt;a href="https://github.com/README/README.zh-TW.md" rel="noopener noreferrer"&gt;繁體中文&lt;/a&gt; |
&lt;a href="https://github.com/README/README.es.md" rel="noopener noreferrer"&gt;Español&lt;/a&gt; |
&lt;a href="https://github.com/README/README.hi.md" rel="noopener noreferrer"&gt;हिंदी, हिन्दी&lt;/a&gt; |
&lt;a href="https://github.com/README/README.ko.md" rel="noopener noreferrer"&gt;한국어&lt;/a&gt; |
&lt;a href="https://github.com/README/README.ja.md" rel="noopener noreferrer"&gt;日本語&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This GitHub action translates your markdown files into multiple languages using multiple AI models.&lt;/p&gt;
&lt;div class="markdown-alert markdown-alert-tip"&gt;
&lt;p class="markdown-alert-title"&gt;Tip&lt;/p&gt;
&lt;p&gt;Now Available: &lt;strong&gt;AI Models from Multiple Providers✨&lt;/strong&gt;  &lt;br&gt;
We've expanded beyond OpenAI to support various AI model providers.  &lt;br&gt;
For a comprehensive &lt;a href="https://g-t.vercel.app/docs/references/supported-model-provider" rel="nofollow noopener noreferrer"&gt;list of supported providers&lt;/a&gt; and detailed information, please refer to our &lt;a href="https://github.com/3ru/gpt-translate/releases/tag/v1.2.0-beta" rel="noopener noreferrer"&gt;release notes&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;br&gt;
🧐 Current Status


&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The action supports translating &lt;strong&gt;markdown(&lt;code&gt;.md&lt;/code&gt;), markdown-jsx(&lt;code&gt;.mdx&lt;/code&gt;), json(&lt;code&gt;.json&lt;/code&gt;) files only&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The command can be executed exclusively by individuals with &lt;strong&gt;write permissions to the repository&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These limitations prevent API abuse by non-trusted parties.&lt;/p&gt;



&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🔧 Setup&lt;/h2&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Repository Settings&lt;/h3&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;1. Settings &amp;gt; Actions &amp;gt; General&lt;/h4&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Enable &lt;code&gt;Read and write permissions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Enable &lt;code&gt;Allow GitHub Actions to create and approve pull requests&lt;/code&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/69892552/228692074-d8d009a8-9272-4023-97b1-3cbc637d5d84.jpg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F69892552%2F228692074-d8d009a8-9272-4023-97b1-3cbc637d5d84.jpg" alt="permissions"&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;2. Settings &amp;gt; Secrets and variables &amp;gt; Actions&lt;/h4&gt;

&lt;/div&gt;


&lt;ul&gt;

&lt;li&gt;Set &lt;a href="https://platform.openai.com/account/api-keys" rel="nofollow noopener noreferrer"&gt;your API key&lt;/a&gt;(&lt;code&gt;OPENAI_API_KEY&lt;/code&gt;) to…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/3ru/gpt-translate" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
This is my very first OSS and I would be happy if you like it.

</description>
      <category>opensource</category>
      <category>i18n</category>
      <category>ai</category>
      <category>chatgpt</category>
    </item>
  </channel>
</rss>
