File tree Expand file tree Collapse file tree
packages/common/decorators/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,9 @@ const metadataKeys = [
1010] ;
1111
1212const validateKeys = ( keys : string [ ] ) => {
13- const isKeyInvalid = ( key : string ) =>
14- metadataKeys . findIndex ( k => k === key ) < 0 ;
1513
1614 const validateKey = ( key : string ) => {
17- if ( ! isKeyInvalid ( key ) ) {
15+ if ( metadataKeys . includes ( key ) ) {
1816 return ;
1917 }
2018 throw new InvalidModuleConfigException ( key ) ;
@@ -28,7 +26,7 @@ const validateKeys = (keys: string[]) => {
2826 * - `controllers` - the list of controllers (e.g. HTTP controllers)
2927 * - `providers` - the list of providers that belong to this module. They can be injected between themselves.
3028 * - `exports` - the set of components, which should be available for modules, which imports this module
31- * @param options {ModuleMetadata} Module metadata
29+ * @param metadata {ModuleMetadata} Module metadata
3230 */
3331export function Module ( metadata : ModuleMetadata ) : ClassDecorator {
3432 const propsKeys = Object . keys ( metadata ) ;
You can’t perform that action at this time.
0 commit comments