@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
43 lines • 1.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConverterText = void 0;
const index_1 = require("./../index");
class ConverterText {
constructor(data) {
this.syntaxHighlight = index_1.SyntaxHighlight.fromJson(data === null || data === void 0 ? void 0 : data.syntaxHighlight);
this.textHighlight = index_1.TextHighlight.fromJson(data === null || data === void 0 ? void 0 : data.textHighlight);
let useSyntaxDetectionDefault = false;
this.useSyntaxDetection = typeof (data === null || data === void 0 ? void 0 : data.useSyntaxDetection) !== "undefined" ? data === null || data === void 0 ? void 0 : data.useSyntaxDetection : useSyntaxDetectionDefault;
}
static getSyntaxHighlightDescription() {
return "";
}
static getTextHighlightDescription() {
return "";
}
static getUseSyntaxDetectionDefault() {
return false;
}
static getUseSyntaxDetectionDescription() {
return "If this value is set to \"true\", syntax highlighting and language detection will be enabled.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ConverterText(data);
}
toJson() {
var _a, _b;
return {
'syntaxHighlight': (_a = this.syntaxHighlight) === null || _a === void 0 ? void 0 : _a.toJson(),
'textHighlight': (_b = this.textHighlight) === null || _b === void 0 ? void 0 : _b.toJson(),
'useSyntaxDetection': this.useSyntaxDetection,
};
}
clone() {
return ConverterText.fromJson(this.toJson());
}
}
exports.ConverterText = ConverterText;
//# sourceMappingURL=ConverterText.js.map