@@ -362,7 +362,7 @@ module ts {
362
362
public update ( scriptSnapshot : TypeScript . IScriptSnapshot , version : string , isOpen : boolean , textChangeRange : TypeScript . TextChangeRange ) : SourceFile {
363
363
// See if we are currently holding onto a syntax tree. We may not be because we're
364
364
// either a closed file, or we've just been lazy and haven't had to create the syntax
365
- // tree yet. Access the field instead of the method so we don't accidently realize
365
+ // tree yet. Access the field instead of the method so we don't accidentally realize
366
366
// the old syntax tree.
367
367
var oldSyntaxTree = this . syntaxTree ;
368
368
@@ -1371,7 +1371,7 @@ module ts {
1371
1371
var program : Program ;
1372
1372
// this checker is used to answer all LS questions except errors
1373
1373
var typeInfoResolver : TypeChecker ;
1374
- // the sole purpose of this checkes is to reutrn semantic diagnostics
1374
+ // the sole purpose of this check is to return semantic diagnostics
1375
1375
// creation is deferred - use getFullTypeCheckChecker to get instance
1376
1376
var fullTypeCheckChecker_doNotAccessDirectly : TypeChecker ;
1377
1377
var useCaseSensitivefilenames = false ;
@@ -1515,7 +1515,7 @@ module ts {
1515
1515
sourceFile = documentRegistry . acquireDocument ( filename , compilationSettings , scriptSnapshot , version , isOpen ) ;
1516
1516
}
1517
1517
1518
- // Remeber the new sourceFile
1518
+ // Remember the new sourceFile
1519
1519
sourceFilesByName [ filename ] = sourceFile ;
1520
1520
}
1521
1521
@@ -1570,7 +1570,7 @@ module ts {
1570
1570
var firstChar = displayName . charCodeAt ( 0 ) ;
1571
1571
if ( firstChar === TypeScript . CharacterCodes . singleQuote || firstChar === TypeScript . CharacterCodes . doubleQuote ) {
1572
1572
// If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an
1573
- // invalid identifer name. We need to check if whatever was inside the quotes is actually a valid identifier name.
1573
+ // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name.
1574
1574
displayName = TypeScript . stripStartAndEndQuotes ( displayName ) ;
1575
1575
}
1576
1576
@@ -1612,9 +1612,9 @@ module ts {
1612
1612
}
1613
1613
1614
1614
function isCompletionListBlocker ( sourceUnit : TypeScript . SourceUnitSyntax , position : number ) : boolean {
1615
- // We shouldn't be getting a possition that is outside the file because
1615
+ // We shouldn't be getting a position that is outside the file because
1616
1616
// isEntirelyInsideComment can't handle when the position is out of bounds,
1617
- // callers should be fixed, however we should be resiliant to bad inputs
1617
+ // callers should be fixed, however we should be resilient to bad inputs
1618
1618
// so we return true (this position is a blocker for getting completions)
1619
1619
if ( position < 0 || position > TypeScript . fullWidth ( sourceUnit ) ) {
1620
1620
return true ;
@@ -1704,12 +1704,12 @@ module ts {
1704
1704
var positionedToken = TypeScript . Syntax . findCompleteTokenOnLeft ( sourceUnit , position , /*includeSkippedTokens*/ true ) ;
1705
1705
1706
1706
if ( positionedToken && position === TypeScript . end ( positionedToken ) && positionedToken . kind ( ) == TypeScript . SyntaxKind . EndOfFileToken ) {
1707
- // EndOfFile token is not intresting , get the one before it
1707
+ // EndOfFile token is not interesting , get the one before it
1708
1708
positionedToken = TypeScript . previousToken ( positionedToken , /*includeSkippedTokens*/ true ) ;
1709
1709
}
1710
1710
1711
1711
if ( positionedToken && position === TypeScript . end ( positionedToken ) && positionedToken . kind ( ) === TypeScript . SyntaxKind . IdentifierName ) {
1712
- // The caret is at the end of an identifier, the decession to provide completion depends on the previous token
1712
+ // The caret is at the end of an identifier, the decision to provide completion depends on the previous token
1713
1713
positionedToken = TypeScript . previousToken ( positionedToken , /*includeSkippedTokens*/ true ) ;
1714
1714
}
1715
1715
@@ -1839,14 +1839,14 @@ module ts {
1839
1839
// // get existing members
1840
1840
// var existingMembers = compiler.getVisibleMemberSymbolsFromAST(node, document);
1841
1841
1842
- // // Add filtterd items to the completion list
1842
+ // // Add filtered items to the completion list
1843
1843
// getCompletionEntriesFromSymbols({
1844
1844
// symbols: filterContextualMembersList(contextualMembers.symbols, existingMembers, filename, position),
1845
1845
// enclosingScopeSymbol: contextualMembers.enclosingScopeSymbol
1846
1846
// }, entries);
1847
1847
//}
1848
1848
}
1849
- // Get scope memebers
1849
+ // Get scope members
1850
1850
else {
1851
1851
isMemberCompletion = false ;
1852
1852
/// TODO filter meaning based on the current context
@@ -1870,7 +1870,7 @@ module ts {
1870
1870
1871
1871
function getCompletionEntryDetails ( filename : string , position : number , entryName : string ) {
1872
1872
// Note: No need to call synchronizeHostData, as we have captured all the data we need
1873
- // in the getCompletionsAtPosition erlier
1873
+ // in the getCompletionsAtPosition earlier
1874
1874
filename = TypeScript . switchToForwardSlashes ( filename ) ;
1875
1875
1876
1876
var session = activeCompletionSession ;
@@ -2434,7 +2434,7 @@ module ts {
2434
2434
2435
2435
// Could not find a symbol e.g. unknown identifier
2436
2436
if ( ! symbol ) {
2437
- // Even if we did not find a symbol, we have an identifer , so there is at least
2437
+ // Even if we did not find a symbol, we have an identifier , so there is at least
2438
2438
// one reference that we know of. return that instead of undefined.
2439
2439
return [ getReferenceEntryFromNode ( node ) ] ;
2440
2440
}
@@ -2824,15 +2824,15 @@ module ts {
2824
2824
var propertySymbol = typeReferenceSymbol . members [ propertyName ] ;
2825
2825
if ( propertySymbol ) result . push ( typeReferenceSymbol . members [ propertyName ] ) ;
2826
2826
2827
- // Visit the typeReference as well to see if it directelly or indirectelly use that property
2827
+ // Visit the typeReference as well to see if it directly or indirectly use that property
2828
2828
getPropertySymbolsFromBaseTypes ( typeReferenceSymbol , propertyName , result ) ;
2829
2829
}
2830
2830
}
2831
2831
}
2832
2832
}
2833
2833
2834
2834
function isRelatableToSearchSet ( searchSymbols : Symbol [ ] , referenceSymbol : Symbol , referenceLocation : Node ) : boolean {
2835
- // Unwrap symbols to get to the root (e.g. triansient symbols as a result of widenning )
2835
+ // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening )
2836
2836
var referenceSymbolTarget = typeInfoResolver . getRootSymbol ( referenceSymbol ) ;
2837
2837
2838
2838
// if it is in the list, then we are done
@@ -2850,7 +2850,7 @@ module ts {
2850
2850
}
2851
2851
}
2852
2852
2853
- // Finally, try all properties with the same name in any type the containing type extened or implemented, and
2853
+ // Finally, try all properties with the same name in any type the containing type extend or implemented, and
2854
2854
// see if any is in the list
2855
2855
if ( referenceSymbol . parent && referenceSymbol . parent . flags & ( SymbolFlags . Class | SymbolFlags . Interface ) ) {
2856
2856
var result : Symbol [ ] = [ ] ;
@@ -2913,7 +2913,7 @@ module ts {
2913
2913
case SyntaxKind . ImportDeclaration :
2914
2914
return SearchMeaning . Value | SearchMeaning . Type | SearchMeaning . Namespace ;
2915
2915
}
2916
- Debug . fail ( "Unkown declaration type" ) ;
2916
+ Debug . fail ( "Unknown declaration type" ) ;
2917
2917
}
2918
2918
2919
2919
function isTypeReference ( node : Node ) : boolean {
@@ -2994,7 +2994,7 @@ module ts {
2994
2994
// intersects with the class in the value space.
2995
2995
// To achieve that we will keep iterating until the result stabilizes.
2996
2996
2997
- // Remeber the last meaning
2997
+ // Remember the last meaning
2998
2998
var lastIterationMeaning = meaning ;
2999
2999
3000
3000
for ( var i = 0 , n = declarations . length ; i < n ; i ++ ) {
@@ -3022,7 +3022,7 @@ module ts {
3022
3022
return new ReferenceEntry ( node . getSourceFile ( ) . filename , TypeScript . TextSpan . fromBounds ( start , end ) , isWriteAccess ( node ) ) ;
3023
3023
}
3024
3024
3025
- /// A node is considedered a writeAccess iff it is a name of a declaration or a target of an assignment
3025
+ /// A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment
3026
3026
function isWriteAccess ( node : Node ) : boolean {
3027
3027
if ( node . kind === SyntaxKind . Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName ( node ) ) {
3028
3028
return true ;
@@ -3308,7 +3308,7 @@ module ts {
3308
3308
var preamble = matchArray [ 1 ] ;
3309
3309
var matchPosition = matchArray . index + preamble . length ;
3310
3310
3311
- // Ok, we have found a match in the file. This is ony an acceptable match if
3311
+ // Ok, we have found a match in the file. This is only an acceptable match if
3312
3312
// it is contained within a comment.
3313
3313
var token = TypeScript . findToken ( syntaxTree . sourceUnit ( ) , matchPosition ) ;
3314
3314
@@ -3318,7 +3318,7 @@ module ts {
3318
3318
continue ;
3319
3319
}
3320
3320
3321
- // Looks to be within the trivia. See if we can find hte comment containing it.
3321
+ // Looks to be within the trivia. See if we can find the comment containing it.
3322
3322
var triviaList = matchPosition < TypeScript . start ( token ) ? token . leadingTrivia ( syntaxTree . text ) : token . trailingTrivia ( syntaxTree . text ) ;
3323
3323
var trivia = findContainingComment ( triviaList , matchPosition ) ;
3324
3324
if ( trivia === null ) {
@@ -3526,7 +3526,7 @@ module ts {
3526
3526
addResult ( start - lastTokenOrCommentEnd , TokenClass . Whitespace ) ;
3527
3527
}
3528
3528
3529
- // Remeber the end of the last token
3529
+ // Remember the end of the last token
3530
3530
lastTokenOrCommentEnd = end ;
3531
3531
}
3532
3532
0 commit comments