Skip to content

Commit 20f7b18

Browse files
committed
Merge pull request microsoft#7026 from jsoref/spelling
spelling fixes (round 4)
2 parents faeae5e + 284b26f commit 20f7b18

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

src/compiler/core.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ namespace ts {
667667
}
668668

669669
function getNormalizedPathComponentsOfUrl(url: string) {
670-
// Get root length of http://www.website.com/folder1/foler2/
670+
// Get root length of http://www.website.com/folder1/folder2/
671671
// In this example the root is: http://www.website.com/
672672
// normalized path components should be ["http://www.website.com/", "folder1", "folder2"]
673673

@@ -695,7 +695,7 @@ namespace ts {
695695
const indexOfNextSlash = url.indexOf(directorySeparator, rootLength);
696696
if (indexOfNextSlash !== -1) {
697697
// Found the "/" after the website.com so the root is length of http://www.website.com/
698-
// and get components afetr the root normally like any other folder components
698+
// and get components after the root normally like any other folder components
699699
rootLength = indexOfNextSlash + 1;
700700
return normalizedPathComponents(url, rootLength);
701701
}

src/compiler/emitter.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
407407

408408
interface ConvertedLoopState {
409409
/*
410-
* set of labels that occured inside the converted loop
410+
* set of labels that occurred inside the converted loop
411411
* used to determine if labeled jump can be emitted as is or it should be dispatched to calling code
412412
*/
413413
labels?: Map<string>;
414414
/*
415415
* collection of labeled jumps that transfer control outside the converted loop.
416416
* maps store association 'label -> labelMarker' where
417-
* - label - value of label as it apprear in code
417+
* - label - value of label as it appear in code
418418
* - label marker - return value that should be interpreted by calling code as 'jump to <label>'
419419
*/
420420
labeledNonLocalBreaks?: Map<string>;
@@ -437,7 +437,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
437437
* i.e.
438438
* for (let x;;) <statement that captures x in closure and uses 'arguments'>
439439
* should be converted to
440-
* var loop = function(x) { <code where 'arguments' is replaced witg 'arguments_1'> }
440+
* var loop = function(x) { <code where 'arguments' is replaced with 'arguments_1'> }
441441
* var arguments_1 = arguments
442442
* for (var x;;) loop(x);
443443
* otherwise semantics of the code will be different since 'arguments' inside converted loop body
@@ -1005,7 +1005,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10051005
// Examples: `\n` is converted to "\\n", a template string with a newline to "\n".
10061006
let text = getTextOfNodeFromSourceText(currentText, node);
10071007

1008-
// text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"),
1008+
// text contains the original source, it will also contain quotes ("`"), dollar signs and braces ("${" and "}"),
10091009
// thus we need to remove those characters.
10101010
// First template piece starts with "`", others with "}"
10111011
// Last template piece ends with "`", others with "${"
@@ -4064,14 +4064,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40644064
if (properties.length !== 1) {
40654065
// For anything but a single element destructuring we need to generate a temporary
40664066
// to ensure value is evaluated exactly once.
4067-
// When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment
4067+
// When doing so we want to highlight the passed in source map node since thats the one needing this temp assignment
40684068
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode);
40694069
}
40704070
for (const p of properties) {
40714071
if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) {
40724072
const propName = <Identifier | LiteralExpression>(<PropertyAssignment>p).name;
40734073
const target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? <ShorthandPropertyAssignment>p : (<PropertyAssignment>p).initializer || propName;
4074-
// Assignment for target = value.propName should highligh whole property, hence use p as source map node
4074+
// Assignment for target = value.propName should highlight whole property, hence use p as source map node
40754075
emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName), p);
40764076
}
40774077
}
@@ -4082,13 +4082,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40824082
if (elements.length !== 1) {
40834083
// For anything but a single element destructuring we need to generate a temporary
40844084
// to ensure value is evaluated exactly once.
4085-
// When doing so we want to hightlight the passed in source map node since thats the one needing this temp assignment
4085+
// When doing so we want to highlight the passed in source map node since thats the one needing this temp assignment
40864086
value = ensureIdentifier(value, /*reuseIdentifierExpressions*/ true, sourceMapNode);
40874087
}
40884088
for (let i = 0; i < elements.length; i++) {
40894089
const e = elements[i];
40904090
if (e.kind !== SyntaxKind.OmittedExpression) {
4091-
// Assignment for target = value.propName should highligh whole property, hence use e as source map node
4091+
// Assignment for target = value.propName should highlight whole property, hence use e as source map node
40924092
if (e.kind !== SyntaxKind.SpreadElementExpression) {
40934093
emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i)), e);
40944094
}
@@ -6746,7 +6746,7 @@ const _super = (function (geti, seti) {
67466746
// when resolving exports local exported entries/indirect exported entries in the module
67476747
// should always win over entries with similar names that were added via star exports
67486748
// to support this we store names of local/indirect exported entries in a set.
6749-
// this set is used to filter names brought by star expors.
6749+
// this set is used to filter names brought by star exports.
67506750
if (!hasExportStarsToExportValues) {
67516751
// local names set is needed only in presence of star exports
67526752
return undefined;
@@ -8077,7 +8077,7 @@ const _super = (function (geti, seti) {
80778077
// declare var x;
80788078
// /// <reference-path ...>
80798079
// interface F {}
8080-
// The first /// will NOT be removed while the second one will be removed eventhough both node will not be emitted
8080+
// The first /// will NOT be removed while the second one will be removed even though both node will not be emitted
80818081
if (node.pos === 0) {
80828082
leadingComments = filter(getLeadingCommentsToEmit(node), isTripleSlashComment);
80838083
}

src/compiler/program.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace ts {
141141
* 'typings' entry or file 'index' with some supported extension
142142
* - Classic loader will only try to interpret '/a/b/c' as file.
143143
*/
144-
type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFalures: boolean, state: ModuleResolutionState) => string;
144+
type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => string;
145145

146146
/**
147147
* Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to
@@ -151,7 +151,7 @@ namespace ts {
151151
* fallback to standard resolution routine.
152152
*
153153
* - baseUrl - this setting controls how non-relative module names are resolved. If this setting is specified then non-relative
154-
* names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then canditate location to resolve module name 'c/d' will
154+
* names will be resolved relative to baseUrl: i.e. if baseUrl is '/a/b' then candidate location to resolve module name 'c/d' will
155155
* be '/a/b/c/d'
156156
* - paths - this setting can only be used when baseUrl is specified. allows to tune how non-relative module names
157157
* will be resolved based on the content of the module name.
@@ -169,7 +169,7 @@ namespace ts {
169169
* If module name can be matches with multiple patterns then pattern with the longest prefix will be picked.
170170
* After selecting pattern we'll use list of substitutions to get candidate locations of the module and the try to load module
171171
* from the candidate location.
172-
* Substitiution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every
172+
* Substitution is a string that can contain zero or one '*'. To get candidate location from substitution we'll pick every
173173
* substitution in the list and replace '*' with <MatchedStar> string. If candidate location is not rooted it
174174
* will be converted to absolute using baseUrl.
175175
* For example:
@@ -197,10 +197,10 @@ namespace ts {
197197
* 'rootDirs' provides the way to tell compiler that in order to get the whole project it should behave as if content of all
198198
* root dirs were merged together.
199199
* I.e. for the example above 'rootDirs' will have two entries: [ '/local/src', '/shared/components/contracts/src' ].
200-
* Compiler wil first convert './protocols/file2' into absolute path relative to the location of containing file:
200+
* Compiler will first convert './protocols/file2' into absolute path relative to the location of containing file:
201201
* '/local/src/content/protocols/file2' and try to load it - failure.
202202
* Then it will search 'rootDirs' looking for a longest matching prefix of this absolute path and if such prefix is found - absolute path will
203-
* be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remainining
203+
* be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remaining
204204
* entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location.
205205
*/
206206
function tryLoadModuleUsingOptionalResolutionSettings(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader,
@@ -232,7 +232,7 @@ namespace ts {
232232
for (const rootDir of state.compilerOptions.rootDirs) {
233233
// rootDirs are expected to be absolute
234234
// in case of tsconfig.json this will happen automatically - compiler will expand relative names
235-
// using locaton of tsconfig.json as base location
235+
// using location of tsconfig.json as base location
236236
let normalizedRoot = normalizePath(rootDir);
237237
if (!endsWith(normalizedRoot, directorySeparator)) {
238238
normalizedRoot += directorySeparator;
@@ -329,7 +329,7 @@ namespace ts {
329329
}
330330
}
331331
else if (pattern === moduleName) {
332-
// pattern was matched as is - no need to seatch further
332+
// pattern was matched as is - no need to search further
333333
matchedPattern = pattern;
334334
matchedStar = undefined;
335335
break;
@@ -1025,7 +1025,7 @@ namespace ts {
10251025
// We were canceled while performing the operation. Because our type checker
10261026
// might be a bad state, we need to throw it away.
10271027
//
1028-
// Note: we are overly agressive here. We do not actually *have* to throw away
1028+
// Note: we are overly aggressive here. We do not actually *have* to throw away
10291029
// the "noDiagnosticsTypeChecker". However, for simplicity, i'd like to keep
10301030
// the lifetimes of these two TypeCheckers the same. Also, we generally only
10311031
// cancel when the user has made a change anyways. And, in that case, we (the
@@ -1477,7 +1477,7 @@ namespace ts {
14771477
const resolution = resolutions[i];
14781478
setResolvedModule(file, moduleNames[i], resolution);
14791479
// add file to program only if:
1480-
// - resolution was successfull
1480+
// - resolution was successful
14811481
// - noResolve is falsy
14821482
// - module name come from the list fo imports
14831483
const shouldAddFile = resolution &&

src/compiler/scanner.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ namespace ts {
511511
}
512512

513513
// All conflict markers consist of the same character repeated seven times. If it is
514-
// a <<<<<<< or >>>>>>> marker then it is also followd by a space.
514+
// a <<<<<<< or >>>>>>> marker then it is also followed by a space.
515515
const mergeConflictMarkerLength = "<<<<<<<".length;
516516

517517
function isConflictMarkerTrivia(text: string, pos: number) {
@@ -551,7 +551,7 @@ namespace ts {
551551
}
552552
else {
553553
Debug.assert(ch === CharacterCodes.equals);
554-
// Consume everything from the start of the mid-conlict marker to the start of the next
554+
// Consume everything from the start of the mid-conflict marker to the start of the next
555555
// end-conflict marker.
556556
while (pos < len) {
557557
const ch = text.charCodeAt(pos);

src/compiler/sys.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ namespace ts {
500500
readFile,
501501
writeFile,
502502
watchFile: (filePath, callback) => {
503-
// Node 4.0 stablized the `fs.watch` function on Windows which avoids polling
503+
// Node 4.0 stabilized the `fs.watch` function on Windows which avoids polling
504504
// and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649
505505
// and https://github.com/Microsoft/TypeScript/issues/4643), therefore
506506
// if the current node.js version is newer than 4, use `fs.watch` instead.

src/compiler/tsc.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ namespace ts {
115115
const gutterStyleSequence = "\u001b[100;30m";
116116
const gutterSeparator = " ";
117117
const resetEscapeSequence = "\u001b[0m";
118-
const elipsis = "...";
118+
const ellipsis = "...";
119119
const categoryFormatMap: Map<string> = {
120120
[DiagnosticCategory.Warning]: yellowForegroundEscapeSequence,
121121
[DiagnosticCategory.Error]: redForegroundEscapeSequence,
@@ -139,15 +139,15 @@ namespace ts {
139139
const hasMoreThanFiveLines = (lastLine - firstLine) >= 4;
140140
let gutterWidth = (lastLine + 1 + "").length;
141141
if (hasMoreThanFiveLines) {
142-
gutterWidth = Math.max(elipsis.length, gutterWidth);
142+
gutterWidth = Math.max(ellipsis.length, gutterWidth);
143143
}
144144

145145
output += sys.newLine;
146146
for (let i = firstLine; i <= lastLine; i++) {
147147
// If the error spans over 5 lines, we'll only show the first 2 and last 2 lines,
148148
// so we'll skip ahead to the second-to-last line.
149149
if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) {
150-
output += formatAndReset(padLeft(elipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + sys.newLine;
150+
output += formatAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + sys.newLine;
151151
i = lastLine - 1;
152152
}
153153

@@ -341,7 +341,7 @@ namespace ts {
341341
const directory = ts.getDirectoryPath(configFileName);
342342
directoryWatcher = sys.watchDirectory(
343343
// When the configFileName is just "tsconfig.json", the watched directory should be
344-
// the current direcotry; if there is a given "project" parameter, then the configFileName
344+
// the current directory; if there is a given "project" parameter, then the configFileName
345345
// is an absolute file name.
346346
directory == "" ? "." : directory,
347347
watchedDirectoryChanged, /*recursive*/ true);

src/compiler/utilities.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ namespace ts {
137137
node.flags |= NodeFlags.ThisNodeOrAnySubNodesHasError;
138138
}
139139

140-
// Also mark that we've propogated the child information to this node. This way we can
140+
// Also mark that we've propagated the child information to this node. This way we can
141141
// always consult the bit directly on this node without needing to check its children
142142
// again.
143143
node.flags |= NodeFlags.HasAggregatedChildData;
@@ -2586,7 +2586,7 @@ namespace ts {
25862586
byte4 = 64;
25872587
}
25882588

2589-
// Write to the ouput
2589+
// Write to the output
25902590
result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4);
25912591

25922592
i += 3;
@@ -2781,9 +2781,9 @@ namespace ts {
27812781
// . | \
27822782
// ----------------------------------------------------------------------*--------------------------------
27832783
//
2784-
// (Note the dots represent the newly inferrred start.
2784+
// (Note the dots represent the newly inferred start.
27852785
// Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the
2786-
// absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see
2786+
// absolute positions at the asterisks, and the relative change between the dollar signs. Basically, we see
27872787
// which if the two $'s precedes the other, and we move that one forward until they line up. in this case that
27882788
// means:
27892789
//
@@ -2806,8 +2806,8 @@ namespace ts {
28062806
// ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started
28072807
// that's the same as if we started at char 80 instead of 60.
28082808
//
2809-
// As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter
2810-
// than pusing the first edit forward to match the second, we'll push the second edit forward to match the
2809+
// As it so happens, the same logic applies if the second edit precedes the first edit. In that case rather
2810+
// than pushing the first edit forward to match the second, we'll push the second edit forward to match the
28112811
// first.
28122812
//
28132813
// In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange

0 commit comments

Comments
 (0)