diff --git a/doc/spec.md b/doc/spec.md
index edf8455ac54..741d4f29cec 100644
--- a/doc/spec.md
+++ b/doc/spec.md
@@ -3715,7 +3715,7 @@ the array literal initializer expression is contextually typed by the implied ty
## 5.3 Let and Const Declarations
-Let and const declarations are exended to include optional type annotations.
+Let and const declarations are extended to include optional type annotations.
*LexicalBinding:* *( Modified )*
*SimpleLexicalBinding*
diff --git a/src/cancellationToken/cancellationToken.ts b/src/cancellationToken/cancellationToken.ts
index 9b74ebb713a..059ef37c8f1 100644
--- a/src/cancellationToken/cancellationToken.ts
+++ b/src/cancellationToken/cancellationToken.ts
@@ -35,8 +35,8 @@ function createCancellationToken(args: string[]): ServerCancellationToken {
}
// cancellationPipeName is a string without '*' inside that can optionally end with '*'
// when client wants to signal cancellation it should create a named pipe with name=
- // server will synchronously check the presence of the pipe and treat its existance as indicator that current request should be canceled.
- // in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancelellationPipeName.
+ // server will synchronously check the presence of the pipe and treat its existence as indicator that current request should be canceled.
+ // in case if client prefers to use more fine-grained schema than one name for all request it can add '*' to the end of cancellationPipeName.
// in this case pipe name will be build dynamically as .
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
const namePrefix = cancellationPipeName.slice(0, -1);
diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts
index 27f85896a3b..6781f6f1701 100644
--- a/src/compiler/binder.ts
+++ b/src/compiler/binder.ts
@@ -550,7 +550,7 @@ namespace ts {
}
}
// We create a return control flow graph for IIFEs and constructors. For constructors
- // we use the return control flow graph in strict property intialization checks.
+ // we use the return control flow graph in strict property initialization checks.
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor ? createBranchLabel() : undefined;
currentBreakTarget = undefined;
currentContinueTarget = undefined;
@@ -3445,7 +3445,7 @@ namespace ts {
// If a FunctionDeclaration is generator function and is the body of a
// transformed async function, then this node can be transformed to a
// down-level generator.
- // Currently we do not support transforming any other generator fucntions
+ // Currently we do not support transforming any other generator functions
// down level.
if (node.asteriskToken) {
transformFlags |= TransformFlags.AssertGenerator;
diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts
index 44ae6a299d8..c95a8270052 100644
--- a/src/compiler/builder.ts
+++ b/src/compiler/builder.ts
@@ -27,7 +27,7 @@ namespace ts {
currentChangedFilePath: Path | undefined;
/**
* Map of file signatures, with key being file path, calculated while getting current changed file's affected files
- * These will be commited whenever the iteration through affected files of current changed file is complete
+ * These will be committed whenever the iteration through affected files of current changed file is complete
*/
currentAffectedFilesSignatures: Map | undefined;
/**
diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts
index 552f46c378d..a394ff56201 100644
--- a/src/compiler/builderState.ts
+++ b/src/compiler/builderState.ts
@@ -37,7 +37,7 @@ namespace ts {
*/
readonly referencedMap: ReadonlyMap | undefined;
/**
- * Contains the map of exported modules ReferencedSet=exorted module files from the file if module emit is enabled
+ * Contains the map of exported modules ReferencedSet=exported module files from the file if module emit is enabled
* Otherwise undefined
*/
readonly exportedModulesMap: Map | undefined;
@@ -268,9 +268,9 @@ namespace ts.BuilderState {
*/
export function getFilesAffectedBy(state: BuilderState, programOfThisState: Program, path: Path, cancellationToken: CancellationToken | undefined, computeHash: ComputeHash, cacheToUpdateSignature?: Map, exportedModulesMapCache?: ComputingExportedModulesMap): ReadonlyArray {
// Since the operation could be cancelled, the signatures are always stored in the cache
- // They will be commited once it is safe to use them
+ // They will be committed once it is safe to use them
// eg when calling this api from tsserver, if there is no cancellation of the operation
- // In the other cases the affected files signatures are commited only after the iteration through the result is complete
+ // In the other cases the affected files signatures are committed only after the iteration through the result is complete
const signatureCache = cacheToUpdateSignature || createMap();
const sourceFile = programOfThisState.getSourceFileByPath(path);
if (!sourceFile) {
diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index 6385d150a3e..59def3858db 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -6311,7 +6311,7 @@ namespace ts {
return false;
}
- /** A type parameter is thisless if its contraint is thisless, or if it has no constraint. */
+ /** A type parameter is thisless if its constraint is thisless, or if it has no constraint. */
function isThislessTypeParameter(node: TypeParameterDeclaration) {
const constraint = getEffectiveConstraintOfTypeParameter(node);
return !constraint || isThislessType(constraint);
@@ -10012,10 +10012,10 @@ namespace ts {
if (checkType.flags & TypeFlags.Any) {
return getUnionType([instantiateType(root.trueType, combinedMapper || mapper), instantiateType(root.falseType, mapper)]);
}
- // Return falseType for a definitely false extends check. We check an instantations of the two
+ // Return falseType for a definitely false extends check. We check an instantiations of the two
// types with type parameters mapped to the wildcard type, the most permissive instantiations
// possible (the wildcard type is assignable to and from all types). If those are not related,
- // then no instatiations will be and we can just return the false branch type.
+ // then no instantiations will be and we can just return the false branch type.
if (!isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType))) {
return instantiateType(root.falseType, mapper);
}
@@ -14477,7 +14477,7 @@ namespace ts {
// that is _too good_ in projects with complicated constraints (eg, fp-ts). In such cases, if we did not limit ourselves
// here, we might produce more valid inferences for types, causing us to do more checks and perform more instantiations
// (in addition to the extra stack depth here) which, in turn, can push the already close process over its limit.
- // TL;DR: If we ever become generally more memory efficienct (or our resource budget ever increases), we should just
+ // TL;DR: If we ever become generally more memory efficient (or our resource budget ever increases), we should just
// remove this `allowComplexConstraintInference` flag.
allowComplexConstraintInference = false;
return inferFromTypes(apparentSource, target);
@@ -18906,7 +18906,7 @@ namespace ts {
// if jsx emit was not react as there wont be error being emitted
reactSym.isReferenced = SymbolFlags.All;
- // If react symbol is alias, mark it as refereced
+ // If react symbol is alias, mark it as referenced
if (reactSym.flags & SymbolFlags.Alias && !isConstEnumOrConstEnumOnlyModule(resolveAlias(reactSym))) {
markAliasSymbolAsReferenced(reactSym);
}
@@ -28256,7 +28256,7 @@ namespace ts {
throwIfNonDiagnosticsProducing();
if (sourceFile) {
// Some global diagnostics are deferred until they are needed and
- // may not be reported in the firt call to getGlobalDiagnostics.
+ // may not be reported in the first call to getGlobalDiagnostics.
// We should catch these changes and report them.
const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics();
const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length;
diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts
index 43275605e23..5f01e66e073 100644
--- a/src/compiler/commandLineParser.ts
+++ b/src/compiler/commandLineParser.ts
@@ -1935,7 +1935,7 @@ namespace ts {
function directoryOfCombinedPath(fileName: string, basePath: string) {
// Use the `getNormalizedAbsolutePath` function to avoid canonicalizing the path, as it must remain noncanonical
- // until consistient casing errors are reported
+ // until consistent casing errors are reported
return getDirectoryPath(getNormalizedAbsolutePath(fileName, basePath));
}