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

2.0.3 • Public • Published

Installation

npm install --save @types/mock-require

Summary

This package contains type definitions for mock-require (https://github.com/boblauer/mock-require).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mock-require.

index.d.ts

/// <reference types="node" />

type StubFunction = (...params: any[]) => any;
type Stub = object | StubFunction;

interface Mock {
    (path: string, mockExport: string | Stub): void;
    stop(path: string): void;
    stopAll(): void;
    reRequire(path: string): any;
}

declare var mock: Mock;

export = mock;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by .

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mock-require

Weekly Downloads

14,566

Version

2.0.3

License

MIT

Unpacked Size

3.07 kB

Total Files

5

Last publish

Collaborators

  • types