Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/25-types/25-literal-types/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Using type union, we can get a type that takes only the values we need:
type OrderStatus = 'Created' | 'Paid' | 'Shipped' | 'Delivered';
```

Literal types can be also combined with any other types. In this way we can get the restriction that all numbers and `false` fall under:
Literal types can be also combined with any other types. In this way we can get the restriction that all statuses and `false` fall under:

```typescript
type NumberFalse = number | false;
type OrderStatusFalse = number | false;
```

## String enums
Expand Down
4 changes: 2 additions & 2 deletions modules/25-types/25-literal-types/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ test = 'string'; // Error: Type '"string"' is not assignable to type '"test"'.
type OrderStatus = 'Created' | 'Paid' | 'Shipped' | 'Delivered';
```

Также литеральные типы могут комбинироваться с любыми другими типами. Так мы можем получить ограничение, под которое попадают все числа и `false`:
Также литеральные типы могут комбинироваться с любыми другими типами. Так мы можем получить ограничение, под которое попадают все статусы и `false`:

```typescript
type NumberFalse = number | false;
type OrderStatusFalse = OrderStatus | false;
```

## Строковые перечисления (String enums)
Expand Down