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

pull/4482/head
Ihor 1 year ago committed by GitHub
parent 0b0168b40f
commit 846bbc1533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/data/roadmaps/typescript/content/112-advanced-types/103-template-literal-types.md

@ -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: For example, the following is a template literal type that concatenates two strings:
```typescript ```typescript
type Name = `Mr. ` + string; type Name = `Mr. ${string}`;
let name: Name = `Mr. Smith`; // ok let name: Name = `Mr. Smith`; // ok
let name: Name = `Mrs. Smith`; // error let name: Name = `Mrs. Smith`; // error

Loading…
Cancel
Save