Skip to content

Commit 1760b42

Browse files
authored
Add extra-typings to README (#1814)
* Add mention of extra-typings * Reword
1 parent 0b4198d commit 1760b42

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,15 @@ program
10111011

10121012
### TypeScript
10131013

1014-
If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g.
1014+
extra-typings: There is an optional project to infer extra type information from the option and argument definitions.
1015+
This adds strong typing to the options returned by `.opts()` and the parameters to `.action()`.
1016+
See [commander-js/extra-typings](https://github.com/commander-js/extra-typings) for more.
1017+
1018+
```
1019+
import { Command } from '@commander-js/extra-typings';
1020+
```
1021+
1022+
ts-node: If you use `ts-node` and stand-alone executable subcommands written as `.ts` files, you need to call your program through node to get the subcommands called correctly. e.g.
10151023

10161024
```sh
10171025
node -r ts-node/register pm.ts

0 commit comments

Comments
 (0)