0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 11:51:01 +01:00
hono/deno_dist/middleware/jsx/jsx-dev-runtime.ts
Jayden 760ae30251
Fix detecting node runtime (#696)
* Fix

* Denoify

* Avoid error in other runtime

* chore: remove unnecessary config testPathIgnorePatterns (#697)

* Fix vercel

Co-authored-by: Horie Issei <issei.horie@is2ei.com>
2022-12-02 11:28:49 +09:00

11 lines
403 B
TypeScript

import type { HtmlEscapedString } from '../../utils/html.ts'
import { jsx } from './index.ts'
import type { JSXNode } from './index.ts'
export { Fragment } from './index.ts'
export function jsxDEV(tag: string | Function, props: Record<string, unknown>): JSXNode {
const children = (props.children ?? []) as (string | HtmlEscapedString)
delete props['children']
return jsx(tag, props, children)
}