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

1.0.2 • Public • Published

Installation

npm install --save @types/mock-property

Summary

This package contains type definitions for mock-property (https://github.com/ljharb/mock-property#readme).

Details

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

index.d.ts

type RestoreFunction = () => void;

declare function mockProperty(
    obj: object,
    prop: PropertyKey,
    options?:
        | { delete: true }
        | (
            & { nonEnumerable?: boolean; delete?: false }
            & (
                | { nonWritable?: boolean; value?: unknown }
                | { get?: (() => unknown) | undefined; set?: ((v: unknown) => void) | undefined }
            )
        ),
): RestoreFunction;

export = mockProperty;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Jordan Harband.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mock-property

Weekly Downloads

1,573

Version

1.0.2

License

MIT

Unpacked Size

3.5 kB

Total Files

5

Last publish

Collaborators

  • types