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

0.1.5 • Public • Published

Installation

npm install --save @types/deep-freeze

Summary

This package contains type definitions for deep-freeze (https://github.com/substack/deep-freeze).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/deep-freeze.

index.d.ts

export = deepFreeze;

declare function deepFreeze<T>(a: T[]): ReadonlyArray<deepFreeze.DeepReadonly<T>>;
declare function deepFreeze<T extends Function>(f: T): T;
declare function deepFreeze<T>(o: T): deepFreeze.DeepReadonly<T>;

declare namespace deepFreeze {
    type DeepReadonly<T> = T extends (...args: any) => any ? T
        : { readonly [P in keyof T]: DeepReadonly<T[P]> };
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Bart van der Schoor, and Aluan Haddad.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/deep-freeze

Weekly Downloads

88,131

Version

0.1.5

License

MIT

Unpacked Size

3.54 kB

Total Files

5

Last publish

Collaborators

  • types