deno.land / x / hono@v4.2.5 / jsx / jsx-dev-runtime.ts

jsx-dev-runtime.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import type { HtmlEscapedString } from '../utils/html.ts'import { jsxFn } from './base.ts'import type { JSXNode } from './base.ts'export { Fragment } from './base.ts'
export function jsxDEV( tag: string | Function, props: Record<string, unknown>, key?: string): JSXNode { let node: JSXNode if (!props || !('children' in props)) { node = jsxFn(tag, props, []) } else { const children = props.children as string | HtmlEscapedString delete props['children'] node = Array.isArray(children) ? jsxFn(tag, props, children) : jsxFn(tag, props, [children]) } node.key = key return node}
hono

Version Info

Tagged at
a month ago