- Notifications
You must be signed in to change notification settings - Fork664
Open
Description
https://github.com/tmm1/tsgo-vitest-repro
tsgo --noEmit -p .sample.test.ts:39:26 - error TS2339: Property 'tools' does not exist on type '{ name: string; mode: string; } | { name: string; mode: string; tools: boolean; }'.39 async ({ name, mode, tools = true }) => { ~~~~~Found 1 error in sample.test.ts:39
import{describe,expect,it}from"vitest";describe("A test",()=>{constlist=["a","b","c","d","e","f",];it.each([{name:"foo",mode:"bar",}, ...list.flatMap((name)=>[{ name,mode:"bar",},{ name,mode:"baz",},{ name,mode:"qux",tools:false,},{ name,mode:"foo",},]),])("Test Case #%#: %s",async({ name, mode, tools=true})=>{console.log(name,mode,tools);},);})