refactor: a lot

This commit is contained in:
Jacob Nguyen
2023-05-15 17:35:38 -05:00
parent 423b0d2aa7
commit 8f39fc0896
5 changed files with 26 additions and 13 deletions

View File

@@ -27,7 +27,6 @@ export async function defaultModuleLoader<T extends Module>(absPath: string): Mo
module = module.getInstance();
}
//todo readd class modules
assert.ok(module.type > 0 && module.type < 1<<10, 'Found a module that does not have a valid type');
return Ok({ module, absPath });
}

View File

@@ -1,10 +1,12 @@
import { CoreModuleStore } from '../contracts';
import { Module, CommandMeta } from '../types/modules';
/*
* @internal
* Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
* For interacting with ModuleStore, use CoreModuleStore contract.
* For interacting with modules, use the ModuleManager instead.
*/
export class ModuleStore implements CoreModuleStore {
metadata = new WeakMap<Module, CommandMeta>();
commands = new Map<string, string>();
}