While exploring a TypeScript file, I stumbled upon this interface declaration:
interface SelectProps<T = SelectValue> extends AbstractSelectProps { /* ... */ }
I've searched through the TypeScript handbook for <T =
but couldn't find any mention of it in the sections on Generics or Advanced Types, nor on the what's new in TypeScript page.
I'm familiar with <T extends ...>
from the documentation, but this is my first time encountering <T = ...>
.
Does anyone know what this construct is called? What does it signify? And how does it differ from using =
versus extends
?