Uppercase, Lowercase & Capitalize
Në shqip: Tipet për shndërrimin e teksteve
ShpjegimiSQ
TypeScript ka tipe që ndryshojnë tekste në nivel tipesh: Uppercase<"tung"> → "TUNG", Capitalize<"emri"> → "Emri". Shpesh përdoren me template literal types — p.sh. për emra si onClick.
EnglishEN
TypeScript has types that transform text at the type level: Uppercase<"hi"> → "HI", Capitalize<"name"> → "Name". They're often used with template literal types — e.g. for names like onClick.
Si ta mendosh
Si një vulë që i kthen shkronjat e para në të mëdha.
Lexoje në anglisht
Like a stamp that turns first letters into capitals.
Shembull koditypescript
type Ngjarje = "click" | "focus";
type Mbajtesit = `on${Capitalize<Ngjarje>}`; // "onClick" | "onFocus"