Skip to content

Commit

Permalink
Add extra-typings to README (#1814)
Browse files Browse the repository at this point in the history
* Add mention of extra-typings

* Reword
  • Loading branch information
shadowspawn authored Oct 31, 2022
1 parent 0b4198d commit 1760b42
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,15 @@ program

### TypeScript

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.
extra-typings: There is an optional project to infer extra type information from the option and argument definitions.
This adds strong typing to the options returned by `.opts()` and the parameters to `.action()`.
See [commander-js/extra-typings](https://github.com/commander-js/extra-typings) for more.

```
import { Command } from '@commander-js/extra-typings';
```

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.

```sh
node -r ts-node/register pm.ts
Expand Down

0 comments on commit 1760b42

Please sign in to comment.