mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
update onError to be record
This commit is contained in:
@@ -12,12 +12,12 @@ interface MetadataAccess {
|
||||
}
|
||||
|
||||
interface OnErrorAccess {
|
||||
getErrorCallback(m: Module): Function|undefined;
|
||||
setErrorCallback(m: Module, c: Function): void;
|
||||
getErrorCallback(m: Module): Record<string,Function>|undefined;
|
||||
setErrorCallback(m: Module, c: Record<string,Function>): void;
|
||||
}
|
||||
/**
|
||||
* @since 2.0.0
|
||||
* @deprecated - direct access to the module manager will be removed in version 4
|
||||
* @internal - direct access to the module manager will be removed in version 4
|
||||
*/
|
||||
export interface ModuleManager extends MetadataAccess, OnErrorAccess {
|
||||
get(id: string): string | undefined;
|
||||
|
||||
@@ -6,5 +6,5 @@ import type { CommandMeta, Module } from '../../types/core-modules';
|
||||
export interface CoreModuleStore {
|
||||
commands: Map<string, string>;
|
||||
metadata: WeakMap<Module, CommandMeta>;
|
||||
onError: WeakMap<Module, Function>;
|
||||
onError: WeakMap<Module, Record<string,Function>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user