Many issues have been opened expressing confusion about error messages (#151, #92, etc.) or requesting more configuration (#150, #132). This PR adds documentation about tsd CLI usage (such as why the infamous The type definition `index.d.ts` does not exist. Create one and try again. appears) and improves the error messages to be more verbose.
In addition, it also exposes the typingsFile and testFiles options to the CLI via flags:
Both have short-form aliases. I've also added aliases for --help and --version, and added all four to the CLI help message:
Usage
$ tsd [path]
The given directory must contain a package.json and a typings file.
Info
--help, -h Display help text
--version, -v Display version info
Options
--typings, -t Type definition file to test [Default: "types" property in package.json]
--files, -f Glob of files to test [Default: /path/test-d/**/*.test-d.ts or .tsx]
Examples
$ tsd /path/to/project
$ tsd --files /test/some/folder/*.ts --files /test/other/folder/*.tsx
$ tsd
index.test-d.ts
✖ 10:20 Argument of type string is not assignable to parameter of type number.
This would close #151, close #150, and close #132.
Many issues have been opened expressing confusion about error messages (#151, #92, etc.) or requesting more configuration (#150, #132). This PR adds documentation about
tsd
CLI usage (such as why the infamousThe type definition `index.d.ts` does not exist. Create one and try again.
appears) and improves the error messages to be more verbose.In addition, it also exposes the
typingsFile
andtestFiles
options to the CLI via flags:Both have short-form aliases. I've also added aliases for
--help
and--version
, and added all four to the CLI help message:This would close #151, close #150, and close #132.