jsx-dev-runtime.ts#
3 documented symbols. Read the signatures first, then expand each item for parameters, return types, and 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.
Examples
{ "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): JSXNodeParameters
-
typeJSXElementType -
propsJSXProps -
keystringoptional
-
_isStaticChildrenbooleanoptional
-
_sourceJSXSourceoptional
-
_selfunknownoptional
Returns
interfaceJSXSourceSource position the dev transform attaches to each element.
Source position the dev transform attaches to each element.
Signature
export interface JSXSourceMembers
Properties
| Name | Type | Description |
|---|---|---|
columnNumberoptional |
number |
|
fileNameoptional |
string |
|
lineNumberoptional |
number |