Skip to content

Commit

Permalink
Merge pull request #37 from Stonek79/patch-1
Browse files Browse the repository at this point in the history
[fix]: 'pointsCount' in object examples
  • Loading branch information
mokevnin committed Oct 15, 2022
2 parents 1e9ef98 + 7c72b95 commit bae84d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/10-basics/55-objects/description.ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ theory: |
Тип объекта состоит из типов всех входящих в него свойств. Он выводится автоматически:
```typescript
// Тип: { firstName: string; points: number; }
// Тип: { firstName: string; pointsCount: number; }
const user = {
firstName: 'Mike',
pointsCount: 1000,
Expand All @@ -20,7 +20,7 @@ theory: |
В отличии от JavaScript, TypeScript не позволяет обращаться к несуществующим свойствам. Это значит, что структура любого объекта должна быть задана при его инициализации.
```typescript
// Property 'age' does not exist on type '{ firstName: string; points: number; }'.
// Property 'age' does not exist on type '{ firstName: string; pointsCount: number; }'.
user.age = 100;
```
Expand Down

0 comments on commit bae84d4

Please sign in to comment.