Skip to content

Commit ac1aa75

Browse files
szarbartoszmeta-codesync[bot]
authored andcommitted
chore: fix typos in test descriptions and code comments (#55651)
Summary: I was upgrading bare react native project to expo sdk 54 and stumbled upon ``` "TurboModule system assumes returnType == void iff the method is synchronous." ``` error from `turbomodule/core/TurboModuleInteropUtils.kt` I thought that `iff` with double `f` was a typo and wanted to submit a pr with fix - I learned that it means `if and only if` - decided to scan the repo for any other typos anywany - submitting the ones that I've found. ## Changelog: [Internal] <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message Pull Request resolved: #55651 Reviewed By: cipolleschi Differential Revision: D93876470 Pulled By: cortinico fbshipit-source-id: 43fc905bda14e77b27cdeda568bde1e2299d9d0f
1 parent efb80f9 commit ac1aa75

8 files changed

Lines changed: 108 additions & 108 deletions

File tree

packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL
152152
};
153153

154154
// Check whether the native component exists in the app binary.
155-
// Old getViewManagerConfig() checks for the existance of the native Paper view manager. Not available in Bridgeless.
155+
// Old getViewManagerConfig() checks for the existence of the native Paper view manager. Not available in Bridgeless.
156156
// New hasViewManagerConfig() queries Fabric’s native component registry directly.
157157
const DeprecatedComponentNameCheckTemplate = ({
158158
componentName,

packages/react-native-codegen/src/parsers/parsers-commons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,10 @@ function buildSchemaFromConfigType(
592592
if (parsingErrors.length > 0) {
593593
/**
594594
* TODO(T77968131): We have two options:
595-
* - Throw the first error, but indicate there are more then one errors.
595+
* - Throw the first error, but indicate there are more than one error.
596596
* - Display all errors, nicely formatted.
597597
*
598-
* For the time being, we're just throw the first error.
598+
* For the time being, we're just throwing the first error.
599599
**/
600600

601601
throw parsingErrors[0];

packages/react-native/React/CoreModules/RCTDevLoadingView.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ - (void)showMessage:(NSString *)message
158158
buttonConfig.background.cornerRadius = 10;
159159
buttonConfig.baseForegroundColor = color;
160160

161-
// Button is a visual cue to tap anywhere on the banner to dismiss so no seperate action is needed
161+
// Button is a visual cue to tap anywhere on the banner to dismiss so no separate action is needed
162162
self->_dismissButton = [UIButton buttonWithConfiguration:buttonConfig primaryAction:nil];
163163
self->_dismissButton.userInteractionEnabled = NO;
164164
self->_dismissButton.translatesAutoresizingMaskIntoConstraints = NO;

packages/react-native/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceStreamInterrupted) {
10551055
})
10561056
.RetiresOnSaturation();
10571057

1058-
// Load the resource, receiving headers succesfully.
1058+
// Load the resource, receiving headers successfully.
10591059
toPage_->sendMessage(R"({
10601060
"id": 1,
10611061
"method": "Network.loadNetworkResource",
@@ -1269,7 +1269,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceStreamClosed) {
12691269
})
12701270
.RetiresOnSaturation();
12711271

1272-
// Load the resource, receiving headers succesfully.
1272+
// Load the resource, receiving headers successfully.
12731273
toPage_->sendMessage(R"({
12741274
"id": 1,
12751275
"method": "Network.loadNetworkResource",
@@ -1358,7 +1358,7 @@ TEST_F(HostTargetTest, NetworkLoadNetworkResourceAgentDisconnect) {
13581358
})
13591359
.RetiresOnSaturation();
13601360

1361-
// Load the resource, receiving headers succesfully.
1361+
// Load the resource, receiving headers successfully.
13621362
toPage_->sendMessage(R"({
13631363
"id": 1,
13641364
"method": "Network.loadNetworkResource",

packages/react-native/ReactCommon/react/renderer/uimanager/PointerHoverTracker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PointerHoverTracker::PointerHoverTracker(
1919
: target_(std::move(target)) {
2020
if (target_ != nullptr) {
2121
// Retrieve the root shadow node at this current revision so that we can
22-
// leverage it to get the event path list at the moment the event occured
22+
// leverage it to get the event path list at the moment the event occurred
2323
auto rootShadowNode = std::shared_ptr<const ShadowNode>{};
2424
auto& shadowTreeRegistry = uiManager.getShadowTreeRegistry();
2525
shadowTreeRegistry.visit(

packages/react-native/src/private/webapis/structuredClone/structuredClone.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const BASIC_CONSTRUCTORS = [Number, String, Boolean, Date];
2828

2929
const ObjectPrototype = Object.prototype;
3030

31-
// Technicall the memory value should be a parameter in
31+
// Technically the memory value should be a parameter in
3232
// `structuredCloneInternal` but as an optimization we can reuse the same map
3333
// and avoid allocating a new one in every call to `structuredClone`.
3434
// This is safe because we don't invoke user code in `structuredClone`, so at
@@ -205,7 +205,7 @@ function structuredCloneInternal<T>(value: T): T {
205205
* but implements the cloning in a single step.
206206
*
207207
* Known limitations:
208-
* - It does not support transfering values.
208+
* - It does not support transferring values.
209209
*/
210210
export default function structuredClone<T>(value: T): T {
211211
try {

packages/virtualized-lists/Lists/__tests__/VirtualizedList-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,12 +1374,12 @@ it('does not over-render when there is less than initialNumToRender cells', asyn
13741374
);
13751375
});
13761376

1377-
// Check that the first render clamps to the last item when intialNumToRender
1377+
// Check that the first render clamps to the last item when initialNumToRender
13781378
// goes over it.
13791379
expect(component).toMatchSnapshot();
13801380
});
13811381

1382-
it('retains intitial render if initialScrollIndex == 0', async () => {
1382+
it('retains initial render if initialScrollIndex == 0', async () => {
13831383
const items = generateItems(20);
13841384
const ITEM_HEIGHT = 10;
13851385

@@ -1415,7 +1415,7 @@ it('retains intitial render if initialScrollIndex == 0', async () => {
14151415
expect(component).toMatchSnapshot();
14161416
});
14171417

1418-
it('discards intitial render if initialScrollIndex != 0', async () => {
1418+
it('discards initial render if initialScrollIndex != 0', async () => {
14191419
const items = generateItems(20);
14201420
const ITEM_HEIGHT = 10;
14211421

@@ -1617,7 +1617,7 @@ it('adjusts render area with non-zero initialScrollIndex', async () => {
16171617
jest.advanceTimersToNextTimer(3);
16181618
});
16191619

1620-
// We should expand the render area after receiving a message indcating we
1620+
// We should expand the render area after receiving a message indicating we
16211621
// arrived at initialScrollIndex.
16221622
expect(component).toMatchSnapshot();
16231623
});
@@ -1711,7 +1711,7 @@ it('renders no spacers up to initialScrollIndex on first render when virtualizat
17111711
});
17121712

17131713
// There should be no spacers present in an offset initial render with
1714-
// virtualiztion disabled. Only initialNumToRender items starting at
1714+
// virtualization disabled. Only initialNumToRender items starting at
17151715
// initialScrollIndex.
17161716
expect(component).toMatchSnapshot();
17171717
});
@@ -1734,7 +1734,7 @@ it('expands first in viewport to render up to maxToRenderPerBatch on initial ren
17341734
});
17351735

17361736
// When virtualization is disabled we may render items before initialItemIndex
1737-
// if initialItemIndex + initialNumToRender < maToRenderPerBatch. Expect cells
1737+
// if initialItemIndex + initialNumToRender < maxToRenderPerBatch. Expect cells
17381738
// 0-3 to be rendered in this example, even though initialScrollIndex is 4.
17391739
expect(component).toMatchSnapshot();
17401740
});

packages/virtualized-lists/Lists/__tests__/__snapshots__/VirtualizedList-test.js.snap

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ exports[`constrains batch render region when an item is removed 1`] = `
20972097
</RCTScrollView>
20982098
`;
20992099

2100-
exports[`discards intitial render if initialScrollIndex != 0 1`] = `
2100+
exports[`discards initial render if initialScrollIndex != 0 1`] = `
21012101
<RCTScrollView
21022102
data={
21032103
Array [
@@ -5846,97 +5846,7 @@ exports[`retains batch render region when an item is appended 1`] = `
58465846
</RCTScrollView>
58475847
`;
58485848

5849-
exports[`retains initial render region when an item is appended 1`] = `
5850-
<RCTScrollView
5851-
data={
5852-
Array [
5853-
Object {
5854-
"key": 0,
5855-
},
5856-
Object {
5857-
"key": 1,
5858-
},
5859-
Object {
5860-
"key": 2,
5861-
},
5862-
Object {
5863-
"key": 3,
5864-
},
5865-
Object {
5866-
"key": 4,
5867-
},
5868-
Object {
5869-
"key": 5,
5870-
},
5871-
Object {
5872-
"key": 6,
5873-
},
5874-
Object {
5875-
"key": 7,
5876-
},
5877-
Object {
5878-
"key": 8,
5879-
},
5880-
Object {
5881-
"key": 9,
5882-
},
5883-
Object {
5884-
"key": 10,
5885-
},
5886-
]
5887-
}
5888-
getItem={[Function]}
5889-
getItemCount={[Function]}
5890-
getItemLayout={[Function]}
5891-
initialNumToRender={3}
5892-
onContentSizeChange={[Function]}
5893-
onLayout={[Function]}
5894-
onMomentumScrollBegin={[Function]}
5895-
onMomentumScrollEnd={[Function]}
5896-
onScroll={[Function]}
5897-
onScrollBeginDrag={[Function]}
5898-
onScrollEndDrag={[Function]}
5899-
renderItem={[Function]}
5900-
scrollEventThrottle={0.0001}
5901-
stickyHeaderIndices={Array []}
5902-
>
5903-
<View>
5904-
<View
5905-
onFocusCapture={[Function]}
5906-
style={null}
5907-
>
5908-
<MockCellItem
5909-
value={0}
5910-
/>
5911-
</View>
5912-
<View
5913-
onFocusCapture={[Function]}
5914-
style={null}
5915-
>
5916-
<MockCellItem
5917-
value={1}
5918-
/>
5919-
</View>
5920-
<View
5921-
onFocusCapture={[Function]}
5922-
style={null}
5923-
>
5924-
<MockCellItem
5925-
value={2}
5926-
/>
5927-
</View>
5928-
<View
5929-
style={
5930-
Object {
5931-
"height": 80,
5932-
}
5933-
}
5934-
/>
5935-
</View>
5936-
</RCTScrollView>
5937-
`;
5938-
5939-
exports[`retains intitial render if initialScrollIndex == 0 1`] = `
5849+
exports[`retains initial render if initialScrollIndex == 0 1`] = `
59405850
<RCTScrollView
59415851
data={
59425852
Array [
@@ -6119,6 +6029,96 @@ exports[`retains intitial render if initialScrollIndex == 0 1`] = `
61196029
</RCTScrollView>
61206030
`;
61216031

6032+
exports[`retains initial render region when an item is appended 1`] = `
6033+
<RCTScrollView
6034+
data={
6035+
Array [
6036+
Object {
6037+
"key": 0,
6038+
},
6039+
Object {
6040+
"key": 1,
6041+
},
6042+
Object {
6043+
"key": 2,
6044+
},
6045+
Object {
6046+
"key": 3,
6047+
},
6048+
Object {
6049+
"key": 4,
6050+
},
6051+
Object {
6052+
"key": 5,
6053+
},
6054+
Object {
6055+
"key": 6,
6056+
},
6057+
Object {
6058+
"key": 7,
6059+
},
6060+
Object {
6061+
"key": 8,
6062+
},
6063+
Object {
6064+
"key": 9,
6065+
},
6066+
Object {
6067+
"key": 10,
6068+
},
6069+
]
6070+
}
6071+
getItem={[Function]}
6072+
getItemCount={[Function]}
6073+
getItemLayout={[Function]}
6074+
initialNumToRender={3}
6075+
onContentSizeChange={[Function]}
6076+
onLayout={[Function]}
6077+
onMomentumScrollBegin={[Function]}
6078+
onMomentumScrollEnd={[Function]}
6079+
onScroll={[Function]}
6080+
onScrollBeginDrag={[Function]}
6081+
onScrollEndDrag={[Function]}
6082+
renderItem={[Function]}
6083+
scrollEventThrottle={0.0001}
6084+
stickyHeaderIndices={Array []}
6085+
>
6086+
<View>
6087+
<View
6088+
onFocusCapture={[Function]}
6089+
style={null}
6090+
>
6091+
<MockCellItem
6092+
value={0}
6093+
/>
6094+
</View>
6095+
<View
6096+
onFocusCapture={[Function]}
6097+
style={null}
6098+
>
6099+
<MockCellItem
6100+
value={1}
6101+
/>
6102+
</View>
6103+
<View
6104+
onFocusCapture={[Function]}
6105+
style={null}
6106+
>
6107+
<MockCellItem
6108+
value={2}
6109+
/>
6110+
</View>
6111+
<View
6112+
style={
6113+
Object {
6114+
"height": 80,
6115+
}
6116+
}
6117+
/>
6118+
</View>
6119+
</RCTScrollView>
6120+
`;
6121+
61226122
exports[`unmounts sticky headers moved below viewport 1`] = `
61236123
<RCTScrollView
61246124
data={

0 commit comments

Comments
 (0)