Skip to content

Commit

Permalink
types: Make Props exact in a few places we can.
Browse files Browse the repository at this point in the history
An instance of zulip#3452.
  • Loading branch information
chrisbobbe committed Mar 10, 2021
1 parent 870c20a commit e04db22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/common/SectionSeparatorBetween.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import SectionSeparator from './SectionSeparator';
* Upstream `SectionList` is full of `any`s. This type is incomplete,
* and just captures what we use.
*/
type Props = $ReadOnly<{
type Props = $ReadOnly<{|
leadingItem: ?{},
leadingSection: ?{ data: { length: number } },
}>;
|}>;

/** Can be passed to RN's `SectionList` as `SectionSeparatorComponent`. */
export default class SectionSeparatorBetween extends PureComponent<Props> {
Expand Down
4 changes: 2 additions & 2 deletions src/common/ZulipStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ type SelectorProps = $ReadOnly<{|
orientation: Orientation,
|}>;

type Props = $ReadOnly<{
type Props = $ReadOnly<{|
backgroundColor?: string | void,
hidden: boolean,

dispatch: Dispatch,
...SelectorProps,
}>;
|}>;

/**
* Applies `hidden` and `backgroundColor` in platform-specific ways.
Expand Down
4 changes: 2 additions & 2 deletions src/title/TitlePrivate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import ActivityText from './ActivityText';
import { tryGetUserForId } from '../users/userSelectors';
import { navigateToAccountDetails } from '../nav/navActions';

type Props = $ReadOnly<{
type Props = $ReadOnly<{|
userId: UserId,
color: string,
}>;
|}>;

const componentStyles = createStyleSheet({
outer: { flex: 1 },
Expand Down

0 comments on commit e04db22

Please sign in to comment.