Skip to content

Commit

Permalink
Update apps/docs/src/pages/en/features/commander.md
Browse files Browse the repository at this point in the history
Co-authored-by: Jay McDoniel <[email protected]>
  • Loading branch information
tkow and jmcdo29 authored Dec 25, 2022
1 parent a3d5bf7 commit dfdf7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/docs/src/pages/en/features/commander.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Though you'll find the implementation details in the [factory page](./factory),
export class AppModule {}
```

If you have many sub commands and nested directories for that, you may feel tough to import all of them though we can use nestjs module system resolution rules. For the case, static `regsiterWithSubCommands` method available in which the class inheriting `CommandRunner` returns list of itself and all sub commands in the scope it can traverse `subcommands` property of `@Command` and `@SubCommand` recursively from root command class which calls `regsiterWithSubCommands`. This means you can write the setting like followed by example instead of the previous example.
If you have many sub commands and nested directories for that, it may feel tough to import all of them. For this case, the static `regsiterWithSubCommands` method is available in all classes inheriting `CommandRunner` which returns a list of itself and all sub commands. This means you can write the setting like followed by example instead of the previous example.

```typescript title="src/app.module.ts"
@Module({
Expand Down

0 comments on commit dfdf7cd

Please sign in to comment.