UNPKG

ts-json-schema-generator

Version:

Generate JSON schema from your Typescript sources

12 lines 542 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.preserveAnnotation = void 0; const AnnotatedType_js_1 = require("../Type/AnnotatedType.js"); function preserveAnnotation(originalType, newType) { if (originalType instanceof AnnotatedType_js_1.AnnotatedType) { return new AnnotatedType_js_1.AnnotatedType(newType, originalType.getAnnotations(), originalType.isNullable()); } return newType; } exports.preserveAnnotation = preserveAnnotation; //# sourceMappingURL=preserveAnnotation.js.map