TypeScript/debug.ts
copilot-swe-agent[bot] 869eb505d5 Fix contextual typing sensitivity to binding pattern structure
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
2025-07-29 04:32:36 +00:00

6 lines
226 B
TypeScript

type DataType = 'a' | 'b';
declare function foo<T extends { dataType: DataType }>(template: T): [T, any, any];
// Test both cases
const [, , t] = foo({ dataType: 'a', day: 0 });
const [, s, ] = foo({ dataType: 'a', day: 0 });