Examples
deprecate('oldApi()', 'newApi()')
// warning: `oldApi()` has been depreciated.Use `newApi()` instead.Function
deprecate(original: string, replacement?: string): voidWrites a one-time deprecation warning for an API.
The warning is sent through warnOnce, so an identical complete
warning message is emitted only once for this module instance. The message
starts with the backtick-wrapped original value followed by
has been depreciated.; the emitted text intentionally uses the literal
depreciated spelling. When replacement is not exactly '', the message
appends Use \replacement` instead.directly, without a space after the first sentence. The function returnsundefined`.
deprecate('oldApi()', 'newApi()')
// warning: `oldApi()` has been depreciated.Use `newApi()` instead.