fix & refactor: no longer merge config data and loader; use static imports to represent config struct
This commit is contained in:
1 parent
17aa7f7df8
commit
e78ca3f2bb
4 files changed
+21
-56
No files matched your search
@@ -1,15 +1,11 @@
|
||||
import { ConfigBase } from "@/common/utils/ConfigBase";
|
||||
import { LogLevel } from "@/common/utils/log";
|
||||
import napCatDefaultConfig from '@/core/external/napcat.json';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
||||
export interface NapCatConfig {
|
||||
fileLog: boolean,
|
||||
consoleLog: boolean,
|
||||
fileLogLevel: LogLevel,
|
||||
consoleLogLevel: LogLevel,
|
||||
}
|
||||
export type NapCatConfig = typeof napCatDefaultConfig;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
||||
export class NapCatConfig extends ConfigBase<NapCatConfig> {
|
||||
export class NapCatConfigLoader extends ConfigBase<NapCatConfig> {
|
||||
name = 'napcat';
|
||||
}
|
||||
Reference in new issue
Block a user