ts-json-schema-generator
Version:
Generate JSON schema from your Typescript sources
21 lines • 673 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParenthesizedNodeParser = void 0;
const ts = require("typescript");
class ParenthesizedNodeParser {
constructor(childNodeParser) {
this.childNodeParser = childNodeParser;
}
supportsNode(node) {
return node.kind === ts.SyntaxKind.ParenthesizedType;
}
createType(node, context) {
const type = this.childNodeParser.createType(node.type, context);
if (!type) {
return undefined;
}
return type;
}
}
exports.ParenthesizedNodeParser = ParenthesizedNodeParser;
//# sourceMappingURL=ParenthesizedNodeParser.js.map