UNPKG

tiny-types

Version:

A tiny library that brings Tiny Types to JavaScript and TypeScript

12 lines (11 loc) 633 B
export type Logger = (_: string) => void; /** * @desc A decorator to mark a class, method or function as deprecated and make it log a warning whenever it is used. * Please see the tests for examples of usage. * * @param {string} message - describes the alternative implementation that should be used instead * of the deprecated method/function/class * @param {Logger} log - a function that handles the printing of the message, * such as {@link console.warn} */ export declare function deprecated(message?: string, log?: Logger): (target: any, propertyKey?: string, descriptor?: any) => any;