52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
/**
|
|
Deprecate a function
|
|
|
|
@param {Book|Output} book
|
|
@param {string} key: unique identitifer for the deprecated
|
|
@param {Function} fn
|
|
@param {string} msg: message to print when called
|
|
@return {Function}
|
|
*/
|
|
declare function deprecateMethod(book: any, key: any, fn: any, msg: any): () => any;
|
|
/**
|
|
Deprecate a property of an object
|
|
|
|
@param {Book|Output} book
|
|
@param {string} key: unique identitifer for the deprecated
|
|
@param {Object} instance
|
|
@param {String|Function} property
|
|
@param {string} msg: message to print when called
|
|
@return {Function}
|
|
*/
|
|
declare function deprecateField(book: any, key: any, instance: any, property: any, value: any, msg: any): void;
|
|
/**
|
|
Enable a deprecation
|
|
|
|
@param {string} key: unique identitifer
|
|
*/
|
|
declare function enableDeprecation(key: any): void;
|
|
/**
|
|
Disable a deprecation
|
|
|
|
@param {string} key: unique identitifer
|
|
*/
|
|
declare function disableDeprecation(key: any): void;
|
|
/**
|
|
Deprecate a method in favor of another one
|
|
|
|
@param {Book} book
|
|
@param {string} key
|
|
@param {Object} instance
|
|
@param {string} oldName
|
|
@param {string} newName
|
|
*/
|
|
declare function deprecateRenamedMethod(book: any, key: any, instance: any, oldName: any, newName: any, msg: any): void;
|
|
declare const _default: {
|
|
method: typeof deprecateMethod;
|
|
renamedMethod: typeof deprecateRenamedMethod;
|
|
field: typeof deprecateField;
|
|
enable: typeof enableDeprecation;
|
|
disable: typeof disableDeprecation;
|
|
};
|
|
export default _default;
|
|
//# sourceMappingURL=deprecate.d.ts.map
|