Skip to content

Commit 754e029

Browse files
committed
chore: mark as optional
1 parent 6eb4ad0 commit 754e029

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

packages/uikit-react-native/src/domain/groupChannel/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { MessageCollectionParams, MessageFilterParams } from '@sendbird/cha
55
import type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';
66
import type {
77
OnBeforeHandler,
8+
PickPartial,
89
SendbirdFileMessage,
910
SendbirdFileMessageCreateParams,
1011
SendbirdFileMessageUpdateParams,
@@ -91,16 +92,16 @@ export interface GroupChannelProps {
9192
// Changing the search item will trigger the focus animation on messages.
9293
onUpdateSearchItem: (searchItem?: GroupChannelProps['MessageList']['searchItem']) => void;
9394
};
94-
Input: Pick<
95+
Input: PickPartial<
9596
ChannelInputProps,
96-
| 'inputDisabled'
9797
| 'shouldRenderInput'
9898
| 'onPressSendUserMessage'
9999
| 'onPressSendFileMessage'
100100
| 'onPressUpdateUserMessage'
101101
| 'onPressUpdateFileMessage'
102102
| 'SuggestedMentionList'
103-
| 'AttachmentsButton'
103+
| 'AttachmentsButton',
104+
'inputDisabled'
104105
>;
105106

106107
SuggestedMentionList: SuggestedMentionListProps;

packages/uikit-react-native/src/domain/openChannel/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { UseOpenChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';
44
import type { Icon } from '@sendbird/uikit-react-native-foundation';
55
import type {
66
OnBeforeHandler,
7+
PickPartial,
78
SendbirdFileMessage,
89
SendbirdFileMessageCreateParams,
910
SendbirdFileMessageUpdateParams,
@@ -70,15 +71,15 @@ export type OpenChannelProps = {
7071
| 'flatListProps'
7172
| 'hasNext'
7273
>;
73-
Input: Pick<
74+
Input: PickPartial<
7475
ChannelInputProps,
75-
| 'inputDisabled'
7676
| 'shouldRenderInput'
7777
| 'onPressSendUserMessage'
7878
| 'onPressSendFileMessage'
7979
| 'onPressUpdateUserMessage'
8080
| 'onPressUpdateFileMessage'
81-
| 'AttachmentsButton'
81+
| 'AttachmentsButton',
82+
'inputDisabled'
8283
>;
8384

8485
Provider: {

packages/uikit-utils/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ export type PartialNullable<T> = {
7070
[P in keyof T]?: T[P] | null;
7171
};
7272

73+
export type PickPartial<T, PK extends keyof T, PPK extends keyof T> = Pick<T, PK> & Partial<Pick<T, PPK>>;
74+
7375
export type Optional<T> = T | undefined;
7476

7577
export type ContextValue<T extends React.Context<any>> = T extends React.Context<infer V> ? V : never;

0 commit comments

Comments
 (0)