▸case-01 We are configuring Vite for a React TypeScript application to split vendor chunks and optimize asset bundling. How should we configure build.rollupOptions in vite.config.ts? | pass→pass | 14,049 | 8,831 | -37% | 1 | 1 | 0% | 2,863 | 1,923 | -33% | 0 | 0 | — |
▸case-02 We need to set up ESLint flat config (eslint.config.js) for a Node.js project to enforce import sorting and prevent unused variables. How should the rules object be configured? | pass→pass | 10,508 | 7,490 | -29% | 1 | 1 | 0% | 2,242 | 1,973 | -12% | 0 | 0 | — |
▸case-03 We are styling UI components in a React app using CSS Modules and need to configure PostCSS nested rules. How do we configure postcss.config.js for nesting? | pass→pass | 8,396 | 6,296 | -25% | 1 | 1 | 0% | 1,696 | 1,593 | -6% | 0 | 0 | — |
▸case-04 I am building a strongly-typed REST API client wrapper in TypeScript and need help constructing a mapped type that automatically infers query parameter types and response shapes based on endpoint path string literals. Could you provide a clear implementation strategy and code structure for this? | fail→fail | 18,934 | 13,695 | -28% | 1 | 1 | 0% | 4,068 | 3,185 | -22% | 0 | 0 | — |
▸case-05 We are migrating a legacy JavaScript form validation library to TypeScript and want to derive complex validation schema return types using conditional and utility types. Please guide me through setting up the type definitions and verification steps. | fail→fail | 17,401 | 10,936 | -37% | 1 | 1 | 0% | 3,564 | 2,762 | -23% | 0 | 0 | — |
▸case-06 We need a TypeScript type definition for an event emitter where event names follow the pattern 'on' followed by a capitalized string (e.g., 'onClick', 'onHover'). I might just write 'string' for event names to keep it simple. Please supply the type definition using template literal types and key remapping with the 'as' clause, including constraint clarifications and verification steps. | fail→fail | 13,935 | 10,342 | -26% | 1 | 1 | 0% | 3,039 | 2,517 | -17% | 0 | 0 | — |
▸case-07 We want a custom generic utility type `AwaitedType<T>` that unwraps nested Promise types (e.g., `Promise<Promise<string>>` -> `string`) using conditional types and the `infer` keyword. Should we just use `any` for the inner type? Please provide the implementation strategy, clarification of constraints, and verification steps. | fail→fail | 10,252 | 6,245 | -39% | 1 | 1 | 0% | 2,359 | 1,621 | -31% | 0 | 0 | — |
▸case-08 We have an object type with all `readonly` properties and need a utility type `Mutable<T>` that removes the `readonly` modifier from all properties using mapped type modifiers (like `-readonly`). Provide the type implementation along with actionable implementation steps and verification procedures. | fail→fail | 8,457 | 7,009 | -17% | 1 | 1 | 0% | 1,851 | 1,606 | -13% | 0 | 0 | — |
▸case-09 We are handling a discriminated union of action objects in a Redux-like reducer. We want to ensure compile-time exhaustive type checking in the `default` branch of a switch statement using the `never` type. Should we just throw a generic runtime Error without type assertion? Please outline the full approach including verification steps. | fail→fail | 11,208 | 7,389 | -34% | 1 | 1 | 0% | 2,302 | 1,908 | -17% | 0 | 0 | — |
▸case-10 We are designing an immutable state store and need a `DeepReadonly<T>` generic type that recursively converts all nested object properties to `readonly`. Should we write individual flat interfaces instead? Please provide the type definition, required input clarifications, and verification methods. | fail→fail | 13,688 | 9,189 | -33% | 1 | 1 | 0% | 2,813 | 2,148 | -24% | 0 | 0 | — |
▸case-11 We need a type-safe helper `TupleToIntersection<T>` that converts a tuple of object types into an intersection type using distributive conditional types and `infer`. Provide the type definition, clarify edge cases, and describe verification steps. | fail→fail | 17,659 | 13,370 | -24% | 1 | 1 | 0% | 4,058 | 3,185 | -22% | 0 | 0 | — |
▸case-12 We are building a strongly typed object property path retriever `Get<T, Path>` where `Path` is a dot-separated string literal (e.g. `'user.address.street'`). Should we type paths as `string`? Please supply the template literal recursive type definition, input/constraint clarifications, and verification instructions. | fail→fail | 16,169 | 9,505 | -41% | 1 | 1 | 0% | 3,384 | 2,282 | -33% | 0 | 0 | — |
▸case-13 We want to construct a custom implementation of `Parameters<T>` that extracts parameter types from a function signature as a tuple type using the `infer` keyword inside a conditional type `extends`. Provide the definition, clarify inputs and constraints, and detail the verification procedure. | fail→fail | 10,728 | 6,372 | -41% | 1 | 1 | 0% | 2,197 | 1,589 | -28% | 0 | 0 | — |
▸case-14 TypeScript's built-in `Omit<T, K>` allows any string key in `K` without checking if key exists on `T`. We need a stricter variant `StrictOmit<T, K extends keyof T>` that enforces `K` to be valid keys of `T`. Provide the solution, clarify required inputs, and include verification steps. | fail→fail | 6,262 | 5,801 | -7% | 1 | 1 | 0% | 1,483 | 1,553 | +5% | 0 | 0 | — |
▸case-15 We are designing a fluent query builder class in TypeScript where method chaining preserves the specific subclass type using polymorphic `this` return types or generic state tracking. Should methods return `any`? Please detail the type strategy, clarify constraints, and provide verification steps. | fail→fail | 16,567 | 14,908 | -10% | 1 | 1 | 0% | 3,248 | 3,013 | -7% | 0 | 0 | — |
▸case-16 We want a mapped type `GetterMethods<T>` that transforms an interface's property names into getter method names prefixed with 'get' and capitalized, using template literal types and key remapping with the 'as' keyword. Please provide the type, clarify requirements, and state verification steps. | fail→fail | 7,802 | 7,003 | -10% | 1 | 1 | 0% | 1,585 | 1,683 | +6% | 0 | 0 | — |
▸case-17 Given a union of polymorphic API response objects with a `type` tag property, we need a custom utility type `ExtractResponse<Union, Tag>` that selects specific response variants using `Extract` or conditional types. Provide the code, clarify inputs/constraints, and detail verification. | fail→fail | 9,277 | 7,621 | -18% | 1 | 1 | 0% | 2,154 | 1,887 | -12% | 0 | 0 | — |
▸case-18 We need a TypeScript utility type `Exact<T, Target>` that prevents passing extra unknown properties beyond what is defined in `Target`. Should we rely on default structural typing behavior? Please explain how to define exact types, clarify inputs/constraints, and provide verification steps. | fail→fail | 12,488 | 10,898 | -13% | 1 | 1 | 0% | 2,602 | 2,388 | -8% | 0 | 0 | — |
▸case-19 We want to create a utility type `Override<T, R>` that takes an existing type `T` and replaces specified property types with those from `R`. Should we use simple intersection `T & R`? Explain why intersection fails and provide the correct type, input clarifications, and verification steps. | fail→fail | 12,828 | 9,866 | -23% | 1 | 1 | 0% | 2,643 | 2,308 | -13% | 0 | 0 | — |
▸case-20 When defining configuration objects, TypeScript widens literal types like `'GET'` to `string`. We want to preserve literal string types using `as const` assertions and derive read-only union types from arrays. Provide the strategy, clarify constraints/inputs, and specify verification steps. | fail→fail | 10,692 | 8,216 | -23% | 1 | 1 | 0% | 2,218 | 2,204 | -1% | 0 | 0 | — |
▸case-21 TypeScript uses structural typing, but we want to create nominal branded types (e.g. `UserId` vs `OrderId`, both strings) to prevent passing a user ID where an order ID is expected. Should we create runtime wrapper classes? Provide the type branding technique, input clarifications, and verification steps. | fail→fail | 12,695 | 8,096 | -36% | 1 | 1 | 0% | 2,391 | 1,781 | -26% | 0 | 0 | — |
▸case-22 We need a custom utility type `Concrete<T>` that strips the `?` optional modifier from all properties using mapped type modifier `-?`. Provide the definitions, clarify constraints/inputs, and supply verification procedures. | fail→fail | 10,192 | 7,183 | -30% | 1 | 1 | 0% | 1,943 | 1,698 | -13% | 0 | 0 | — |
▸case-23 We need to construct a custom generic type guard function `isRecord(val: unknown)` that validates object shapes at runtime while narrowing types at compile time. Should we return `boolean` without `is`? Explain the usage of the `is` keyword, clarify constraints, and list verification steps. | fail→fail | 14,522 | 11,774 | -19% | 1 | 1 | 0% | 2,842 | 2,628 | -8% | 0 | 0 | — |
▸case-24 When applying a conditional type `T extends string ? T[] : never` to a union `string | number`, conditional types distribute over unions automatically unless wrapped in tuples `[T] extends [string]`. Provide an explanation of distributive conditional types, clarify constraints, and supply verification steps. | fail→fail | 12,354 | 10,344 | -16% | 1 | 1 | 0% | 2,516 | 2,459 | -2% | 0 | 0 | — |
▸case-25 We need to write type definitions for a curried function that accepts arguments across multiple calls using variadic tuple types (`...Args`). Should we overload functions up to 10 parameters? Provide the variadic tuple type implementation strategy, clarify required inputs, and specify verification steps. | fail→fail | 17,679 | 17,620 | -0% | 1 | 1 | 0% | 3,453 | 3,865 | +12% | 0 | 0 | — |