Skip to content

jsx-dev-runtime.ts#

View Markdown

Source

3 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

3 symbols 1 functions 1 interfaces 1 modules 6 parameters 3 members 1 returns 1 examples

Reference#

modulejsx-dev-runtimeDevelopment-runtime entry point for the static HTML JSX transform. TypeScript's react-jsxdev transform (and Vite's dev-…

Development-runtime entry point for the static HTML JSX transform.

TypeScript's react-jsxdev transform (and Vite's dev-mode JSX transform) import from <jsxImportSource>/jsx-dev-runtime and call jsxDEV with the extra debug arguments below. This runtime renders static HTML, so there is nothing useful to do with them — they are accepted and ignored so the same templates compile in both dev and build.

View source

Examples

Example 1
{ "compilerOptions": { "jsx": "react-jsxdev", "jsxImportSource": "@ox-content/vite-plugin" } }
fnjsxDEV(type: JSXElementType, props: JSXProps, key?: string, _isStaticChildren?: boolean, _source?: JSXSource, _self?: unknown): JSXNodeCreates a JSX element in development mode. The transform passes isStaticChildre…

Creates a JSX element in development mode.

The transform passes isStaticChildren, source and self for React's dev warnings; static HTML generation has no use for them.

Signature

export function jsxDEV(type: JSXElementType, props: JSXProps, key?: string, _isStaticChildren?: boolean, _source?: JSXSource, _self?: unknown): JSXNode

View source

Parameters

Returns

JSXNode
interfaceJSXSourceSource position the dev transform attaches to each element.

Source position the dev transform attaches to each element.

Signature

export interface JSXSource

View source

Members

Properties
NameTypeDescription
columnNumberoptional number
fileNameoptional string
lineNumberoptional number

Last updated: