26 lines
597 B
TypeScript
Executable File
26 lines
597 B
TypeScript
Executable File
export namespace provider {
|
|
|
|
export class Game {
|
|
Title: string;
|
|
Developper: string;
|
|
Year: number;
|
|
Cartridge: string;
|
|
Description: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Game(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.Title = source["Title"];
|
|
this.Developper = source["Developper"];
|
|
this.Year = source["Year"];
|
|
this.Cartridge = source["Cartridge"];
|
|
this.Description = source["Description"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|