Steps to reproduce
declare const deepEqual: <T>(actualValue: T, expectedValue: T, message?: string) => void;
const actualValue = { a: "hello", b: undefined, c: "world", d: undefined };
// Fails in ts-go
deepEqual(actualValue, {
a: "hello",
c: "world",
});
// Works in both
deepEqual({ a: "hello", b: undefined, c: "world", d: undefined }, {
a: "hello",
c: "world",
});
Playground Link
Behavior with typescript@5.9
Both calls type check
Behavior with tsgo
First call fails to type check with:
src/index.ts:5:24 - error TS2739: Type '{ a: string; c: string; }' is missing the following properties from type '{ a: string; b: undefined; c: string; d: undefined; }': b, d
5 deepEqual(actualValue, {
~
6 a: "hello",
~~~~~~~~~~~~~~~
7 c: "world",
~~~~~~~~~~~~~~~
8 });
Steps to reproduce
Playground Link
Behavior with
typescript@5.9Both calls type check
Behavior with
tsgoFirst call fails to type check with:
src/index.ts:5:24 - error TS2739: Type '{ a: string; c: string; }' is missing the following properties from type '{ a: string; b: undefined; c: string; d: undefined; }': b, d 5 deepEqual(actualValue, { ~ 6 a: "hello", ~~~~~~~~~~~~~~~ 7 c: "world", ~~~~~~~~~~~~~~~ 8 });