warn
The warn method logs warning messages to the terminal using console.warn with an automatic yellow color applied to all string arguments. Non-string arguments are passed through unchanged.
Signature
betterConsole.warn(...args: any[]): void
Parameters
...args: One or more values to log. String arguments are automatically styled with yellow color.
Usage
import betterConsole from "ts-better-console";
// Log a warning message (displayed in yellow)
betterConsole.warn("Deprecated API usage detected");
// Log multiple arguments
betterConsole.warn("Memory usage high:", "85%");
// Mix string and non-string arguments
betterConsole.warn("Retries remaining:", 3);
Want to support this project?
If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.
Want to contribute to this project?
Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!