Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
function identity<T>(x: T): T { return x; }
function len<T extends { length: number }>(x: T) { return x.length; }
T extends string matter?Restricts T to string-assignable types — required when you use string-specific operations or template literal types.
identity<number>(42) — usually inferred.
function pick<T, K extends keyof T = keyof T>(...) — K defaults to keyof T.