mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-18 07:51:48 +08:00
Merge pull request #11899 from beckend/jest-it-callback-strictNullChecks-fix
[types-2.0] jest - It optional callback fix
This commit is contained in:
4
jest/index.d.ts
vendored
4
jest/index.d.ts
vendored
@@ -91,7 +91,7 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface ProvidesCallback {
|
||||
(cb?: DoneCallback): any;
|
||||
(cb: DoneCallback): any;
|
||||
}
|
||||
|
||||
interface Lifecycle {
|
||||
@@ -99,7 +99,7 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface It {
|
||||
(name: string, fn: ProvidesCallback): void;
|
||||
(name: string, fn?: ProvidesCallback): void;
|
||||
only: It;
|
||||
skip: It;
|
||||
concurrent: It;
|
||||
|
||||
@@ -358,3 +358,12 @@ describe('genMockFromModule', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Pass strictNullChecks
|
||||
*/
|
||||
describe('strictNullChecks', function () {
|
||||
it('does not complain when using done callback', (done) => {
|
||||
done();
|
||||
})
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user