Skip to content

Commit

Permalink
fix(docs-i18n-ru): fix typo in example (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
Voyager101pw committed May 6, 2024
1 parent 629b61f commit 65fa8c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export function ArticlePreview({ article }) { /* TODO */ }

Поскольку мы пишем на TypeScript, было бы неплохо иметь типизированный объект статьи Article. Если мы изучим сгенерированный `v1.d.ts`, то увидим, что объект Article доступен через `components["schemas"]["Article"]`. Поэтому давайте создадим файл с нашими моделями данных в Shared и экспортируем модели:

```tsx title="shared/models/index.ts"
```tsx title="shared/api/models.ts"
import type { components } from "./v1";

export type Article = components["schemas"]["Article"];
Expand Down

0 comments on commit 65fa8c5

Please sign in to comment.