DenReg/jsx-html/node/TextNode.ts
Fabian Stamm 1b2d85eeef
All checks were successful
continuous-integration/drone/push Build is passing
Adding hotfixes for packages
2020-10-14 02:56:11 +02:00

13 lines
283 B
TypeScript

import { NODE_TYPE } from '../constants.ts';
import { htmlEncode } from './utils/htmlEncode.ts';
export class TextNode {
type = NODE_TYPE.TEXT;
constructor(public text: string) {}
async render(): Promise<string | any[]> {
return htmlEncode(this.text);
}
}