Loxer.init({ modules: { PERS, DB } }); // ✔ Loxer.init({ modules: { PERS, DB, NONE } }); // ✔ - a built-in module, overwritten Loxer.init({ modules: { PERS } }); // ✘ - 'DB' is registered but not defined Loxer.init({ modules: { PERS, DB, PRES } }); // ✘ - 'PRES' is not a registered module id
The type parameter carries the object that is passed in, which is what lets an unregistered id be
reported even when that object is declared elsewhere and handed over as a variable: its key
resolves to never. An object typed by a : LoxerModules annotation carries an index signature
instead of its keys and can therefore not be checked at all - declare it with
satisfies LoxerModules to keep its keys.
The modules Loxer.init accepts, checked against the LoxerModuleRegistry.
The type parameter carries the object that is passed in, which is what lets an unregistered id be reported even when that object is declared elsewhere and handed over as a variable: its key resolves to
never. An object typed by a: LoxerModulesannotation carries an index signature instead of its keys and can therefore not be checked at all - declare it withsatisfies LoxerModulesto keep its keys.