From a065604155991dbf4417b606d4562d275cd8955f Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Thu, 28 Oct 2021 08:43:40 +1100 Subject: feat(cli): enable `useUnknownInCatchVariables` by default (#12547) Closes #11826 **BREAKING CHANGE** this behaviour was disable when introduced in Deno 1.14/TypeScript 4.4. It will highlight code that unsafely handles variables that are caught, and will cause type errors in unsafe code. --- cli/tests/integration/run_tests.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index d4e7ccf72..ec42a8dc8 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -1367,6 +1367,13 @@ itest!(error_import_map_unable_to_load { exit_code: 1, }); +// This test ensure that useUnknownInCatchVariables is enabled by default. +itest!(use_unknown_in_catch_variables { + args: "run useUnknownInCatchVariables.ts", + output: "useUnknownInCatchVariables.ts.out", + exit_code: 1, +}); + // Test that setting `self` in the main thread to some other value doesn't break // the world. itest!(replace_self { -- cgit v1.2.3