@jest/types (28.1.3)

Published 2026-02-24 13:49:42 +00:00 by atheaadmin

Installation

@jest:registry=
npm install @jest/types@28.1.3
"@jest/types": "28.1.3"

About this package

@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 {Config} from '@jest/types';

const config: Config.InitialOptions = {
  // some typed config
};

export default config;

Dependencies

Dependencies

ID Version
@jest/schemas ^28.1.3
@types/istanbul-lib-coverage ^2.0.0
@types/istanbul-reports ^3.0.0
@types/node *
@types/yargs ^17.0.8
chalk ^4.0.0

Development Dependencies

ID Version
@tsd/typescript ~4.7.4
tsd-lite ^0.5.6
Details
npm
2026-02-24 13:49:42 +00:00
0
MIT
latest
7.9 KiB
Assets (1)
Versions (2) View all
28.1.3 2026-02-24
27.5.1 2026-02-24