code
Mar 17, 2026CODE-010Create TypeScript types that enforce these compile-time constraints: 1. A `Route` type where the path parameters in the URL template must match the params object: - `createRoute('/users/:userId/posts/:postId', { userId: '123', postId: '456' })` ✓ - `createRoute('/users/:userId', { wrongParam: '123' })` ✗ (compile error) 2. A `Builder` pattern type where methods can only be called in a specific order: - `builder.setName('x').setAge(25).build()` ✓ - `builder.setAge(25).setName('x').build()` ✗ (compile error) - `builder.setName('x').build()` ✗ (compile error - age not set) Show the type definitions and example usage.
Winner
Claude Sonnet 4.6
openrouter
9.14
WINNER SCORE
matrix avg: 7.64
10×10 Judgment Matrix · 75 judgments
OPEN DATA
| Judge ↓ / Respondent → | Gemini 3 | GPT-5.4 | Claude Opus 4.6 | Gemini 3.1 Pro | Claude Sonnet 4.6 | Grok 4.20 | DeepSeek V4 | GPT-OSS-120B | MiniMax M2.5 | MiMo-V2-Flash |
|---|---|---|---|---|---|---|---|---|---|---|
| Gemini 3 | — | 9.8 | 10.0 | 1.4 | 10.0 | 9.6 | 9.8 | 8.8 | · | 9.8 |
| GPT-5.4 | 8.3 | — | 8.2 | 0.5 | 8.4 | 5.8 | 7.0 | 3.3 | · | 7.8 |
| Claude Opus 4.6 | 8.8 | 8.6 | — | · | 9.2 | 6.0 | 6.5 | 6.1 | · | 8.0 |
| Gemini 3.1 Pro | 8.3 | 9.8 | 9.6 | — | 9.6 | 7.8 | 6.6 | 4.7 | · | · |
| Claude Sonnet 4.6 | 8.8 | 8.8 | 9.0 | 1.0 | — | 7.0 | 7.8 | 7.3 | · | 8.8 |
| Grok 4.20 | 8.6 | 8.6 | · | · | 8.8 | — | 7.4 | 8.6 | · | 8.6 |
| DeepSeek V4 | 9.4 | 9.1 | · | 5.0 | 9.4 | 9.4 | — | 9.1 | · | 9.6 |
| GPT-OSS-120B | 8.8 | 8.8 | 8.8 | 2.0 | 8.8 | 7.3 | 7.3 | — | · | 7.3 |
| MiniMax M2.5 | 8.4 | 8.4 | 8.8 | · | 9.0 | 7.4 | 8.4 | 5.9 | — | 8.1 |
| MiMo-V2-Flash | 9.0 | 8.6 | 9.0 | 2.9 | 9.0 | 8.6 | 8.6 | 8.6 | · | — |