0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-25 13:19:30 +01:00
hono/deno_dist/jsx/jsx-runtime.ts
Taku Amano 652ef7c867
feat(jsx): Define jsxTemplate/jsxAttr/jsxEscape for "@jsx precompile" of Deno 1.38 (#1651)
* fix(jsx/streaming): Fix for renderToReadableStream(promise: Promise<HtmlEscapedString>).

* feat(jsx): Define jsxTemplate/jsxAttr/jsxEscape for "@jsx precompile" of Deno 1.38

* chore: denoify

* fix(jsx/streaming): some times jsxDEV is called with null props.

* test(deno-jsx): Add runtime tests for JSX by Deno.

* test: Refactor import map.

* test: Added @jsxImportSource to avoid type warnings
2023-11-08 21:07:35 +09:00

8 lines
347 B
TypeScript

export { jsxDEV as jsx, Fragment } from './jsx-dev-runtime.ts'
export { jsxDEV as jsxs } from './jsx-dev-runtime.ts'
import { raw, html } from '../helper/html/index.ts'
export { html as jsxTemplate }
export const jsxAttr = (name: string, value: string) => raw(name + '="' + html`${value}` + '"')
export const jsxEscape = (value: string) => value