Open this example in the interactive library
Source code
const words = ["build", "ship", "test"];
console.log((<T = string,>(v: T | null = null): T | null => v)());
Sample output
null

Open this example in the interactive library
const words = ["build", "ship", "test"];
console.log((<T = string,>(v: T | null = null): T | null => v)());
null