mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
jest-diff: Provides its own types (#39589)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
27cff735cb
commit
0acbec3d02
@@ -2148,6 +2148,12 @@
|
||||
"sourceRepoURL": "https://github.com/dmester/jdenticon",
|
||||
"asOfVersion": "2.2.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "jest-diff",
|
||||
"typingsPackageName": "jest-diff",
|
||||
"sourceRepoURL": "https://github.com/facebook/jest/tree/master/packages/jest-diff",
|
||||
"asOfVersion": "24.3.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "jest-get-type",
|
||||
"typingsPackageName": "jest-get-type",
|
||||
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// Type definitions for jest-diff 20.0
|
||||
// Project: https://github.com/facebook/jest/tree/master/packages/jest-diff, 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 diff {
|
||||
interface DiffOptions {
|
||||
aAnnotation?: string;
|
||||
bAnnotation?: string;
|
||||
expand?: boolean;
|
||||
contextLines?: number;
|
||||
}
|
||||
}
|
||||
|
||||
declare function diff(a: any, b: any, options?: diff.DiffOptions): string;
|
||||
|
||||
export = diff;
|
||||
@@ -1,42 +0,0 @@
|
||||
import diff = require('jest-diff');
|
||||
|
||||
diff([], ['a']); // $ExpectType string
|
||||
diff(false, true);
|
||||
diff(null, null);
|
||||
diff(1000, 1001);
|
||||
diff(/d+/, /w+/);
|
||||
diff(new Map(), new Map());
|
||||
diff(new Set(), new Set());
|
||||
diff(new Date(), new Date());
|
||||
diff('ts', 'js');
|
||||
diff(Symbol(), Symbol(1));
|
||||
diff(undefined, undefined);
|
||||
|
||||
diff([], ['a'], { }); // $ExpectType string
|
||||
diff([], ['a'], { expand: false }); // $ExpectType string
|
||||
diff([], ['a'], { contextLines: 3 }); // $ExpectType string
|
||||
// $ExpectType string
|
||||
diff([], ['a'], {
|
||||
aAnnotation: 'esperado',
|
||||
bAnnotation: 'recibido'
|
||||
});
|
||||
|
||||
diff(); // $ExpectError
|
||||
diff([]); // $ExpectError
|
||||
// diff([], {}, []); // $ExpectError (does not error on 2.3)
|
||||
|
||||
diff([], ['a'], { expand: false }); // $ExpectType string
|
||||
diff([], ['a'], { contextLines: 3 }); // $ExpectType string
|
||||
// $ExpectType string
|
||||
diff([], ['a'], {
|
||||
aAnnotation: 'esperado',
|
||||
bAnnotation: 'recibido'
|
||||
});
|
||||
|
||||
// $ExpectError
|
||||
diff([], ['a'], {
|
||||
expand: 'yeah',
|
||||
aAnnotation: false,
|
||||
bAnnotation: {},
|
||||
contextLines: 'two'
|
||||
});
|
||||
@@ -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-diff-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"jest-diff": "^24.3.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user