1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-25 10:14:20 +02:00

fix(typescript): fix template lineral type definition (#4474)

This commit is contained in:
Ihor
2023-09-13 22:09:45 +02:00
committed by GitHub
parent 0b0168b40f
commit 846bbc1533

View File

@@ -5,7 +5,7 @@ Template literal types in TypeScript are a way to manipulate string values as ty
For example, the following is a template literal type that concatenates two strings:
```typescript
type Name = `Mr. ` + string;
type Name = `Mr. ${string}`;
let name: Name = `Mr. Smith`; // ok
let name: Name = `Mrs. Smith`; // error