mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 21:17:59 +00:00
36 lines
869 B
TypeScript
Executable File
36 lines
869 B
TypeScript
Executable File
export namespace app {
|
|
|
|
export class Settings {
|
|
defaultLimit: number;
|
|
defaultSort: string;
|
|
autosubmitQuery: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Settings(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.defaultLimit = source["defaultLimit"];
|
|
this.defaultSort = source["defaultSort"];
|
|
this.autosubmitQuery = source["autosubmitQuery"];
|
|
}
|
|
}
|
|
export class findResult {
|
|
total: number;
|
|
results: any;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new findResult(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.total = source["total"];
|
|
this.results = source["results"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|