Skip to content
public-library›Rules›TypeScript›Use template literal types for patterned strings

Use template literal types for patterned strings

When a string must follow a known pattern built from a fixed set of parts, type it with a template literal type instead of string.

In the full rule