From 4b77f34243fa6e431df55573a57b144bee68b337 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 7 May 2019 21:00:56 +0300 Subject: [PATCH] Fixed several typos, mostly in comments and parameter names. (#31287) --- src/compiler/checker.ts | 16 ++++++++-------- src/compiler/core.ts | 4 ++-- src/compiler/types.ts | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index dbb0180dfdb80..a1d5f287e44e2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -230,10 +230,10 @@ namespace ts { }, isContextSensitive, getFullyQualifiedName, - getResolvedSignature: (node, candidatesOutArray, agumentCount) => - getResolvedSignatureWorker(node, candidatesOutArray, agumentCount, CheckMode.Normal), - getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, agumentCount) => - getResolvedSignatureWorker(node, candidatesOutArray, agumentCount, CheckMode.IsForSignatureHelp), + getResolvedSignature: (node, candidatesOutArray, argumentCount) => + getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.Normal), + getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => + getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.IsForSignatureHelp), getExpandedParameters, hasEffectiveRestParameter, getConstantValue: nodeIn => { @@ -3183,7 +3183,7 @@ namespace ts { let containers = getContainersOfSymbol(symbol, enclosingDeclaration); // If we're trying to reference some object literal in, eg `var a = { x: 1 }`, the symbol for the literal, `__object`, is distinct // from the symbol of the declaration it is being assigned to. Since we can use the declaration to refer to the literal, however, - // we'd like to make that connection here - potentially causing us to paint the declararation's visibiility, and therefore the literal. + // we'd like to make that connection here - potentially causing us to paint the declaration's visibility, and therefore the literal. const firstDecl: Node = first(symbol.declarations); if (!length(containers) && meaning & SymbolFlags.Value && firstDecl && isObjectLiteralExpression(firstDecl)) { if (firstDecl.parent && isVariableDeclaration(firstDecl.parent) && firstDecl === firstDecl.parent.initializer) { @@ -7732,10 +7732,10 @@ namespace ts { } } // If the target is a union type or if we are intersecting with types belonging to one of the - // disjoint domans, we may end up producing a constraint that hasn't been examined before. + // disjoint domains, we may end up producing a constraint that hasn't been examined before. if (constraints && (targetIsUnion || hasDisjointDomainType)) { if (hasDisjointDomainType) { - // We add any types belong to one of the disjoint domans because they might cause the final + // We add any types belong to one of the disjoint domains because they might cause the final // intersection operation to reduce the union constraints. for (const t of type.types) { if (t.flags & TypeFlags.DisjointDomains) { @@ -7785,7 +7785,7 @@ namespace ts { } if (constraintDepth >= 50) { // We have reached 50 recursive invocations of getImmediateBaseConstraint and there is a - // very high likelyhood we're dealing with an infinite generic type that perpetually generates + // very high likelihood we're dealing with an infinite generic type that perpetually generates // new type identities as we descend into it. We stop the recursion here and mark this type // and the outer types as having circular constraints. error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 550e2c90e1244..2dfc7acf18826 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -239,7 +239,7 @@ namespace ts { } // When the deleted entry was the last one, we need to - // adust the lastEntry reference. + // adjust the lastEntry reference. if (this.lastEntry === entry) { this.lastEntry = previousEntry; } @@ -1255,7 +1255,7 @@ namespace ts { } /** - * Returns the only element of an array if it contains only one element; otheriwse, returns the + * Returns the only element of an array if it contains only one element; otherwise, returns the * array. */ export function singleOrMany(array: T[]): T | T[]; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index af4194a9c6949..205ad19b95e5f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2614,7 +2614,7 @@ namespace ts { // Incomplete types occur during control flow analysis of loops. An IncompleteType // is distinguished from a regular type by a flags value of zero. Incomplete type - // objects are internal to the getFlowTypeOfRefecence function and never escape it. + // objects are internal to the getFlowTypeOfReference function and never escape it. export interface IncompleteType { flags: TypeFlags; // No flags set type: Type; // The type marked incomplete @@ -5137,7 +5137,7 @@ namespace ts { createHash?(data: string): string; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesnt use compilerHost as base + // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesn't use compilerHost as base /*@internal*/createDirectory?(directory: string): void; }