first-commit
Some checks failed
CI Pipeline / build (push) Failing after 3m23s

This commit is contained in:
2025-08-27 14:05:33 +08:00
commit 9e1b8bdc9d
5159 changed files with 1081326 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
let _emitDeprecation = 3;
let _emitError = false;
function enableDeprecationWarnings(emitDeprecation = true, emitError = false) {
_emitDeprecation = emitDeprecation;
_emitError = emitError;
}
function warnDeprecated(message, version = 3) {
if (!_emitDeprecation)
return;
if (typeof _emitDeprecation === "number" && version > _emitDeprecation)
return;
if (_emitError) {
throw new Error(`[SHIKI DEPRECATE]: ${message}`);
} else {
console.trace(`[SHIKI DEPRECATE]: ${message}`);
}
}
export { enableDeprecationWarnings as e, warnDeprecated as w };