From 7f5022994ec645838d9fa1867602b2f30d51673a Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sat, 4 Nov 2023 14:43:13 +0100 Subject: [PATCH] fix: throw an error when running "vitest typecheck" (#4439) --- packages/vitest/src/node/cli.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/vitest/src/node/cli.ts b/packages/vitest/src/node/cli.ts index 124558ea936f..48f071ed5f59 100644 --- a/packages/vitest/src/node/cli.ts +++ b/packages/vitest/src/node/cli.ts @@ -76,6 +76,13 @@ cli .command('bench [...filters]') .action(benchmark) +// TODO: remove in Vitest 2.0 +cli + .command('typecheck [...filters]') + .action(() => { + throw new Error(`Running typecheck via "typecheck" command is removed. Please use "--typecheck" to run your regular tests alongside typechecking, or "--typecheck.only" to run only typecheck tests.`) + }) + cli .command('[...filters]') .action((filters, options) => start('test', filters, options))