mirror of
https://github.com/putyy/res-downloader.git
synced 2026-01-12 14:14:55 +08:00
22 lines
446 B
TypeScript
Executable File
22 lines
446 B
TypeScript
Executable File
export namespace core {
|
|
|
|
export class ResponseData {
|
|
code: number;
|
|
message: string;
|
|
data: any;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new ResponseData(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.code = source["code"];
|
|
this.message = source["message"];
|
|
this.data = source["data"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|