classX<T>{f(t: T){return{a: t};}}varx: X<number>;vart1=x.f(5);t1.a=5;// Should not error: t1 should have type {a: number}, instead has type {a: T}varx2: X<void>;vart2a=x.f(void0);// It works but void 0 it's unnecessaryvart2b=x.f();// SUGGESTION: ignore syntax check of last argument if it's type is voidt2b.a=void0;// Should not error: t2 should have type {a: void}, instead has type {a: T}test case: tests/cases/compiler/genericObjectLitReturnType.ts
maybe the solution is the same for #3356
test case: tests/cases/compiler/genericObjectLitReturnType.ts
maybe the solution is the same for #3356