@bitblit/ratchet-misc
Version:
Ratchet miscellaneous tooling that requires smallish dependant libraries
32 lines • 1.11 kB
JavaScript
import { exists } from '../runtime.js';
import { GetChildrenListChildrenInnerFromJSON, GetChildrenListChildrenInnerToJSON } from './GetChildrenListChildrenInner.js';
export function instanceOfGetChildrenList(value) {
let isInstance = true;
isInstance = isInstance && 'count' in value;
return isInstance;
}
export function GetChildrenListFromJSON(json) {
return GetChildrenListFromJSONTyped(json, false);
}
export function GetChildrenListFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
children: !exists(json, 'children') ? undefined : json['children'].map(GetChildrenListChildrenInnerFromJSON),
count: json['count'],
};
}
export function GetChildrenListToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
children: value.children === undefined ? undefined : value.children.map(GetChildrenListChildrenInnerToJSON),
count: value.count,
};
}
//# sourceMappingURL=GetChildrenList.js.map