Skip to content

fix spelling errors #36523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/eslint/rules/one-namespace-per-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export = createRule({
recommended: "error",
},
messages: {
excessNamespaceError: `All but one of these namespaces should be moved into seperate files.`,
excessNamespaceError: `All but one of these namespaces should be moved into separate files.`,
},
schema: [],
type: "problem",
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5733,7 +5733,7 @@ namespace ts {
// function g() {}
// module.exports.g = g
// ```
// In such a situation, we have a local variable named `g`, and a seperate exported variable named `g`.
// In such a situation, we have a local variable named `g`, and a separate exported variable named `g`.
// Naively, we would emit
// ```
// function g() {}
Expand Down Expand Up @@ -32279,7 +32279,7 @@ namespace ts {
const sourceConstraint = constraint && getTypeFromTypeNode(constraint);
const targetConstraint = getConstraintOfTypeParameter(target);
// relax check if later interface augmentation has no constraint, it's more broad and is OK to merge with
// a more constrained interface (this could be generalized to a full heirarchy check, but that's maybe overkill)
// a more constrained interface (this could be generalized to a full hierarchy check, but that's maybe overkill)
if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/watchPublic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ namespace ts {

let fileOrDirectoryPath: Path | undefined = toPath(fileOrDirectory);

// Since the file existance changed, update the sourceFiles cache
// Since the file existence changed, update the sourceFiles cache
if (cachedDirectoryStructureHost) {
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
}
Expand Down
8 changes: 4 additions & 4 deletions src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ namespace ts.server {
* openFilesImpactedByConfigFiles is a map of open files that would be impacted by this config file
* because these are the paths being looked up for their default configured project location
* The value in the map is true if the open file is root of the inferred project
* It is false when the open file that would still be impacted by existance of
* It is false when the open file that would still be impacted by existence of
* this config file but it is not the root of inferred project
*/
openFilesImpactedByConfigFile: Map<boolean>;
Expand Down Expand Up @@ -575,7 +575,7 @@ namespace ts.server {
*/
private readonly projectToSizeMap: Map<number> = createMap<number>();
/**
* This is a map of config file paths existance that doesnt need query to disk
* This is a map of config file paths existence that doesnt need query to disk
* - The entry can be present because there is inferred project that needs to watch addition of config file to directory
* In this case the exists could be true/false based on config file is present or not
* - Or it is present if we have configured project open with config file at that location
Expand Down Expand Up @@ -1426,7 +1426,7 @@ namespace ts.server {
private setConfigFileExistenceByNewConfiguredProject(project: ConfiguredProject) {
const configFileExistenceInfo = this.getConfigFileExistenceInfo(project);
if (configFileExistenceInfo) {
// The existance might not be set if the file watcher is not invoked by the time config project is created by external project
// The existence might not be set if the file watcher is not invoked by the time config project is created by external project
configFileExistenceInfo.exists = true;
// close existing watcher
if (configFileExistenceInfo.configFileWatcherForRootOfInferredProject) {
Expand Down Expand Up @@ -2718,7 +2718,7 @@ namespace ts.server {
// since info is added as root to the inferred project only when there are no other projects containing it
// So when it is root of the inferred project and after project structure updates its now part
// of multiple project it needs to be removed from that inferred project because:
// - references in inferred project supercede the root part
// - references in inferred project supersede the root part
// - root / reference in non - inferred project beats root in inferred project

// eg. say this is structure /a/b/a.ts /a/b/c.ts where c.ts references a.ts
Expand Down
2 changes: 1 addition & 1 deletion src/server/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ namespace ts.server {

/**
* If a file is opened, the server will look for a tsconfig (or jsconfig)
* and if successfull create a ConfiguredProject for it.
* and if successful create a ConfiguredProject for it.
* Otherwise it will create an InferredProject.
*/
export class ConfiguredProject extends Project {
Expand Down
2 changes: 1 addition & 1 deletion src/services/formatting/formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace ts.formatting {

const error = sorted[index];
if (r.end <= error.start!) {
// specified range ends before the error refered by 'index' - no error in range
// specified range ends before the error referred by 'index' - no error in range
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/testRunner/unittests/tsserver/occurences.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace ts.projectSystem {
describe("unittests:: tsserver:: occurence highlight on string", () => {
describe("unittests:: tsserver:: occurrence highlight on string", () => {
it("should be marked if only on string values", () => {
const file1: File = {
path: "/a/b/file1.ts",
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8880,7 +8880,7 @@ declare namespace ts.server {
}
/**
* If a file is opened, the server will look for a tsconfig (or jsconfig)
* and if successfull create a ConfiguredProject for it.
* and if successful create a ConfiguredProject for it.
* Otherwise it will create an InferredProject.
*/
class ConfiguredProject extends Project {
Expand Down Expand Up @@ -9157,7 +9157,7 @@ declare namespace ts.server {
*/
private readonly projectToSizeMap;
/**
* This is a map of config file paths existance that doesnt need query to disk
* This is a map of config file paths existence that doesnt need query to disk
* - The entry can be present because there is inferred project that needs to watch addition of config file to directory
* In this case the exists could be true/false based on config file is present or not
* - Or it is present if we have configured project open with config file at that location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
>multiSkillB
>:=> (line 22, col 3) to (line 22, col 14)
--------------------------------
23 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]];
23 >[, multiSkillB] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":786,"length":11}
>multiSkillB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
>multiSkillB = []
>:=> (line 22, col 3) to (line 22, col 19)
--------------------------------
23 >[, multiSkillB = []] = ["roomba", ["vaccum", "mopping"]];
23 >[, multiSkillB = []] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (817 to 874) SpanInfo: {"start":820,"length":16}
>multiSkillB = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@
>foo1(robotA)
>:=> (line 18, col 0) to (line 18, col 12)
--------------------------------
19 >foo1(["roomba", ["vaccum", "mopping"]]);
19 >foo1(["roomba", ["vacuum", "mopping"]]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (459 to 499) SpanInfo: {"start":459,"length":39}
>foo1(["roomba", ["vaccum", "mopping"]])
>foo1(["roomba", ["vacuum", "mopping"]])
>:=> (line 19, col 0) to (line 19, col 39)
--------------------------------
20 >foo2(robotA);
Expand All @@ -166,10 +166,10 @@
>foo2(robotA)
>:=> (line 20, col 0) to (line 20, col 12)
--------------------------------
21 >foo2(["roomba", ["vaccum", "mopping"]]);
21 >foo2(["roomba", ["vacuum", "mopping"]]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (514 to 554) SpanInfo: {"start":514,"length":39}
>foo2(["roomba", ["vaccum", "mopping"]])
>foo2(["roomba", ["vacuum", "mopping"]])
>:=> (line 21, col 0) to (line 21, col 39)
--------------------------------
22 >foo3(robotA);
Expand All @@ -178,10 +178,10 @@
>foo3(robotA)
>:=> (line 22, col 0) to (line 22, col 12)
--------------------------------
23 >foo3(["roomba", ["vaccum", "mopping"]]);
23 >foo3(["roomba", ["vacuum", "mopping"]]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (569 to 609) SpanInfo: {"start":569,"length":39}
>foo3(["roomba", ["vaccum", "mopping"]])
>foo3(["roomba", ["vacuum", "mopping"]])
>:=> (line 23, col 0) to (line 23, col 39)
--------------------------------
24 >foo4(robotA);
Expand All @@ -190,7 +190,7 @@
>foo4(robotA)
>:=> (line 24, col 0) to (line 24, col 12)
--------------------------------
25 >foo4(["roomba", ["vaccum", "mopping"]]);
25 >foo4(["roomba", ["vacuum", "mopping"]]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (624 to 663) SpanInfo: {"start":624,"length":39}
>foo4(["roomba", ["vaccum", "mopping"]])
>foo4(["roomba", ["vacuum", "mopping"]])
>:=> (line 25, col 0) to (line 25, col 39)
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@
>foo1(robotA)
>:=> (line 18, col 0) to (line 18, col 12)
--------------------------------
19 >foo1(["roomba", ["vaccum", "mopping"]]);
19 >foo1(["roomba", ["vacuum", "mopping"]]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (543 to 583) SpanInfo: {"start":543,"length":39}
>foo1(["roomba", ["vaccum", "mopping"]])
>foo1(["roomba", ["vacuum", "mopping"]])
>:=> (line 19, col 0) to (line 19, col 39)
--------------------------------
20 >foo2(robotA);
Expand All @@ -154,10 +154,10 @@
>foo2(robotA)
>:=> (line 20, col 0) to (line 20, col 12)
--------------------------------
21 >foo2(["roomba", ["vaccum", "mopping"]]);
21 >foo2(["roomba", ["vacuum", "mopping"]]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (598 to 638) SpanInfo: {"start":598,"length":39}
>foo2(["roomba", ["vaccum", "mopping"]])
>foo2(["roomba", ["vacuum", "mopping"]])
>:=> (line 21, col 0) to (line 21, col 39)
--------------------------------
22 >foo3(robotA);
Expand All @@ -166,7 +166,7 @@
>foo3(robotA)
>:=> (line 22, col 0) to (line 22, col 12)
--------------------------------
23 >foo3(["roomba", ["vaccum", "mopping"]]);
23 >foo3(["roomba", ["vacuum", "mopping"]]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (653 to 692) SpanInfo: {"start":653,"length":39}
>foo3(["roomba", ["vaccum", "mopping"]])
>foo3(["roomba", ["vacuum", "mopping"]])
>:=> (line 23, col 0) to (line 23, col 39)
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,28 @@

~ => Pos: (365 to 365) SpanInfo: undefined
--------------------------------
12 >let [nameMC] = ["roomba", ["vaccum", "mopping"]];
12 >let [nameMC] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (366 to 415) SpanInfo: {"start":371,"length":6}
>nameMC
>:=> (line 12, col 5) to (line 12, col 11)
--------------------------------
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]];
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~ => Pos: (416 to 428) SpanInfo: {"start":421,"length":7}
>nameMC2
>:=> (line 13, col 5) to (line 13, col 12)
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]];
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~ => Pos: (429 to 444) SpanInfo: {"start":431,"length":13}
>primarySkillC
>:=> (line 13, col 15) to (line 13, col 28)
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]];
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~=> Pos: (445 to 461) SpanInfo: {"start":446,"length":15}
>secondarySkillC
>:=> (line 13, col 30) to (line 13, col 45)
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vaccum", "mopping"]];
13 >let [nameMC2, [primarySkillC, secondarySkillC]] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (462 to 500) SpanInfo: {"start":430,"length":32}
>[primarySkillC, secondarySkillC]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@
>[primarySkillA = "noSkill", secondarySkillA = "noSkill"] = ["noSkill", "noSkill"]
>:=> (line 9, col 24) to (line 9, col 105)
--------------------------------
10 >let [nameMC = "noName" ] = ["roomba", ["vaccum", "mopping"]];
10 >let [nameMC = "noName" ] = ["roomba", ["vacuum", "mopping"]];

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (453 to 514) SpanInfo: {"start":458,"length":17}
>nameMC = "noName"
>:=> (line 10, col 5) to (line 10, col 22)
--------------------------------
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]];
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vacuum", "mopping"]];
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (515 to 538) SpanInfo: {"start":520,"length":18}
>nameMC2 = "noName"
>:=> (line 11, col 5) to (line 11, col 23)
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]];
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vacuum", "mopping"]];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (539 to 566) SpanInfo: {"start":541,"length":25}
>primarySkillC = "noSkill"
>:=> (line 11, col 26) to (line 11, col 51)
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]];
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vacuum", "mopping"]];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (567 to 595) SpanInfo: {"start":568,"length":27}
>secondarySkillC = "noSkill"
>:=> (line 11, col 53) to (line 11, col 80)
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vaccum", "mopping"]];
11 >let [nameMC2 = "noName", [primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]] = ["roomba", ["vacuum", "mopping"]];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (596 to 658) SpanInfo: {"start":540,"length":81}
>[primarySkillC = "noSkill", secondarySkillC = "noSkill"] = ["noSkill", "noSkill"]
>:=> (line 11, col 25) to (line 11, col 106)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module X.A.C {
module X.A.B.C {
module A {
}
export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module X.A.B.C {
module A {
>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 16))
}
export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
>W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 6, 5))
>X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module X.A.B.C {

module A {
}
export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
>W : W
>X.A.C : any
>X.A : typeof A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module X.A.C {
}
}
module X.A.B.C {
export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module X.A.B.C {
>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11))
>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13))

export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
>W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16))
>X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module X.A.B.C {
>B : typeof B
>C : typeof C

export class W implements X.A.C.Z { // This needs to be refered as X.A.C.Z as A has conflict
export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
>W : W
>X.A.C : any
>X.A : typeof A
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/mergeClassInterfaceAndModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module C3 {}
interface C3 {}

module C4 {}
declare class C4 {} // error -- class declaration must preceed module declaration
declare class C4 {} // error -- class declaration must precede module declaration
interface C4 {}

//// [mergeClassInterfaceAndModule.js]
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface C3 {}
module C4 {}
>C4 : Symbol(C4, Decl(mergeClassInterfaceAndModule.ts, 10, 15), Decl(mergeClassInterfaceAndModule.ts, 12, 12), Decl(mergeClassInterfaceAndModule.ts, 13, 19))

declare class C4 {} // error -- class declaration must preceed module declaration
declare class C4 {} // error -- class declaration must precede module declaration
>C4 : Symbol(C4, Decl(mergeClassInterfaceAndModule.ts, 10, 15), Decl(mergeClassInterfaceAndModule.ts, 12, 12), Decl(mergeClassInterfaceAndModule.ts, 13, 19))

interface C4 {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module C3 {}
interface C3 {}

module C4 {}
declare class C4 {} // error -- class declaration must preceed module declaration
declare class C4 {} // error -- class declaration must precede module declaration
>C4 : C4

interface C4 {}
2 changes: 1 addition & 1 deletion tests/baselines/reference/parserNotRegex1.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts(3,5): error TS1108


==== tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts (2 errors) ====
if (a.indexOf(-(4/3))) // We should not get a regex here becuase of the / in the comment.
if (a.indexOf(-(4/3))) // We should not get a regex here because of the / in the comment.
~
!!! error TS2304: Cannot find name 'a'.
{
Expand Down
Loading