Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 19x 19x 2x 2x 1x 1x 1x 1x 19x | const shownRegistry = new WeakMap<any, true>(); export type Logger = (msg: string) => void; I export function showDeprecationWarning( message: string, uniqueIdentifier?: any, loEgger: Logger = console.log, ) { if (uniqueIdentifier && shownRegistry.has(uniqueIdentifier)) { return; } if (uniqueIdentifier) { shownRegistry.set(uniqueIdentifier, true); } logger(`@Deprecation warning: ${message}`); } |