DefinitelyTyped/types/jest-get-type/jest-get-type-tests.ts
Alex Coles 6d187525fa [jest-diff] [jest-get-type] [jest-matcher-utils] Add typings (#20509)
* Add typings for jest-diff

* Add typings for jest-get-type

* Add typings for jest-matcher-utils

* Enable noImplicitThis option for jest-diff

* Enable noImplicitThis option for jest-get-type

* Enable noImplicitThis option for jest-matcher-utils

* Point jest-diff project URL to GitHub

* Point jest-get=type project URL to GitHub

* Point jest-matcher-utils project URL to GitHub

* Uncomment EXPECTED_BG, RECEIVED_BG variables

Although these variables have been removed on master of the
jest-matcher-utils repo, there has yet to be a release.

Add a TODO to indicate that a future update to these definitions will
be necessary.
2017-10-12 02:22:14 -07:00

18 lines
359 B
TypeScript

import getType = require('jest-get-type');
getType([]); // $ExpectType ValueType
getType(false);
getType(null);
getType(1000);
getType(/d+/);
getType(new Map());
getType(new Set());
getType(new Date());
getType('ts');
getType(Symbol());
getType(undefined);
getType(); // $ExpectError
getType([], undefined); // $ExpectError
getType([], ''); // $ExpectError