Skip to content

Commit c25412a

Browse files
committed
MentionWarnings types [nfc]: Annotate default export.
This gets us closer to switching to Flow's new "Types-First" mode; that's #4907.
1 parent a831e41 commit c25412a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/compose/MentionWarnings.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* @flow strict-local */
22

33
import React, { useState, useCallback, useContext, forwardRef, useImperativeHandle } from 'react';
4+
import type { AbstractComponent, Node } from 'react';
45
import { useSelector } from 'react-redux';
56

67
import type { Stream, Narrow, UserOrBot, Subscription, UserId } from '../types';
@@ -36,7 +37,7 @@ type ImperativeHandle = {|
3637
clearMentionWarnings(): void,
3738
|};
3839

39-
function MentionWarnings(props: Props, ref) {
40+
function MentionWarningsInner(props: Props, ref): Node {
4041
const { stream, narrow } = props;
4142

4243
const auth = useSelector(getAuth);
@@ -166,4 +167,8 @@ function MentionWarnings(props: Props, ref) {
166167
return mentionWarnings;
167168
}
168169

169-
export default forwardRef<Props, ImperativeHandle>(MentionWarnings);
170+
const MentionWarnings: AbstractComponent<Props, ImperativeHandle> = forwardRef(
171+
MentionWarningsInner,
172+
);
173+
174+
export default MentionWarnings;

0 commit comments

Comments
 (0)