type alias

This commit is contained in:
Jacob Nguyen
2023-09-09 11:39:04 -05:00
parent 4591471e7e
commit c7ee2736b8
11 changed files with 30 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ import type {
CommandModule,
CommandModuleDefs,
Module,
OnError,
} from '../../types/core-modules';
import { CommandType } from '../structures';
@@ -12,8 +13,8 @@ interface MetadataAccess {
}
interface OnErrorAccess {
getErrorCallback(m: Module): Record<string,Function>|undefined;
setErrorCallback(m: Module, c: Record<string,Function>): void;
getErrorCallback(m: Module): OnError;
setErrorCallback(m: Module, c: NonNullable<OnError>): void;
}
/**
* @since 2.0.0

View File

@@ -1,4 +1,4 @@
import type { CommandMeta, Module } from '../../types/core-modules';
import type { CommandMeta, Module, OnError } from '../../types/core-modules';
/**
* Represents a core module store that stores IDs mapped to file paths.
@@ -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, Record<string,Function>>;
onError: WeakMap<Module, NonNullable<OnError>>;
}