In Typescript 5.2 were added type arguments placeholders. That is, if you have something like
declare function f<A, B, C>(x: A, y: B, z: C): C
You can write f<_, _, 1>("",[],1)
to specify you expect C
to be 1
(it would else be inferred as number
), but you let the compiler infer A and B.
I have Typescript 5.5, but when I write the above, I get an error : Cannot find name '_'
.
Any idea what’s going on ?