jsx-dev-runtime.ts
This file
Path
src/jsx/dom/jsx-dev-runtime.ts
23 lines · 685 bytes · TypeScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–23why, one step back1/**2 * @module3 * This module provides the `hono/jsx/dom` dev runtime.4 */56import type { JSXNode, Props } from '../base'7export type { JSX } from '../base'8import * as intrinsicElementTags from './intrinsic-element/components'910export const jsxDEV = (tag: string | Function, props: Props, key?: string): JSXNode => {11 if (typeof tag === 'string' && intrinsicElementTags[tag as keyof typeof intrinsicElementTags]) {12 tag = intrinsicElementTags[tag as keyof typeof intrinsicElementTags]13 }14 return {15 tag,16 type: tag,17 props,18 key,19 ref: props.ref,20 } as JSXNode21}2223export const Fragment = (props: Record<string, unknown>): JSXNode => jsxDEV('', props, undefined)