EO
Size: a a a
EO
EO
Вт
Вт
EO
Вт
Вт
EO
EO
EO
DD
type Mult<Multiple extends boolean> = Multiple extends true ? { multiple: true } : { multiple?: false };
type Test<Obj extends {foo: string }, Multiple extends boolean> = Obj & Mult<Multiple>;
type TestExpr<Obj extends {foo: string }, Multiple extends boolean> = Obj & Multiple extends true ? { multiple: true } : { multiple?: false };
type T1 = Test<{ foo: string, bar: string}, true>
type T2 = TestExpr<{ foo: string, bar: string}, true>
{ foo, bar } & { multiple }
{ multiple }
EO
EO
type Mult<Multiple extends boolean> = Multiple extends true ? { multiple: true } : { multiple?: false };
type Test<Obj extends {foo: string }, Multiple extends boolean> = Obj & Mult<Multiple>;
type TestExpr<Obj extends {foo: string }, Multiple extends boolean> = Obj & Multiple extends true ? { multiple: true } : { multiple?: false };
type T1 = Test<{ foo: string, bar: string}, true>
type T2 = TestExpr<{ foo: string, bar: string}, true>
{ foo, bar } & { multiple }
{ multiple }
EO
IL
Вт
IL
IL
EO
IL