diff options
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 255c5fb6a..3fee1109b 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -99,7 +99,7 @@ let globalThis_; let deprecatedApiWarningDisabled = false; const ALREADY_WARNED_DEPRECATED = new SafeSet(); -function warnOnDeprecatedApi(apiName, stack, suggestion) { +function warnOnDeprecatedApi(apiName, stack, ...suggestions) { if (deprecatedApiWarningDisabled) { return; } @@ -155,11 +155,14 @@ function warnOnDeprecatedApi(apiName, stack, suggestion) { "%c\u251c This API will be removed in Deno 2.0. Make sure to upgrade to a stable API before then.", "color: yellow;", ); - console.error("%c\u2502", "color: yellow;"); - console.error( - `%c\u251c Suggestion: ${suggestion}`, - "color: yellow;", - ); + for (let i = 0; i < suggestions.length; i++) { + const suggestion = suggestions[i]; + console.error("%c\u2502", "color: yellow;"); + console.error( + `%c\u251c Suggestion: ${suggestion}`, + "color: yellow;", + ); + } if (isFromRemoteDependency) { console.error("%c\u2502", "color: yellow;"); console.error( |