@fast-check/expect-type
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@fast-check/expect-type

Make sure your types are the ones you expect (similar to tsd)

npm version monthly downloads License


Easy to use

This package performs compilation time checks only. Running the check functions at runtime is a no-op.

import { expectType, expectTypeAssignable } from '@fast-check/expect-type';
// your code or you own imports

expectType<number>()(f(1, 2), 'expect the output of f when passed 1 and 2 to be number');
expectTypeAssignable<number>()(f(1, 2), 'expect the output of f when passed 1 and 2 to be assignable to number');

Install

npm i @fast-check/expect-type

DownloadsWeekly Downloads

228

Version

0.0.3

License

MIT

Unpacked Size

7.28 kB

Total Files

9

Last publish

Collaborators

  • ndubien