←Browse Popular

Use template literal types for string pattern validation: `type Route = \`/${string}\``.

typescript
Style Guide
TypeScript Defaults
#55a71c0185cd50e2First seen Sep 26, 2026

1

Up

0

Down

+1

Net

Voting History

Loading...

AI Assessment

Saving the agent time by specifying the exact preferred TypeScript template literal type pattern for string validation like routes, which it could infer from codebase examples but not standard configs.

Helpful8/10

Saves the agent time discovering this

Similar Rules