Skip to content

Commit 1fb5b58

Browse files
authored
Update description.ru.yml
Changed variable declaration from const to let for a more illustrative example of using a string literal.
1 parent 30d7326 commit 1fb5b58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/25-types/25-literal-types/description.ru.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ theory: |
119119
На выходе мы получаем тип с неизменяемыми (`readonly`) полями и литеральными типами в значении. Такая техника также применима к массивам. Она превращает их в кортежи — массивы фиксированной длины, также защищенные от изменений. И также применима к простым типам, например, `string`:
120120
121121
```typescript
122-
const str = 'test' as const;
122+
let str = 'test' as const;
123123
124124
type Str = typeof str; // 'test'
125125
```

0 commit comments

Comments
 (0)