Skip to content

Commit 543b484

Browse files
author
Andy Hanson
committed
Remove trailing whitespace
1 parent 6dcd587 commit 543b484

14 files changed

Lines changed: 49 additions & 49 deletions

src/compiler/checker.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11269,7 +11269,7 @@ namespace ts {
1126911269
const declaringClassDeclaration = <ClassLikeDeclaration>getClassLikeDeclarationOfSymbol(declaration.parent.symbol);
1127011270
const declaringClass = <InterfaceType>getDeclaredTypeOfSymbol(declaration.parent.symbol);
1127111271

11272-
// A private or protected constructor can only be instantiated within it's own class
11272+
// A private or protected constructor can only be instantiated within it's own class
1127311273
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
1127411274
if (flags & NodeFlags.Private) {
1127511275
error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));
@@ -16132,12 +16132,12 @@ namespace ts {
1613216132
const symbol = getSymbolOfNode(node);
1613316133
const target = resolveAlias(symbol);
1613416134
if (target !== unknownSymbol) {
16135-
// For external modules symbol represent local symbol for an alias.
16135+
// For external modules symbol represent local symbol for an alias.
1613616136
// This local symbol will merge any other local declarations (excluding other aliases)
1613716137
// and symbol.flags will contains combined representation for all merged declaration.
1613816138
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,
16139-
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
16140-
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).
16139+
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
16140+
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).
1614116141
const excludedMeanings =
1614216142
(symbol.flags & (SymbolFlags.Value | SymbolFlags.ExportValue) ? SymbolFlags.Value : 0) |
1614316143
(symbol.flags & SymbolFlags.Type ? SymbolFlags.Type : 0) |
@@ -16336,7 +16336,7 @@ namespace ts {
1633616336
continue;
1633716337
}
1633816338
const { declarations, flags } = exports[id];
16339-
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
16339+
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
1634016340
// (TS Exceptions: namespaces, function overloads, enums, and interfaces)
1634116341
if (flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) {
1634216342
continue;
@@ -17041,10 +17041,10 @@ namespace ts {
1704117041
}
1704217042

1704317043
// Gets the type of object literal or array literal of destructuring assignment.
17044-
// { a } from
17044+
// { a } from
1704517045
// for ( { a } of elems) {
1704617046
// }
17047-
// [ a ] from
17047+
// [ a ] from
1704817048
// [a] = [ some array ...]
1704917049
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr: Expression): Type {
1705017050
Debug.assert(expr.kind === SyntaxKind.ObjectLiteralExpression || expr.kind === SyntaxKind.ArrayLiteralExpression);
@@ -17077,10 +17077,10 @@ namespace ts {
1707717077
}
1707817078

1707917079
// Gets the property symbol corresponding to the property in destructuring assignment
17080-
// 'property1' from
17080+
// 'property1' from
1708117081
// for ( { property1: a } of elems) {
1708217082
// }
17083-
// 'property1' at location 'a' from:
17083+
// 'property1' at location 'a' from:
1708417084
// [a] = [ property1, property2 ]
1708517085
function getPropertySymbolOfDestructuringAssignment(location: Identifier) {
1708617086
// Get the type of the object or array literal and then look for property of given name in the type

src/compiler/declarationEmitter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace ts {
9595
// Emit reference in dts, if the file reference was not already emitted
9696
if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) {
9797
// Add a reference to generated dts file,
98-
// global file reference is added only
98+
// global file reference is added only
9999
// - if it is not bundled emit (because otherwise it would be self reference)
100100
// - and it is not already added
101101
if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) {
@@ -148,7 +148,7 @@ namespace ts {
148148

149149
if (!isBundledEmit && isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) {
150150
// if file was external module with augmentations - this fact should be preserved in .d.ts as well.
151-
// in case if we didn't write any external module specifiers in .d.ts we need to emit something
151+
// in case if we didn't write any external module specifiers in .d.ts we need to emit something
152152
// that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here.
153153
write("export {};");
154154
writeLine();
@@ -766,7 +766,7 @@ namespace ts {
766766

767767
function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration) {
768768
// emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations).
769-
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
769+
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
770770
// external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}'
771771
// so compiler will treat them as external modules.
772772
resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== SyntaxKind.ModuleDeclaration;

src/compiler/sourcemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace ts {
168168
sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] :
169169
defaultLastEncodedSourceMapSpan;
170170

171-
// TODO: Update lastEncodedNameIndex
171+
// TODO: Update lastEncodedNameIndex
172172
// Since we dont support this any more, lets not worry about it right now.
173173
// When we start supporting nameIndex, we will get back to this
174174

src/compiler/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ namespace ts {
302302
return getTokenPosOfNode(node.jsDocComments[0]);
303303
}
304304

305-
// For a syntax list, it is possible that one of its children has JSDocComment nodes, while
306-
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
305+
// For a syntax list, it is possible that one of its children has JSDocComment nodes, while
306+
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
307307
// trivia for the list, we may have skipped the JSDocComment as well. So we should process its
308308
// first child to determine the actual position of its first token.
309309
if (node.kind === SyntaxKind.SyntaxList && (<SyntaxList>node)._children.length > 0) {

src/harness/projectsRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class ProjectRunner extends RunnerBase {
244244
mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot,
245245
sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot,
246246
module: moduleKind,
247-
moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future
247+
moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future
248248
};
249249
// Set the values specified using json
250250
const optionNameMap: ts.Map<ts.CommandLineOption> = {};

src/harness/runnerbase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract class RunnerBase {
2424

2525
abstract enumerateTestFiles(): string[];
2626

27-
/** Setup the runner's tests so that they are ready to be executed by the harness
27+
/** Setup the runner's tests so that they are ready to be executed by the harness
2828
* The first test should be a describe/it block that sets up the harness's compiler instance appropriately
2929
*/
3030
public abstract initializeTests(): void;

src/services/breakpoints.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
1+
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
22
// See LICENSE.txt in the project root for complete license information.
33

44
/// <reference path='services.ts' />
@@ -19,8 +19,8 @@ namespace ts.BreakpointResolver {
1919
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
2020
// Get previous token if the token is returned starts on new line
2121
// eg: let x =10; |--- cursor is here
22-
// let y = 10;
23-
// token at position will return let keyword on second line as the token but we would like to use
22+
// let y = 10;
23+
// token at position will return let keyword on second line as the token but we would like to use
2424
// token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line
2525
tokenAtLocation = findPrecedingToken(tokenAtLocation.pos, sourceFile);
2626

@@ -261,7 +261,7 @@ namespace ts.BreakpointResolver {
261261
}
262262

263263
// Set breakpoint on identifier element of destructuring pattern
264-
// a or ...c or d: x from
264+
// a or ...c or d: x from
265265
// [a, b, ...c] or { a, b } or { d: x } from destructuring pattern
266266
if ((node.kind === SyntaxKind.Identifier ||
267267
node.kind == SyntaxKind.SpreadElementExpression ||
@@ -275,7 +275,7 @@ namespace ts.BreakpointResolver {
275275
const binaryExpression = <BinaryExpression>node;
276276
// Set breakpoint in destructuring pattern if its destructuring assignment
277277
// [a, b, c] or {a, b, c} of
278-
// [a, b, c] = expression or
278+
// [a, b, c] = expression or
279279
// {a, b, c} = expression
280280
if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) {
281281
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(
@@ -285,8 +285,8 @@ namespace ts.BreakpointResolver {
285285
if (binaryExpression.operatorToken.kind === SyntaxKind.EqualsToken &&
286286
isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) {
287287
// Set breakpoint on assignment expression element of destructuring pattern
288-
// a = expression of
289-
// [a = expression, b, c] = someExpression or
288+
// a = expression of
289+
// [a = expression, b, c] = someExpression or
290290
// { a = expression, b, c } = someExpression
291291
return textSpan(node);
292292
}
@@ -403,7 +403,7 @@ namespace ts.BreakpointResolver {
403403
const declarations = variableDeclaration.parent.declarations;
404404
if (declarations && declarations[0] !== variableDeclaration) {
405405
// If we cannot set breakpoint on this declaration, set it on previous one
406-
// Because the variable declaration may be binding pattern and
406+
// Because the variable declaration may be binding pattern and
407407
// we would like to set breakpoint in last binding element if that's the case,
408408
// use preceding token instead
409409
return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
@@ -549,7 +549,7 @@ namespace ts.BreakpointResolver {
549549
return spanInNode(firstBindingElement);
550550
}
551551

552-
// Could be ArrayLiteral from destructuring assignment or
552+
// Could be ArrayLiteral from destructuring assignment or
553553
// just nested element in another destructuring assignment
554554
// set breakpoint on assignment when parent is destructuring assignment
555555
// Otherwise set breakpoint for this element

src/services/formatting/formattingScanner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ namespace ts.formatting {
268268
return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current);
269269
}
270270

271-
// when containing node in the tree is token
271+
// when containing node in the tree is token
272272
// but its kind differs from the kind that was returned by the scanner,
273-
// then kind needs to be fixed. This might happen in cases
273+
// then kind needs to be fixed. This might happen in cases
274274
// when parser interprets token differently, i.e keyword treated as identifier
275275
function fixTokenKind(tokenInfo: TokenInfo, container: Node): TokenInfo {
276276
if (isToken(container) && tokenInfo.token.kind !== container.kind) {

src/services/formatting/rules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,17 +554,17 @@ namespace ts.formatting {
554554
static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean {
555555
//// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction.
556556
////
557-
//// Ex:
557+
//// Ex:
558558
//// if (1) { ....
559559
//// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context
560560
////
561-
//// Ex:
561+
//// Ex:
562562
//// if (1)
563563
//// { ... }
564564
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we don't format.
565565
////
566566
//// Ex:
567-
//// if (1)
567+
//// if (1)
568568
//// { ...
569569
//// }
570570
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we format.

src/services/formatting/rulesMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ namespace ts.formatting {
9595
//// 4- Context rules with any token combination
9696
//// 5- Non-context rules with specific token combination
9797
//// 6- Non-context rules with any token combination
98-
////
98+
////
9999
//// The member rulesInsertionIndexBitmap is used to describe the number of rules
100-
//// in each sub-bucket (above) hence can be used to know the index of where to insert
100+
//// in each sub-bucket (above) hence can be used to know the index of where to insert
101101
//// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits.
102102
////
103103
//// Example:

0 commit comments

Comments
 (0)