UNPKG

wallee

Version:
39 lines (38 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfLabel = instanceOfLabel; exports.LabelFromJSON = LabelFromJSON; exports.LabelFromJSONTyped = LabelFromJSONTyped; exports.LabelToJSON = LabelToJSON; exports.LabelToJSONTyped = LabelToJSONTyped; const LabelDescriptor_1 = require("./LabelDescriptor"); /** * Check if a given object implements the Label interface. */ function instanceOfLabel(value) { return true; } function LabelFromJSON(json) { return LabelFromJSONTyped(json, false); } function LabelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'contentAsString': json['contentAsString'] == null ? undefined : json['contentAsString'], 'descriptor': json['descriptor'] == null ? undefined : (0, LabelDescriptor_1.LabelDescriptorFromJSON)(json['descriptor']), 'content': json['content'] == null ? undefined : json['content'], }; } function LabelToJSON(json) { return LabelToJSONTyped(json, false); } function LabelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'descriptor': (0, LabelDescriptor_1.LabelDescriptorToJSON)(value['descriptor']), }; }