TS6229
TypeScriptERRORNotableConfigHIGH confidence

Tag 'X' expects at least 'X' arguments, but the JSX factory 'X' provides at m...

Production Risk

Build will fail; resolve before shipping.

What this means

A compiler configuration error (TS6229): Tag 'X' expects at least 'X' arguments, but the JSX factory 'X' provides at most 'X'.. This diagnostic is emitted by the TypeScript compiler when tag 'X' expects at least 'X' arguments, but the JSX factory 'X' provides at most 'X'..

Why it happens
  1. 1JSX syntax used without enabling '--jsx' compiler option
  2. 2Missing React or JSX runtime import
How to reproduce

TypeScript compiler reports TS6229 during type checking.

trigger — this will error
trigger — this will error
// Triggers TS6229
// Tag 'X' expects at least 'X' arguments, but the JSX factory 'X' provides at most 'X'.

expected output

error TS6229: Tag 'X' expects at least 'X' arguments, but the JSX factory 'X' provides at most 'X'.

Fix

Enable JSX in tsconfig.json

WHEN Using JSX syntax in TypeScript files

Enable JSX in tsconfig.json
// tsconfig.json
{
  "compilerOptions": {
    "jsx": "react-jsx"  // or "react", "preserve", etc.
  }
}

Why this works

The '--jsx' option tells TypeScript how to transform JSX; choose 'react-jsx' for React 17+ or 'react' for older versions.

Sources
Official documentation ↗

TypeScript Compiler Diagnostics

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All TypeScript errors