feat(repl): add global clear() function (#14332)

This commit adds a clear() function in the REPL which works
similar to console.clear().
This commit is contained in:
Colin Ihrig 2022-04-20 15:48:15 -04:00 committed by GitHub
parent f785ecee1a
commit 2a93c134dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -41,6 +41,8 @@ Object.defineProperty(globalThis, "_error", {
console.log("Last thrown error is no longer saved to _error.");
},
});
globalThis.clear = console.clear.bind(console);
"#;
pub enum EvaluationOutput {