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.5
Anthropic
9.49
WINNER SCORE
matrix avg: 7.87
10×10 Judgment Matrix · 100 judgments
OPEN DATA
| Judge ↓ / Respondent → | Grok Code Fast | GLM-4-7 | Claude Opus 4.5 | Gemini 3 | Claude Sonnet 4.5 | Gemini 3 | MiniMax M2 | DeepSeek V3.2 | GPT-5.2-Codex | Grok 3 (Direct) |
|---|---|---|---|---|---|---|---|---|---|---|
| Grok Code Fast | — | 0.0 | 9.8 | 9.8 | 9.6 | 5.5 | 0.0 | 9.6 | 9.8 | 9.6 |
| GLM-4-7 | 9.8 | — | 9.3 | 9.8 | 9.8 | 5.8 | 0.0 | 0.0 | 9.8 | 9.8 |
| Claude Opus 4.5 | 8.3 | 0.9 | — | 9.0 | 9.0 | 5.3 | 1.3 | 6.8 | 8.6 | 9.0 |
| Gemini 3 | 9.8 | 0.0 | 9.6 | — | 10.0 | 6.5 | 0.0 | 9.8 | 9.8 | 9.8 |
| Claude Sonnet 4.5 | 9.2 | 0.5 | 9.4 | 9.3 | — | 4.7 | 0.5 | 8.4 | 8.6 | 9.2 |
| Gemini 3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | — | 0.0 | 0.0 | 0.0 | 0.0 |
| MiniMax M2 | 10.0 | 0.0 | 8.4 | 9.8 | 9.8 | 4.7 | — | 10.0 | 9.4 | 9.8 |
| DeepSeek V3.2 | 8.8 | 8.6 | 8.8 | 8.6 | 9.3 | 7.2 | 8.2 | — | 9.8 | 9.3 |
| GPT-5.2-Codex | 8.8 | 0.0 | 7.8 | 8.8 | 8.8 | 4.1 | 0.0 | 8.6 | — | 8.8 |
| Grok 3 (Direct) | 8.6 | 7.0 | 9.4 | 9.1 | 9.6 | 6.9 | 7.0 | 8.8 | 9.1 | — |