Page MenuHomePhabricator

D10034.diff
No OneTemporary

D10034.diff

diff --git a/native/chat/message-list-thread-search.react.js b/native/chat/message-list-thread-search.react.js
--- a/native/chat/message-list-thread-search.react.js
+++ b/native/chat/message-list-thread-search.react.js
@@ -40,7 +40,7 @@
const styles = useStyles(unboundStyles);
const [userListItems, nonFriends] = React.useMemo(() => {
- const nonFriendsSet = new Set();
+ const nonFriendsSet = new Set<string>();
if (userInfoInputArray.length > 0) {
return [userSearchResults, nonFriendsSet];
}
diff --git a/native/chat/thread-screen-pruner.react.js b/native/chat/thread-screen-pruner.react.js
--- a/native/chat/thread-screen-pruner.react.js
+++ b/native/chat/thread-screen-pruner.react.js
@@ -66,7 +66,7 @@
}, [navContext]);
const inStackThreadIDs = React.useMemo(() => {
- const threadIDs = new Set();
+ const threadIDs = new Set<string>();
if (!chatRouteState) {
return threadIDs;
}
diff --git a/native/components/node-height-measurer.react.js b/native/components/node-height-measurer.react.js
--- a/native/components/node-height-measurer.react.js
+++ b/native/components/node-height-measurer.react.js
@@ -92,8 +92,14 @@
mergeItemWithHeight,
initialMeasuredHeights,
} = props;
- const unmeasurableItems = new Map();
- const measurableItems = new Map();
+ const unmeasurableItems = new Map<
+ string,
+ MergedItemPair<InnerItem, InnerMergedItem>,
+ >();
+ const measurableItems = new Map<
+ string,
+ MergedItemPair<InnerItem, InnerMergedItem>,
+ >();
const measuredHeights = initialMeasuredHeights
? new Map(initialMeasuredHeights)
: new Map();
@@ -154,7 +160,7 @@
const { listData, itemToMeasureKey, itemToDummy } = props;
- const toMeasure = new Map();
+ const toMeasure = new Map<string, React.MixedElement>();
if (listData) {
for (const item of listData) {
const measureKey = itemToMeasureKey(item);
@@ -353,8 +359,8 @@
measurableItemsChanged ||
unmeasurableItemsChanged
) {
- const currentMeasurableItems = new Map();
- const currentUnmeasurableItems = new Map();
+ const currentMeasurableItems = new Map<string, Item>();
+ const currentUnmeasurableItems = new Map<string, Item>();
if (listData) {
for (const item of listData) {
const id = itemToID(item);
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -1729,7 +1729,7 @@
const mediaReportsEnabled = useIsReportEnabled('mediaReports');
const staffCanSee = useStaffCanSee();
const textMessageCreationSideEffectsFunc =
- useMessageCreationSideEffectsFunc(messageTypes.TEXT);
+ useMessageCreationSideEffectsFunc<RawTextMessageInfo>(messageTypes.TEXT);
return (
<InputStateContainer
diff --git a/native/navigation/community-drawer-content.react.js b/native/navigation/community-drawer-content.react.js
--- a/native/navigation/community-drawer-content.react.js
+++ b/native/navigation/community-drawer-content.react.js
@@ -64,7 +64,7 @@
})();
}, [callFetchPrimaryLinks, dispatchActionPromise, drawerStatus]);
- const [expanded, setExpanded] = React.useState(() => {
+ const [expanded, setExpanded] = React.useState<Set<string>>(() => {
if (communitiesSuffixed.length === 1) {
return new Set([communitiesSuffixed[0].id]);
}
diff --git a/native/themes/colors.js b/native/themes/colors.js
--- a/native/themes/colors.js
+++ b/native/themes/colors.js
@@ -267,7 +267,7 @@
},
);
-const magicStrings = new Set();
+const magicStrings = new Set<string>();
for (const theme in colors) {
for (const magicString in colors[theme]) {
magicStrings.add(magicString);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 1:30 AM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2447244
Default Alt Text
D10034.diff (3 KB)

Event Timeline