UNPKG

@icebreakers/wxml

Version:

wxml parser and serializer. fork form wxml and improve. thanks to vivaxy and roadupcc

19 lines (18 loc) 494 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const base_1 = require("./base"); const node_types_1 = require("../types/node-types"); class TextNode extends base_1.default { textContent; constructor(text) { super(node_types_1.default.TEXT); this.textContent = text; } toJSON() { return { type: this.type, textContent: this.textContent }; } } exports.default = TextNode;