freeze module after plugins, updateModule, and more

This commit is contained in:
Jacob Nguyen
2024-05-17 20:16:16 -05:00
parent 6717672722
commit 960f90c544
5 changed files with 34 additions and 26 deletions

View File

@@ -14,8 +14,8 @@ import { PayloadType, PluginType } from './structures/enums';
import assert from 'assert';
import type { Payload } from '../types/utility';
export const ok = (val: unknown) => Ok(val);
export const err = (val: string) => Err(val);
export const ok = (val: unknown=undefined) => Ok(val);
export const err = (val?: string) => Err(val);
export function partitionPlugins<T,V>
(arr: Array<{ type: PluginType }> = []): [T[], V[]] {