Generic

Umumlashgan turTypeScript

Misol

function first<T>(items: T[]): T | undefined { return items[0]; }
Barcha atamalar