jest-get-type: Provides its own types (#39586)

This commit is contained in:
Alexander T
2019-11-04 21:31:36 +02:00
committed by Nathan Shively-Sanders
parent c55b373d90
commit 9f0ffedbe0
5 changed files with 6 additions and 69 deletions

View File

@@ -1998,6 +1998,12 @@
"sourceRepoURL": "https://github.com/dmester/jdenticon",
"asOfVersion": "2.2.0"
},
{
"libraryName": "jest-get-type",
"typingsPackageName": "jest-get-type",
"sourceRepoURL": "https://github.com/facebook/jest/tree/master/packages/jest-get-type",
"asOfVersion": "24.2.0"
},
{
"libraryName": "jest-each",
"typingsPackageName": "jest-each",

View File

@@ -1,26 +0,0 @@
// Type definitions for jest-get-type 21.0
// Project: https://github.com/facebook/jest/tree/master/packages/jest-get-type, https://github.com/facebook/jest
// Definitions by: Alex Coles <https://github.com/myabc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare namespace getType {
type ValueType =
| 'array'
| 'boolean'
| 'function'
| 'null'
| 'number'
| 'object'
| 'regexp'
| 'map'
| 'set'
| 'date'
| 'string'
| 'symbol'
| 'undefined';
}
declare function getType(value: any): getType.ValueType;
export = getType;

View File

@@ -1,17 +0,0 @@
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

View File

@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"jest-get-type-tests.ts"
]
}

View File

@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}