Answer the question
In order to leave comments, you need to log in
What does this assignment do in a TypeScript type declaration?
Hello, in the translation of the TS documentation I came across the following code:
function f1<T, U extends keyof T = keyof T>(): void {}
U extends keyof T = keyof T
, why can't you just write U extends keyof T
?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question