34 lines
993 B
TypeScript
34 lines
993 B
TypeScript
export namespace config {
|
|
|
|
export class Config {
|
|
url: string;
|
|
token: string;
|
|
has_video_token: string;
|
|
no_video_token: string;
|
|
thread_count: number;
|
|
handle_file_count: number;
|
|
is_run_on_start: boolean;
|
|
check_dir: string;
|
|
clear_files_no_prompt: boolean;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Config(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.url = source["url"];
|
|
this.token = source["token"];
|
|
this.has_video_token = source["has_video_token"];
|
|
this.no_video_token = source["no_video_token"];
|
|
this.thread_count = source["thread_count"];
|
|
this.handle_file_count = source["handle_file_count"];
|
|
this.is_run_on_start = source["is_run_on_start"];
|
|
this.check_dir = source["check_dir"];
|
|
this.clear_files_no_prompt = source["clear_files_no_prompt"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|