0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

refactor(jsx): add override to toStringToBuffer in classes extending JSXNode (#3505)

This commit is contained in:
Yusuke Wada 2024-10-11 16:45:19 +09:00 committed by GitHub
parent de7827ee27
commit 04e5897b7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,7 +242,7 @@ export class JSXNode implements HtmlEscaped {
} }
class JSXFunctionNode extends JSXNode { class JSXFunctionNode extends JSXNode {
toStringToBuffer(buffer: StringBufferWithCallbacks): void { override toStringToBuffer(buffer: StringBufferWithCallbacks): void {
const { children } = this const { children } = this
const res = (this.tag as Function).call(null, { const res = (this.tag as Function).call(null, {
@ -284,7 +284,7 @@ class JSXFunctionNode extends JSXNode {
} }
export class JSXFragmentNode extends JSXNode { export class JSXFragmentNode extends JSXNode {
toStringToBuffer(buffer: StringBufferWithCallbacks): void { override toStringToBuffer(buffer: StringBufferWithCallbacks): void {
childrenToStringToBuffer(this.children, buffer) childrenToStringToBuffer(this.children, buffer)
} }
} }