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

1.1.2 • Public • Published

Installation

npm install --save @types/deprecate

Summary

This package contains type definitions for deprecate (https://github.com/brianc/node-deprecate).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/deprecate.

index.d.ts

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

declare namespace deprecate {
    /**
     * Set to false to not output a color. Defaults to '\x1b[31;1m' which is red.
     */
    let color: string;

    /**
     * Set to false to do nothing at all when the deprecate method is called. Useful in tests of the library you're deprecating things within.
     */
    let silence: boolean;

    /**
     * The stream to which output is written. Defaults to process.stderr
     */
    let stream: NodeJS.WriteStream;
}

/**
 * Call deprecate within a function you are deprecating.
 *
 * It will spit out all the messages to the console the first time and only the first time the method is called.
 */
declare function deprecate(methodName: string, ...message: string[]): void;

export = deprecate;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Toilal.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/deprecate

Weekly Downloads

25,397

Version

1.1.2

License

MIT

Unpacked Size

4.15 kB

Total Files

5

Last publish

Collaborators

  • types