JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 102285
  • Score
    100M100P100Q160766F
  • License MIT

TypeScript definitions for depd

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/depd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Installation

    npm install --save @types/depd

    Summary

    This package contains type definitions for depd (https://github.com/dougwilson/nodejs-depd).

    Details

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

    index.d.ts

    // Type definitions for depd 1.1
    // Project: https://github.com/dougwilson/nodejs-depd
    // Definitions by: Zhiyuan Wang <https://github.com/danny8002>
    //                 BendingBender <https://github.com/BendingBender>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.2
    
    /// <reference types="node" />
    
    export = depd;
    
    declare function depd(namespace: string): depd.Deprecate;
    
    declare namespace depd {
        interface Deprecate {
            (message: string): void;
            // tslint:disable-next-line ban-types
            function<T extends Function>(fn: T, message?: string): T;
            property<T extends object>(obj: T, prop: keyof T, message: string): void;
        }
    
        interface DeprecationError extends Error {
            readonly name: "DeprecationError";
            namespace: string;
            stack: string;
        }
    }
    
    declare global {
        namespace NodeJS {
            interface Process {
                addListener(event: "deprecation", listener: (deprecationError: depd.DeprecationError) => void): this;
                emit(event: "deprecation", code: depd.DeprecationError): boolean;
                on(event: "deprecation", listener: (deprecationError: depd.DeprecationError) => void): this;
                once(event: "deprecation", listener: (deprecationError: depd.DeprecationError) => void): this;
                prependListener(event: "deprecation", listener: (deprecationError: depd.DeprecationError) => void): this;
                prependOnceListener(
                    event: "deprecation",
                    listener: (deprecationError: depd.DeprecationError) => void,
                ): this;
                listeners(event: "deprecation"): depd.DeprecationError[];
            }
        }
    }
    

    Additional Details

    • Last updated: Fri, 22 Sep 2023 20:29:40 GMT
    • Dependencies: @types/node
    • Global values: none

    Credits

    These definitions were written by Zhiyuan Wang, and BendingBender.