-
Notifications
You must be signed in to change notification settings - Fork 766
Open
Labels
Domain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checking
Description
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",
});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 });Metadata
Metadata
Assignees
Labels
Domain: Type CheckingRelated to type checking, grammar checkingRelated to type checking, grammar checking