Fix typo: seperate -> separate (#24338)

* Fix typo: seperate -> separate

* update tests
This commit is contained in:
Andy 2018-05-23 09:36:17 -07:00 committed by GitHub
parent fb4caadaec
commit 5983c45e24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 69 additions and 69 deletions

View file

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

View file

@ -2653,7 +2653,7 @@ namespace ts {
/**
* Matches any single directory segment unless it is the last segment and a .min.js file
* Breakdown:
* [^./] # matches everything up to the first . character (excluding directory seperators)
* [^./] # matches everything up to the first . character (excluding directory separators)
* (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension
*/
singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",

View file

@ -1308,7 +1308,7 @@ namespace ts {
let isPreviousTokenSeparator = false;
while (true) {
const ch = text.charCodeAt(pos);
// Numeric seperators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator
// Numeric separators are allowed anywhere within a numeric literal, except not at the beginning, or following another separator
if (ch === CharacterCodes._) {
tokenFlags |= TokenFlags.ContainsSeparator;
if (separatorAllowed) {

View file

@ -211,7 +211,7 @@ namespace ts.codefix {
// if this file doesn't have any import statements, insert an import statement and then insert a new line
// between the only import statement and user code. Otherwise just insert the statement because chances
// are there are already a new line seperating code and import statements.
// are there are already a new line separating code and import statements.
return createCodeAction(Diagnostics.Import_0_from_module_1, [symbolName, moduleSpecifierWithoutQuotes], changes);
}

View file

@ -297,8 +297,8 @@ namespace ts.Completions.PathCompletions {
// after the last '/' that appears in the fragment because that's where the replacement span
// starts
if (fragmentDirectory !== undefined) {
const moduleNameWithSeperator = ensureTrailingDirectorySeparator(fragmentDirectory);
return nonRelativeModuleNames.map(nonRelativeModuleName => removePrefix(nonRelativeModuleName, moduleNameWithSeperator));
const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory);
return nonRelativeModuleNames.map(nonRelativeModuleName => removePrefix(nonRelativeModuleName, moduleNameWithSeparator));
}
return nonRelativeModuleNames;
}
@ -410,7 +410,7 @@ namespace ts.Completions.PathCompletions {
return result;
}
// Replace everything after the last directory seperator that appears
// Replace everything after the last directory separator that appears
function getDirectoryFragmentTextSpan(text: string, textStart: number): TextSpan | undefined {
const index = Math.max(text.lastIndexOf(directorySeparator), text.lastIndexOf("\\"));
const offset = index !== -1 ? index + 1 : 0;

View file

@ -1,9 +1,9 @@
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/compiler/parseCommaSeperatedNewlineNew.ts(2,4): error TS1109: Expression expected.
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/compiler/parseCommaSeparatedNewlineNew.ts(2,4): error TS1109: Expression expected.
==== tests/cases/compiler/parseCommaSeperatedNewlineNew.ts (3 errors) ====
==== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts (3 errors) ====
(a,
~
!!! error TS2304: Cannot find name 'a'.

View file

@ -0,0 +1,7 @@
//// [parseCommaSeparatedNewlineNew.ts]
(a,
new)
//// [parseCommaSeparatedNewlineNew.js]
(a,
new );

View file

@ -1,4 +1,4 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineNew.ts ===
=== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts ===
(a,
No type information for this code.new)
No type information for this code.

View file

@ -0,0 +1,10 @@
=== tests/cases/compiler/parseCommaSeparatedNewlineNew.ts ===
(a,
>(a,new) : any
>a,new : any
>a : any
new)
>new : any
> : any

View file

@ -1,8 +1,8 @@
tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
==== tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts (2 errors) ====
==== tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts (2 errors) ====
(a,
~
!!! error TS2304: Cannot find name 'a'.

View file

@ -0,0 +1,7 @@
//// [parseCommaSeparatedNewlineNumber.ts]
(a,
1)
//// [parseCommaSeparatedNewlineNumber.js]
(a,
1);

View file

@ -1,4 +1,4 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts ===
=== tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts ===
(a,
No type information for this code.1)
No type information for this code.

View file

@ -0,0 +1,9 @@
=== tests/cases/compiler/parseCommaSeparatedNewlineNumber.ts ===
(a,
>(a,1) : 1
>a,1 : 1
>a : any
1)
>1 : 1

View file

@ -1,8 +1,8 @@
tests/cases/compiler/parseCommaSeperatedNewlineString.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeperatedNewlineString.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
tests/cases/compiler/parseCommaSeparatedNewlineString.ts(1,2): error TS2304: Cannot find name 'a'.
tests/cases/compiler/parseCommaSeparatedNewlineString.ts(1,2): error TS2695: Left side of comma operator is unused and has no side effects.
==== tests/cases/compiler/parseCommaSeperatedNewlineString.ts (2 errors) ====
==== tests/cases/compiler/parseCommaSeparatedNewlineString.ts (2 errors) ====
(a,
~
!!! error TS2304: Cannot find name 'a'.

View file

@ -0,0 +1,7 @@
//// [parseCommaSeparatedNewlineString.ts]
(a,
'')
//// [parseCommaSeparatedNewlineString.js]
(a,
'');

View file

@ -1,4 +1,4 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineString.ts ===
=== tests/cases/compiler/parseCommaSeparatedNewlineString.ts ===
(a,
No type information for this code.'')
No type information for this code.

View file

@ -0,0 +1,9 @@
=== tests/cases/compiler/parseCommaSeparatedNewlineString.ts ===
(a,
>(a,'') : ""
>a,'' : ""
>a : any
'')
>'' : ""

View file

@ -1,7 +0,0 @@
//// [parseCommaSeperatedNewlineNew.ts]
(a,
new)
//// [parseCommaSeperatedNewlineNew.js]
(a,
new );

View file

@ -1,10 +0,0 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineNew.ts ===
(a,
>(a,new) : any
>a,new : any
>a : any
new)
>new : any
> : any

View file

@ -1,7 +0,0 @@
//// [parseCommaSeperatedNewlineNumber.ts]
(a,
1)
//// [parseCommaSeperatedNewlineNumber.js]
(a,
1);

View file

@ -1,9 +0,0 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineNumber.ts ===
(a,
>(a,1) : 1
>a,1 : 1
>a : any
1)
>1 : 1

View file

@ -1,7 +0,0 @@
//// [parseCommaSeperatedNewlineString.ts]
(a,
'')
//// [parseCommaSeperatedNewlineString.js]
(a,
'');

View file

@ -1,9 +0,0 @@
=== tests/cases/compiler/parseCommaSeperatedNewlineString.ts ===
(a,
>(a,'') : ""
>a,'' : ""
>a : any
'')
>'' : ""