UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

39 lines 1.58 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GenericFileDataStore = void 0; const index_1 = require("./../index"); class GenericFileDataStore extends index_1.FileDataStore { constructor(data) { super(data); let fileContentDefault = ""; this.fileContent = typeof (data === null || data === void 0 ? void 0 : data.fileContent) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileContent : fileContentDefault; let fileNameDefault = "unknown.txt"; this.fileName = typeof (data === null || data === void 0 ? void 0 : data.fileName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileName : fileNameDefault; } static getFileContentDefault() { return ""; } static getFileContentDescription() { return "The actual content of the data storage file"; } static getFileNameDefault() { return "unknown.txt"; } static getFileNameDescription() { return "The name of the generic data storage file."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new GenericFileDataStore(data); } toJson() { return Object.assign(Object.assign({}, (super.toJson())), { 'fileContent': this.fileContent, 'fileName': this.fileName }); } clone() { return GenericFileDataStore.fromJson(this.toJson()); } } exports.GenericFileDataStore = GenericFileDataStore; //# sourceMappingURL=GenericFileDataStore.js.map