TypeScript error

TS7026: JSX elements without JSX types

  • Error TS7026
  • Reported with noImplicitAny
  • Reported with strict
  • Tested with TypeScript 5.9

error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. is reported for JSX elements when the checker has no JSX namespace telling it which elements and attributes exist. Under noImplicitAny the resulting any is an error, reported on each opening and closing tag.

The JSX types come from the framework: React's (@types/react), Preact's, Solid's. They are missing when the package is not installed, or when a types list or jsxImportSource points somewhere else.

At a glance

CodeTS7026
MessageJSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.
TypeScript's categoryerror
Listed underClasses, JSX and unused code
Turned on by noImplicitAny, strict
In .js files Reported when the file is checked: checkJs in jsconfig.json, or // @ts-check at the top of the file

The message is TypeScript's own text from its diagnostic messages file (Apache-2.0); {0} is filled in by tsc for each error.

What it looks like

Greeting.jsx Error confirmed 5.9.3 TypeScript 5.9.3, run 21 October 2026: Greeting.jsx(4,10): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. Greeting.jsx(4,47): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. Greeting.jsx(4,10): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. Greeting.jsx(4,47): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. Greeting.jsx(4,10): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. Greeting.jsx(4,47): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. checked 21 October 2026
/** @param {{ name: string }} props */
export function Greeting({ name }) {
  return <p className="greeting">Hello, {name}</p>;error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
}
jsx is set, but no JSX types are loaded.
jsconfig.json for this example
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "module": "nodenext",
    "types": [],
    "jsx": "preserve"
  },
  "include": ["*.jsx"]
}

What causes it

  • jsx is set, but no package that declares the JSX namespace is loaded.
  • noImplicitAny is on (part of strict).

How to fix it

Load the framework's JSX types

Install the types your JSX runtime publishes, and for an automatic runtime set jsxImportSource to the framework. For a project with its own small JSX runtime, declare the namespace yourself in a .d.ts file, as the fixed example does with a catch-all IntrinsicElements.

Greeting.jsx TypeScript 5.9.3 TypeScript 5.9.3, run 21 October 2026: No errors. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. No errors. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. No errors. checked 21 October 2026
/** @param {{ name: string }} props */
export function Greeting({ name }) {
  return <p className="greeting">Hello, {name}</p>;
}
JSX types declared for the elements the project uses.
jsconfig.json for this example
{
  "compilerOptions": {
    "checkJs": true,
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "module": "nodenext",
    "types": [],
    "jsx": "preserve"
  },
  "include": ["*.jsx", "*.d.ts"]
}

Gotchas

  • A catch-all IntrinsicElements accepts any element and attribute, so typos in tag names pass; real framework types check them.
  • Without any jsx setting the elements are also TS17004.

Sources

Last reviewed 20 October 2026.