UNPKG

airship-server

Version:

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

27 lines (23 loc) 581 B
import {Type} from "../types/Type"; export default class ClassField { constructor( readonly name: string, readonly type: Type, readonly description: string ) { } public serialize(): Object { return { name: this.name, type: this.type.serialize(), description: this.description } } public static deserialize(raw: any): ClassField { return new ClassField( raw['name'], Type.deserialize(raw['type']), raw['description'] ) } }