UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

32 lines 952 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AnnotationsDocument = void 0; const index_1 = require("./../index"); class AnnotationsDocument { constructor(data) { this.annotation = (data.annotation || []).map(index_1.Annotation.fromJson); } static getAnnotationDefault() { return []; } static getAnnotationDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new AnnotationsDocument(data); } toJson() { var _a; return { 'annotation': (_a = this.annotation) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), }; } clone() { return AnnotationsDocument.fromJson(this.toJson()); } } exports.AnnotationsDocument = AnnotationsDocument; //# sourceMappingURL=AnnotationsDocument.js.map