@samitouri / QOS-React / commits / 42c30e8b12

Correct typing errors detected in several files (#22965)

* Correct spelling errors in several files * Correct typos in devtools-shared package files

Borja Paz Rodríguez committed Jan 4, 2022 at 16:30 UTC 42c30e8b122841d7fe72e28e36848a6de1363b0c
6 files changed +12 -12
packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.css
+2 -2
@@ -116,8 +116,8 @@
116 color: var(--color-button);
117 }
118
119 -.TimlineSearchInputContainer {
119 +.TimelineSearchInputContainer {
120 flex: 1 1;
121 display: flex;
122 align-items: center;
123 -}
\ No newline at end of file
123 +}
packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js
+1 -1
@@ -125,7 +125,7 @@ function Profiler(_: {||}) {
125 {!isLegacyProfilerSelected && (
126 <div
127 ref={searchInputContainerRef}
128 - className={styles.TimlineSearchInputContainer}
128 + className={styles.TimelineSearchInputContainer}
129 />
130 )}
131 <SettingsModalContextToggle />
packages/react-devtools-shared/src/hooks/__tests__/__source__/README.md
+1 -1
@@ -1 +1 @@
1 -The JavaScript files and source maps in this directory are used to test DevTools hook name parsing code. The files here use source maps in different formats to mirror real world applications. The source for the files is located in the parnet `__tests__` folder. To regenerate these compiled files, run `yarn update-mock-source-maps` in the `react-devtools-extensions` directory.
\ No newline at end of file
1 +The JavaScript files and source maps in this directory are used to test DevTools hook name parsing code. The files here use source maps in different formats to mirror real world applications. The source for the files is located in the parent `__tests__` folder. To regenerate these compiled files, run `yarn update-mock-source-maps` in the `react-devtools-extensions` directory.
packages/react-devtools-shared/src/hooks/astUtils.js
+6 -6
@@ -147,8 +147,8 @@ export function getHookName(
147 originalSourceLineNumber,
148 );
149
150 - const hookDeclaractionCheck = isConfirmedHookDeclaration(node);
151 - return nodeLocationCheck && hookDeclaractionCheck;
150 + const hookDeclarationCheck = isConfirmedHookDeclaration(node);
151 + return nodeLocationCheck && hookDeclarationCheck;
152 });
153
154 if (matchingNodes.length === 1) {
@@ -162,8 +162,8 @@ export function getHookName(
162 originalSourceColumnNumber,
163 );
164
165 - const hookDeclaractionCheck = isConfirmedHookDeclaration(node);
166 - return nodeLocationCheck && hookDeclaractionCheck;
165 + const hookDeclarationCheck = isConfirmedHookDeclaration(node);
166 + return nodeLocationCheck && hookDeclarationCheck;
167 });
168 }
169
@@ -398,7 +398,7 @@ export function getHookNamesMappingFromAST(
398 // If it doesn't, we immediately use the declared variable name
399 // as the Hook name. We do this because for any other Hooks that
400 // aren't the built-in Hooks that return a tuple, we can't reliably
401 - // extract a Hook name from other variable declartions derived from
401 + // extract a Hook name from other variable declarations derived from
402 // this one, since we don't know which of the declared variables
403 // are the relevant ones to track and show in dev tools.
404 if (!isBuiltInHookThatReturnsTuple(path)) {
@@ -455,7 +455,7 @@ export function getHookNamesMappingFromAST(
455 case AST_NODE_TYPES.MEMBER_EXPRESSION: {
456 // When encountering a MemberExpression inside the new
457 // variable declaration, we only want to extract the variable
458 - // name if we're assinging the value of the first member,
458 + // name if we're assigning the value of the first member,
459 // which is handled by `filterMemberWithHookVariableName`.
460 // E.g.
461 // const countState = useState(0);
packages/react-devtools-shared/src/inspectedElementMutableSource.js
+1 -1
@@ -32,7 +32,7 @@ import type {
32 // We use an LRU for this rather than a WeakMap because of how the "no-change" optimization works.
33 // When the frontend polls the backend for an update on the element that's currently inspected,
34 // the backend will send a "no-change" message if the element hasn't updated (rendered) since the last time it was asked.
35 -// In thid case, the frontend cache should reuse the previous (cached) value.
35 +// In this case, the frontend cache should reuse the previous (cached) value.
36 // Using a WeakMap keyed on Element generally works well for this, since Elements are mutable and stable in the Store.
37 // This doens't work properly though when component filters are changed,
38 // because this will cause the Store to dump all roots and re-initialize the tree (recreating the Element objects).
packages/react-dom/src/client/ReactDOMLegacy.js
+1 -1
@@ -121,7 +121,7 @@ function legacyCreateRootFromDOMContainer(
121 null, // hydrationCallbacks
122 false, // isStrictMode
123 false, // concurrentUpdatesByDefaultOverride,
124 - '', // identiferPrefix
124 + '', // identifierPrefix
125 );
126 markContainerAsRoot(root.current, container);
127