Skip to content

Commit 393d0df

Browse files
docs: apply suggestions from code review
Co-authored-by: Mads Røskar <[email protected]>
1 parent 7497ba3 commit 393d0df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docusaurus/docs/reactnative/customization/typescript.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In many cases TypeScript can use [inference](https://www.typescriptlang.org/docs
2121

2222
It is important that the proper generics be applied to the `stream-chat-js` client when it is instantiated.
2323
The [documentation on `stream-chat-js` TypeScript](https://github.com/GetStream/stream-chat-js#typescript-v2xx) has examples of how this can be done in detail.
24-
The client takes seven generics that correspond to the seven customizable fields that currently exist in `stream-chat-js`.
24+
The client a generic type that defines seven customizable fields that currently exist in [`stream-chat-js`](https://github.com/GetStream/stream-chat-js#typescript-v2xx).
2525

2626
```tsx
2727
const client = StreamChat.getInstance<StreamChatType>('YOUR_API_KEY');
@@ -73,7 +73,7 @@ The seven customizable fields these generics extend are provided via `stream-cha
7373
6. [`Reaction`](https://github.com/GetStream/stream-chat-js/blob/0e29bea1e773f15599564b5174d4fabbd3bcb495/src/types.ts#L1854)
7474
7. [`User`](https://github.com/GetStream/stream-chat-js/blob/0e29bea1e773f15599564b5174d4fabbd3bcb495/src/types.ts#L2004)
7575

76-
All seven generics contain defaults in the `stream-chat-react-native` repo that you can extend for custom data as per your types for the Channel, Message, etc.
76+
All seven generics contain defaults in the `stream-chat-react-native` repo that you can extend for custom data such as custom types for Channels, Messages, etc.
7777

7878
```tsx
7979
type DefaultAttachmentType = Record<string, unknown>;
@@ -89,8 +89,8 @@ type DefaultUserType = Record<string, unknown> & {
8989
};
9090
```
9191

92-
Additional fields on the defaults i.e. `image` are custom fields used by `stream-chat-react-native` already within the SDK.
93-
When wanting to set a subset of generics the preceding and interceding generics must also be set in order for the TypeScript compiler to correctly understand intent.
92+
Additional fields on the defaults, i.e. `image`, are custom fields used by `stream-chat-react-native` already within the SDK.
93+
When wanting to set a subset of generics, the preceding and interceding generics must also be set for the TypeScript compiler to understand intent correctly.
9494

9595
```tsx
9696
type StreamChatType = {

0 commit comments

Comments
 (0)