Diese Lektion gibt es vorerst nur auf Englisch.
Generics with rules
Inside first<T>, TypeScript knows nothing about T, so you cannot read .id or .length on it. A constraint states what every T must at least have.
Diese Lektion gibt es vorerst nur auf Englisch.
Inside first<T>, TypeScript knows nothing about T, so you cannot read .id or .length on it. A constraint states what every T must at least have.