The codspeed() call is giving a TypeScript error with Vitest 1.6.0
Error
No overload matches this call.
The last overload gave the following error.
Type '{ name: string; apply(_: any, { mode }: { mode: any; }): boolean; enforce: string; config(): { test: { pool: string; poolOptions: { forks: { execArgv: string[]; }; }; runner: string; globalSetup: string[]; }; }; }' is not assignable to type 'PluginOption'.
Type '{ name: string; apply(_: any, { mode }: { mode: any; }): boolean; enforce: string; config(): { test: { pool: string; poolOptions: { forks: { execArgv: string[]; }; }; runner: string; globalSetup: string[]; }; }; }' is not assignable to type 'Plugin<any>'.
Types of property 'enforce' are incompatible.
Type 'string' is not assignable to type '"post" | "pre" | undefined'.ts(2769)
Config
import codspeed from '@codspeed/vitest-plugin'
import { defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [codspeed()],
})
vitest v1.6.0
@codspeed/vitest-plugin v3.1.0
The
codspeed()call is giving a TypeScript error with Vitest 1.6.0Error
Config
vitestv1.6.0@codspeed/vitest-pluginv3.1.0