UNPKG

@space-cow-media/spellbook-client

Version:

An Open Api generated client for the Commander Spellbook backend REST API.

49 lines 1.47 kB
/* tslint:disable */ /* eslint-disable */ /** * Commander Spellbook API * API for Commander Spellbook, the combo database engine for Magic: The Gathering * * The version of the OpenAPI document: 5.4.10 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { CardInDeckFromJSON, CardInDeckToJSON, } from './CardInDeck.js'; /** * Check if a given object implements the Deck interface. */ export function instanceOfDeck(value) { if (!('main' in value) || value['main'] === undefined) return false; if (!('commanders' in value) || value['commanders'] === undefined) return false; return true; } export function DeckFromJSON(json) { return DeckFromJSONTyped(json, false); } export function DeckFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'main': (json['main'].map(CardInDeckFromJSON)), 'commanders': (json['commanders'].map(CardInDeckFromJSON)), }; } export function DeckToJSON(json) { return DeckToJSONTyped(json, false); } export function DeckToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'main': (value['main'].map(CardInDeckToJSON)), 'commanders': (value['commanders'].map(CardInDeckToJSON)), }; } //# sourceMappingURL=Deck.js.map