Skip to content

Commit 5983c45

Browse files
author
Andy
authored
Fix typo: seperate -> separate (microsoft#24338)
* Fix typo: seperate -> separate * update tests
1 parent fb4caad commit 5983c45

26 files changed

Lines changed: 69 additions & 69 deletions

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27061,7 +27061,7 @@ namespace ts {
2706127061
}
2706227062
}
2706327063

27064-
// We do global augmentations seperately from module augmentations (and before creating global types) because they
27064+
// We do global augmentations separately from module augmentations (and before creating global types) because they
2706527065
// 1. Affect global types. We won't have the correct global types until global augmentations are merged. Also,
2706627066
// 2. Module augmentation instantiation requires creating the type of a module, which, in turn, can require
2706727067
// checking for an export or property on the module (if export=) which, in turn, can fall back to the

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,7 @@ namespace ts {
26532653
/**
26542654
* Matches any single directory segment unless it is the last segment and a .min.js file
26552655
* Breakdown:
2656-
* [^./] # matches everything up to the first . character (excluding directory seperators)
2656+
* [^./] # matches everything up to the first . character (excluding directory separators)
26572657
* (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension
26582658
*/
26592659
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",

src/compiler/scanner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ namespace ts {
13081308
let isPreviousTokenSeparator = false;
13091309
while (true) {
13101310
const ch = text.charCodeAt(pos);
1311-
// Numeric seperators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator
1311+
// Numeric separators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator
13121312
if (ch === CharacterCodes._) {
13131313
tokenFlags |= TokenFlags.ContainsSeparator;
13141314
if (separatorAllowed) {

src/services/codefixes/importFixes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ namespace ts.codefix {
211211

212212
// if this file doesn't have any import statements, insert an import statement and then insert a new line
213213
// between the only import statement and user code. Otherwise just insert the statement because chances
214-
// are there are already a new line seperating code and import statements.
214+
// are there are already a new line separating code and import statements.
215215
return createCodeAction(Diagnostics.Import_0_from_module_1, [symbolName, moduleSpecifierWithoutQuotes], changes);
216216
}
217217

src/services/pathCompletions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ namespace ts.Completions.PathCompletions {
297297
// after the last '/' that appears in the fragment because that's where the replacement span
298298
// starts
299299
if (fragmentDirectory !== undefined) {
300-
const moduleNameWithSeperator = ensureTrailingDirectorySeparator(fragmentDirectory);
301-
return nonRelativeModuleNames.map(nonRelativeModuleName => removePrefix(nonRelativeModuleName, moduleNameWithSeperator));
300+
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
301+
return nonRelativeModuleNames.map(nonRelativeModuleName => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
302302
}
303303
return nonRelativeModuleNames;
304304
}
@@ -410,7 +410,7 @@ namespace ts.Completions.PathCompletions {
410410
return result;
411411
}
412412

413-
// Replace everything after the last directory seperator that appears
413+
// Replace everything after the last directory separator that appears
414414
function getDirectoryFragmentTextSpan(text: string, textStart: number): TextSpan | undefined {
415415
const index = Math.max(text.lastIndexOf(directorySeparator), text.lastIndexOf("\\"));
416416
const offset = index !== -1 ? index + 1 : 0;

tests/baselines/reference/parseCommaSeperatedNewlineNew.errors.txt renamed to tests/baselines/reference/parseCommaSeparatedNewlineNew.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(1,2): error TS2304: Cannot find name 'a'.
2-
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
3-
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(2,4): error TS1109: Expression expected.
1+
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(1,2): error TS2304: Cannot find name 'a'.
2+
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
3+
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(2,4): error TS1109: Expression expected.
44

55

6-
==== tests/cases/compiler/parseCommaSeperatedNewlineNew.ts (3 errors) ====
6+
==== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts (3 errors) ====
77
(a,
88
~
99
!!! error TS2304: Cannot find name 'a'.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//// [parseCommaSeparatedNewlineNew.ts]
2+
(a,
3+
new)
4+
5+
//// [parseCommaSeparatedNewlineNew.js]
6+
(a,
7+
new );

tests/baselines/reference/parseCommaSeperatedNewlineNew.symbols renamed to tests/baselines/reference/parseCommaSeparatedNewlineNew.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== tests/cases/compiler/parseCommaSeperatedNewlineNew.ts ===
1+
=== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts ===
22
(a,
33
No type information for this code.new)
44
No type information for this code.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
=== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts ===
2+
(a,
3+
>(a,new) : any
4+
>a,new : any
5+
>a : any
6+
7+
new)
8+
>new : any
9+
> : any
10+

tests/baselines/reference/parseCommaSeperatedNewlineNumber.errors.txt renamed to tests/baselines/reference/parseCommaSeparatedNewlineNumber.errors.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts(1,2): error TS2304: Cannot find name 'a'.
2-
tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
1+
tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts(1,2): error TS2304: Cannot find name 'a'.
2+
tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
33

44

5-
==== tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts (2 errors) ====
5+
==== tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts (2 errors) ====
66
(a,
77
~
88
!!! error TS2304: Cannot find name 'a'.

0 commit comments

Comments
 (0)