airship-server
Version:
Airship is a framework for Node.JS & TypeScript that helps you to write big, scalable and maintainable API servers.
18 lines (14 loc) • 360 B
text/typescript
import {Type} from "./Type";
export default class CustomType implements Type {
constructor(readonly name: string) {
}
public serialize(): Object {
return {
type: 'CustomType',
name: this.name
}
}
public static deserialize(raw: any): CustomType {
return new CustomType(raw['name'])
}
}