MCPcopy
hub / github.com/honojs/hono / toString

Function toString

src/helper/css/index.test.tsx:12–22  ·  view source on GitHub ↗
(
  template: JSXNode | Promise<HtmlEscapedString> | Promise<string> | HtmlEscapedString
)

Source from the content-addressed store, hash-verified

10import { Style, createCssContext, css, cx, keyframes, rawCssString, viewTransition } from './index'
11
12async function toString(
13 template: JSXNode | Promise<HtmlEscapedString> | Promise<string> | HtmlEscapedString
14) {
15 if (template instanceof Promise) {
16 template = (await template) as HtmlEscapedString
17 }
18 if (isValidElement(template)) {
19 template = template.toString() as Promise<HtmlEscapedString>
20 }
21 return resolveCallback(await template, HtmlEscapedCallbackPhase.Stringify, false, template)
22}
23
24async function toCSS(
25 template: JSXNode | Promise<HtmlEscapedString> | Promise<string> | HtmlEscapedString

Callers 3

renderTestFunction · 0.70
toCSSFunction · 0.70
index.test.tsxFile · 0.70

Calls 3

isValidElementFunction · 0.90
resolveCallbackFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…