a minimal implementation of JSX.IntrinsicElements to get syntax highlighting in your .jsx and .tsx files.
to use this, and banish all the red error lines under your jsx blocks, simply import this file.

how to get it working:

  • create the file global.d.ts in the root of your source code. so for instance: /src/global.d.ts is one possibility.
  • add the following lines to it:
// file: `/src/global.d.ts`
import { JSX as JSXInternal } from "@jsr:@oazmi/tsignal/jsx-runtime"
type IntrinsicElements = JSXInternal.IntrinsicElements
export as namespace JSX
  • and now, with the global declaration done, your IDE should pick up on the JSX.IntrinsicElements definitions. however, if it doesn't in certain files, add the following line to the top of that file, so that you can explicitly reference your global.d.ts file.
// file `/src/components/navigation_bar.tsx`
/// <reference path="../global.d.ts" />

Example

// file `/src/components/navigation_bar.tsx`
/// <reference path="../global.d.ts" />

const my_div = <div>
<span>Hello</span>
<span>World!!</span>
</div>

Index

Type Aliases

Generated using TypeDoc