Skip to content

Commit

Permalink
types: Make a few Props definitions explicitly inexact.
Browse files Browse the repository at this point in the history
An instance of zulip#3452.

PR zulip#4465 is currently open for type-checking `MessageList`'s props.
  • Loading branch information
chrisbobbe committed Mar 10, 2021
1 parent e04db22 commit 0f9d71f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/message/messageUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
import isEqual from 'lodash.isequal';
import type { Narrow } from '../types';

// TODO: Consider completing this and making it exact, once
// `MessageList`'s props are type-checked.
type Props = $ReadOnly<{
narrow: Narrow,
messages: $ReadOnlyArray<$ReadOnly<{ id: number }>>,
...
}>;

type TransitionProps = {|
Expand Down
3 changes: 3 additions & 0 deletions src/webview/handleOutboundEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,16 @@ export type WebViewOutboundEvent =
| WebViewOutboundEventMention
| WebViewOutboundEventTimeDetails;

// TODO: Consider completing this and making it exact, once
// `MessageList`'s props are type-checked.
type Props = $ReadOnly<{
backgroundData: BackgroundData,
dispatch: Dispatch,
messages: $ReadOnlyArray<Message | Outbox>,
narrow: Narrow,
showActionSheetWithOptions: ShowActionSheetWithOptions,
startEditMessage: (editMessage: EditMessage) => void,
...
}>;

const fetchMore = (props: Props, event: WebViewOutboundEventScroll) => {
Expand Down

0 comments on commit 0f9d71f

Please sign in to comment.