Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Standardized guidelines and patterns for Frontend Typescript Types Advanced.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-01 | ✓→✗ | ▼ Worse | -3% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 49% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 16% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 42% | 0% |
typescripttype IsString<T> = T extends string ? true : false; type A = IsString<string>; // true type B = IsString<number>; // false
typescripttype Readonly<T> = { readonly [P in keyof T]: T[P]; }; type Optional<T> = { [P in keyof T]?: T[P]; };
typescripttype EventName = 'click' | 'focus' | 'blur'; type Handler = `on${Capitalize<EventName>}`; // 'onClick' | 'onFocus' | 'onBlur'
typescript// Pick type UserPreview = Pick<User, 'id' | 'name'>; // Omit type UserWithoutPassword = Omit<User, 'password'>; // Partial type PartialUser = Partial<User>; // Required type RequiredUser = Required<PartialUser>; // Record type Roles = Record<string, Permission[]>;
typescripttype UserId = string & { __brand: 'UserId' }; type ProductId = string & { __brand: 'ProductId' }; function getUser(id: UserId) { } function getProduct(id: ProductId) { } const userId = 'user-123' as UserId; getUser(userId); // OK // getProduct(userId); // Error
Other measured skills in the registry, with their headline benchmark lift.