mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Introduce type definitions for jest-expect-message (#34890)
* Introduce type definitions for jest-expect-message * Fix review comment (remove declare global)
This commit is contained in:
parent
93b2b363a1
commit
1e697cb6e6
13
types/jest-expect-message/index.d.ts
vendored
Normal file
13
types/jest-expect-message/index.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Type definitions for jest-expect-message 1.0
|
||||
// Project: https://github.com/mattphillips/jest-expect-message#readme
|
||||
// Definitions by: Mike Davydov <https://github.com/mike-d-davydov>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.4
|
||||
|
||||
/// <reference types="jest"/>
|
||||
|
||||
declare namespace jest {
|
||||
interface Expect {
|
||||
<T = any>(actual: T, message: string): Matchers<T>;
|
||||
}
|
||||
}
|
||||
6
types/jest-expect-message/jest-expect-message-tests.ts
Normal file
6
types/jest-expect-message/jest-expect-message-tests.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import 'jest';
|
||||
import 'jest-expect-message';
|
||||
|
||||
declare const expect: jest.Expect;
|
||||
|
||||
expect(2, "Two is always two").toBe(2);
|
||||
23
types/jest-expect-message/tsconfig.json
Normal file
23
types/jest-expect-message/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"jest-expect-message-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/jest-expect-message/tslint.json
Normal file
3
types/jest-expect-message/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user