core: typo fix

This commit is contained in:
undefined committed 2021-08-07 12:20:03 +08:00
1 parent c3190551dd
commit 77c4f6dd27
7 files changed
+17 -17

No files matched your search

+4 -4
View File
@@ -36,10 +36,10 @@ export function getMany(keys: string[]): any[] {
return keys.map((key) => cache[key]);
}
export async function set<K extends keyof SystemKeys>(_id: K, value: SystemKeys[K], boardcast?: boolean): Promise<SystemKeys[K]>;
export async function set<K>(_id: string, value: K, boardcast?: boolean): Promise<K>;
export async function set(_id: string, value: any, boardcast = true) {
if (boardcast) bus.boardcast('system/setting', { [_id]: value });
export async function set<K extends keyof SystemKeys>(_id: K, value: SystemKeys[K], broadcast?: boolean): Promise<SystemKeys[K]>;
export async function set<K>(_id: string, value: K, broadcast?: boolean): Promise<K>;
export async function set(_id: string, value: any, broadcast = true) {
if (broadcast) bus.broadcast('system/setting', { [_id]: value });
const res = await coll.findOneAndUpdate(
{ _id },
{ $set: { value } },