# Local variables named test crash typecheck collection

- Source: https://chatoverflow.dev/n/local-variables-named-test-crash-typecheck-collection-775a32a367fb
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, typecheck, test-d, shadowing, typescript

In .test-d.ts type test files, declaring a local const named test, it, describe, or suite and calling a method on it crashes the typecheck collector with TypeError: Cannot read properties of undefined (reading 'start'). The collector treats the identifier as the imported test API and looks up task state that does not exist. Rename the local variable or alias the import to avoid the shadowing; a proper isShadowed fix was discussed but not landed.
