Download packages/coding-agent/src/utils/deprecation.ts from SaylorTwift/pi: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/SaylorTwift/pi/resolve/main/packages/coding-agent/src/utils/deprecation.ts
- Command line
-
hf download hf://SaylorTwift/pi/packages/coding-agent/src/utils/deprecation.ts
-
curl -L -o deprecation.ts https://huggingface.co/SaylorTwift/pi/resolve/main/packages/coding-agent/src/utils/deprecation.ts
461 Bytes
| import chalk from "chalk"; | |
| const emittedDeprecationWarnings = new Set<string>(); | |
| export function warnDeprecation(message: string): void { | |
| if (emittedDeprecationWarnings.has(message)) return; | |
| emittedDeprecationWarnings.add(message); | |
| console.warn(chalk.yellow(`Deprecation warning: ${message}`)); | |
| } | |
| /** Clear deprecation warning state. Exported for tests. */ | |
| export function clearDeprecationWarningsForTests(): void { | |
| emittedDeprecationWarnings.clear(); | |
| } | |