@jest/types

popular js
Version 30.0.1 License MIT
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 30.0.1
- 30.0.0
- 29.6.3
- 29.6.1
- 29.6.0
- 29.5.0
- 29.4.3
- 29.4.2
- 29.4.1
- 29.4.0
- 29.3.1
- 29.2.1
- 29.2.0
- 29.1.2
- 29.1.0
- 29.0.3
- 29.0.2
- 29.0.1
- 29.0.0
- 28.1.3
- 28.1.1
- 28.1.0
- 28.0.2
- 28.0.1
- 28.0.0
- 27.5.1
- 27.5.0
- 27.4.2
- 27.4.1
- 27.4.0
- 27.2.5
- 27.2.4
- 27.2.3
- 27.1.1
- 27.1.0
- 27.0.6
- 27.0.2
- 27.0.1
- 26.6.2
- 26.6.1
- 26.6.0
- 26.5.2
- 26.5.0
- 26.3.0
- 26.2.0
- 26.1.0
- 26.0.1
- 26.0.0
- 25.5.0
- 25.4.0
- 25.3.0
- 25.2.6
- 25.2.5
- 25.2.3
- 25.2.1
- 25.2.0
- 25.1.0
- 25.0.0
- 24.9.0
- 24.8.0
- 24.7.0
- 24.6.0
- 24.5.0
- 24.3.0
- 30.0.0-beta.8
- 30.0.0-beta.7
- 30.0.0-beta.6
- 30.0.0-beta.3
- 30.0.0-alpha.7
- 30.0.0-alpha.6
- 30.0.0-alpha.5
- 30.0.0-alpha.4
- 30.0.0-alpha.3
- 30.0.0-alpha.2
- 30.0.0-alpha.1
- 29.0.0-alpha.6
- 29.0.0-alpha.4
- 29.0.0-alpha.3
- 29.0.0-alpha.2
- 29.0.0-alpha.0
- 28.0.0-alpha.9
- 28.0.0-alpha.8
- 28.0.0-alpha.7
- 28.0.0-alpha.6
- 28.0.0-alpha.5
- 28.0.0-alpha.4
- 28.0.0-alpha.3
- 28.0.0-alpha.2
- 28.0.0-alpha.1
- 28.0.0-alpha.0
- 27.0.0-next.10
- 27.0.0-next.8
- 27.0.0-next.7
- 27.0.0-next.3
- 27.0.0-next.1
- 27.0.0-next.0
- 26.0.1-alpha.0
- 26.0.0-alpha.2
- 26.0.0-alpha.1
- 26.0.0-alpha.0
- 25.2.1-alpha.2
- 25.2.1-alpha.1
- 25.2.0-alpha.86
- 24.2.0-alpha.0
@jest/types
This package contains shared types of Jest's packages.
If you are looking for types of Jest globals, you can import them from @jest/globals
package:
import {describe, expect, it} from '@jest/globals';
describe('my tests', () => {
it('works', () => {
expect(1).toBe(1);
});
});
If you prefer to omit imports, a similar result can be achieved installing the @types/jest package. Note that this is a third party library maintained at DefinitelyTyped and may not cover the latest Jest features.
Another use-case for @types/jest
is a typed Jest config as those types are not provided by Jest out of the box:
// jest.config.ts
import type {Config} from '@jest/types';
const config: Config.InitialOptions = {
// some typed config
};
export default config;