Noisy Pillaging Monster

    @jest/types
    TypeScript icon, indicating that this package has built-in type declarations

    28.1.1 • Public • Published

    @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;

    Keywords

    none

    Install

    npm i @jest/types

    DownloadsWeekly Downloads

    39,790,514

    Version

    28.1.1

    License

    MIT

    Unpacked Size

    31.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • rubennorte
    • fb
    • aaronabramov
    • scotthovestadt
    • davidzilburg
    • simenb