UNPKG

airship-server

Version:

Airship is a framework for Node.JS & TypeScript that helps you to write big, scalable and maintainable API servers.

32 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const AnyType_1 = require("./AnyType"); const BooleanType_1 = require("./BooleanType"); const CustomType_1 = require("./CustomType"); const NumberType_1 = require("./NumberType"); const StringType_1 = require("./StringType"); const VectorType_1 = require("./VectorType"); const ObjectType_1 = require("./ObjectType"); class Type { static deserialize(raw) { switch (raw['type']) { case 'AnyType': return AnyType_1.default.deserialize(raw); case 'BooleanType': return BooleanType_1.default.deserialize(raw); case 'CustomType': return CustomType_1.default.deserialize(raw); case 'NumberType': return NumberType_1.default.deserialize(raw); case 'StringType': return StringType_1.default.deserialize(raw); case 'VectorType': return VectorType_1.default.deserialize(raw); case 'ObjectType': return ObjectType_1.default.deserialize(raw); } throw 'UNKNOWN TYPE'; } } exports.Type = Type; //# sourceMappingURL=Type.js.map