From d57954345b727affdf9c9a70e4e0c8ddb7b97b51 Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Wed, 2 Dec 2020 06:46:41 +0900 Subject: [PATCH] Fix typos (#41723) --- src/compiler/checker.ts | 4 ++-- src/compiler/core.ts | 2 +- src/compiler/moduleNameResolver.ts | 2 +- src/compiler/watchPublic.ts | 2 +- src/services/codefixes/convertToAsyncFunction.ts | 2 +- src/services/navigationBar.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 833428e3321..460b885b5d1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16672,7 +16672,7 @@ namespace ts { } for (const [msg, ...args] of secondaryRootErrors) { const originalValue = msg.elidedInCompatabilityPyramid; - msg.elidedInCompatabilityPyramid = false; // Teporarily override elision to ensure error is reported + msg.elidedInCompatabilityPyramid = false; // Temporarily override elision to ensure error is reported reportError(msg, ...args); msg.elidedInCompatabilityPyramid = originalValue; } @@ -24038,7 +24038,7 @@ namespace ts { function getContextualTypeForChildJsxExpression(node: JsxElement, child: JsxChild) { const attributesType = getApparentTypeOfContextualType(node.openingElement.tagName); - // JSX expression is in children of JSX Element, we will look for an "children" atttribute (we get the name from JSX.ElementAttributesProperty) + // JSX expression is in children of JSX Element, we will look for an "children" attribute (we get the name from JSX.ElementAttributesProperty) const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node)); if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) { return undefined; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 34873caccb7..d4dccd5f1f5 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1591,7 +1591,7 @@ namespace ts { // | 1. | i | 105 | Ascii i | // | 2. | I | 73 | Ascii I | // |-------- Special characters ------------------------------------------------------------------------| - // | 3. | \u0130 | 304 | Uppper case I with dot above | + // | 3. | \u0130 | 304 | Upper case I with dot above | // | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | // | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | // | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index fbd4f57a4a0..6329387b281 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -1023,7 +1023,7 @@ namespace ts { /** * This will be called on the successfully resolved path from `loadModuleFromFile`. - * (Not neeeded for `loadModuleFromNodeModules` as that looks up the `package.json` as part of resolution.) + * (Not needed for `loadModuleFromNodeModules` as that looks up the `package.json` as part of resolution.) * * packageDirectory is the directory of the package itself. * For `blah/node_modules/foo/index.d.ts` this is packageDirectory: "foo" diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index 9c4349d711e..71392530807 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -253,7 +253,7 @@ namespace ts { const sourceFilesCache = new Map(); // Cache that stores the source file and version info - let missingFilePathsRequestedForRelease: Path[] | undefined; // These paths are held temparirly so that we can remove the entry from source file cache if the file is not tracked by missing files + let missingFilePathsRequestedForRelease: Path[] | undefined; // These paths are held temporarily so that we can remove the entry from source file cache if the file is not tracked by missing files let hasChangedCompilerOptions = false; // True if the compiler options have changed between compilations const useCaseSensitiveFileNames = host.useCaseSensitiveFileNames(); diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index e2d5fba8943..4db53ac9af4 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -142,7 +142,7 @@ namespace ts.codefix { } /* - Renaming of identifiers may be neccesary as the refactor changes scopes - + Renaming of identifiers may be necessary as the refactor changes scopes - This function collects all existing identifier names and names of identifiers that will be created in the refactor. It then checks for any collisions and renames them through getSynthesizedDeepClone */ diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 4704e86846b..a39b8bef4e0 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -708,7 +708,7 @@ namespace ts.NavigationBar { return "default"; } // We may get a string with newlines or other whitespace in the case of an object dereference - // (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the + // (eg: "app\n.onactivated"), so we should remove the whitespace for readability in the // navigation bar. return getFunctionOrClassName(node); case SyntaxKind.Constructor: