tsd
- Version 0.33.0
- Published
- 94.9 kB
- 7 dependencies
- MIT license
Install
npm i tsdyarn add tsdpnpm add tsdOverview
Check TypeScript type definitions
Index
Functions
function _default
_default: (options?: Options) => Promise<Diagnostic[]>;Type check the type definition of the project.
Returns
A promise which resolves the diagnostics of the type definition.
function expectAssignable
expectAssignable: <T>(expression: T) => void;Asserts that the type of
expressionis assignable to typeT.Parameter expression
Expression that should be assignable to type
T.
function expectDeprecated
expectDeprecated: (expression: any) => void;Asserts that
expressionis marked as@deprecated.Parameter expression
Expression that should be marked as
@deprecated.
function expectDocCommentIncludes
expectDocCommentIncludes: <T>(expression: any) => void;Asserts that the documentation comment of
expressionincludes string literal typeT.Parameter expression
Expression whose documentation comment should include string literal type
T.
function expectError
expectError: <T = any>(expression: T) => void;Asserts that
expressionthrows an error. Will not ignore syntax errors.Parameter expression
Expression that should throw an error.
function expectNever
expectNever: (expression: never) => never;Asserts that the type and return type of
expressionisnever.Useful for checking that all branches are covered.
Parameter expression
Expression that should be
never.
function expectNotAssignable
expectNotAssignable: <T>(expression: any) => void;Asserts that the type of
expressionis not assignable to typeT.Parameter expression
Expression that should not be assignable to type
T.
function expectNotDeprecated
expectNotDeprecated: (expression: any) => void;Asserts that
expressionis not marked as@deprecated.Parameter expression
Expression that should not be marked as
@deprecated.
function expectNotType
expectNotType: <T>(expression: any) => void;Asserts that the type of
expressionis not identical to typeT.Parameter expression
Expression that should not be identical to type
T.
function expectType
expectType: <T>(expression: T) => void;Asserts that the type of
expressionis identical to typeT.Parameter expression
Expression that should be identical to type
T.
function formatter
formatter: (diagnostics: Diagnostic[], showDiff?: boolean) => string;Format the TypeScript diagnostics to a human readable output.
Parameter diagnostics
List of TypeScript diagnostics.
Parameter showDiff
Display difference between expected and received types.
Returns
Beautiful diagnostics output
function printType
printType: (expression: any) => void;Prints the type of
expressionas a warning.Parameter expression
Expression whose type should be printed as a warning.
Package Files (4)
Dependencies (7)
Dev Dependencies (16)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/tsd.
- Markdown[](https://www.jsdocs.io/package/tsd)
- HTML<a href="https://www.jsdocs.io/package/tsd"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2224 ms. - Missing or incorrect documentation? Open an issue for this package.
