diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e34afd7784..70c02cf594 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -569,7 +569,7 @@ module ts { export interface SourceMapData { /** Where the sourcemap file is written */ sourceMapFilePath: string; - /** source map url written in the js file */ + /** source map URL written in the js file */ jsSourceMappingURL: string; /** Source map's file field - js file name*/ sourceMapFile: string; @@ -594,7 +594,7 @@ module ts { AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors - EmitErrorsEncountered = 4 // Emitter errors occured during emitting process + EmitErrorsEncountered = 4 // Emitter errors occurred during emitting process } export interface EmitResult { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 5ee3139d8f..c227dac7bb 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -826,7 +826,7 @@ module Harness { totalErrorsReported++; } - // Report glovbal errors: + // Report global errors: var globalErrors = diagnostics.filter(err => !err.filename); globalErrors.forEach(err => outputErrorText(err)); @@ -1016,7 +1016,7 @@ module Harness { } export module TestCaseParser { - /** all the necesarry information to set the right compiler settings */ + /** all the necessary information to set the right compiler settings */ export interface CompilerSetting { flag: string; value: string; diff --git a/src/services/services.ts b/src/services/services.ts index c49615f678..722cab1d6a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -362,7 +362,7 @@ module ts { public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile { // See if we are currently holding onto a syntax tree. We may not be because we're // either a closed file, or we've just been lazy and haven't had to create the syntax - // tree yet. Access the field instead of the method so we don't accidently realize + // tree yet. Access the field instead of the method so we don't accidentally realize // the old syntax tree. var oldSyntaxTree = this.syntaxTree; @@ -1378,7 +1378,7 @@ module ts { var program: Program; // this checker is used to answer all LS questions except errors var typeInfoResolver: TypeChecker; - // the sole purpose of this checkes is to reutrn semantic diagnostics + // the sole purpose of this checker is to return semantic diagnostics // creation is deferred - use getFullTypeCheckChecker to get instance var fullTypeCheckChecker_doNotAccessDirectly: TypeChecker; var useCaseSensitivefilenames = false; @@ -1524,7 +1524,7 @@ module ts { sourceFile = documentRegistry.acquireDocument(filename, compilationSettings, scriptSnapshot, version, isOpen); } - // Remeber the new sourceFile + // Remember the new sourceFile sourceFilesByName[filename] = sourceFile; } @@ -1579,7 +1579,7 @@ module ts { var firstChar = displayName.charCodeAt(0); if (firstChar === TypeScript.CharacterCodes.singleQuote || firstChar === TypeScript.CharacterCodes.doubleQuote) { // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an - // invalid identifer name. We need to check if whatever was inside the quotes is actually a valid identifier name. + // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. displayName = TypeScript.stripStartAndEndQuotes(displayName); } @@ -1621,9 +1621,9 @@ module ts { } function isCompletionListBlocker(sourceUnit: TypeScript.SourceUnitSyntax, position: number): boolean { - // We shouldn't be getting a possition that is outside the file because + // We shouldn't be getting a position that is outside the file because // isEntirelyInsideComment can't handle when the position is out of bounds, - // callers should be fixed, however we should be resiliant to bad inputs + // callers should be fixed, however we should be resilient to bad inputs // so we return true (this position is a blocker for getting completions) if (position < 0 || position > TypeScript.fullWidth(sourceUnit)) { return true; @@ -1713,7 +1713,7 @@ module ts { var positionedToken = TypeScript.Syntax.findCompleteTokenOnLeft(sourceUnit, position, /*includeSkippedTokens*/true); if (positionedToken && position === TypeScript.end(positionedToken) && positionedToken.kind() == TypeScript.SyntaxKind.EndOfFileToken) { - // EndOfFile token is not intresting, get the one before it + // EndOfFile token is not interesting, get the one before it positionedToken = TypeScript. previousToken(positionedToken, /*includeSkippedTokens*/true); } @@ -1848,14 +1848,14 @@ module ts { // // get existing members // var existingMembers = compiler.getVisibleMemberSymbolsFromAST(node, document); - // // Add filtterd items to the completion list + // // Add filtered items to the completion list // getCompletionEntriesFromSymbols({ // symbols: filterContextualMembersList(contextualMembers.symbols, existingMembers, filename, position), // enclosingScopeSymbol: contextualMembers.enclosingScopeSymbol // }, entries); //} } - // Get scope memebers + // Get scope members else { isMemberCompletion = false; /// TODO filter meaning based on the current context @@ -2333,7 +2333,7 @@ module ts { // Could not find a symbol e.g. unknown identifier if (!symbol) { - // Even if we did not find a symbol, we have an identifer, so there is at least + // Even if we did not find a symbol, we have an identifier, so there is at least // one reference that we know of. return than instead of undefined. return [getReferenceEntry(node)]; } @@ -2599,7 +2599,7 @@ module ts { var propertySymbol = typeReferenceSymbol.members[propertyName]; if (propertySymbol) result.push(typeReferenceSymbol.members[propertyName]); - // Visit the typeReference as well to see if it directelly or indirectelly use that property + // Visit the typeReference as well to see if it directly or indirectly use that property getPropertySymbolsFromBaseTypes(typeReferenceSymbol, propertyName, result); } } @@ -2607,7 +2607,7 @@ module ts { } function isRelatableToSearchSet(searchSymbols: Symbol[], referenceSymbol: Symbol, referenceLocation: Node): boolean { - // Unwrap symbols to get to the root (e.g. triansient symbols as a result of widenning) + // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening) var referenceSymbolTarget = typeInfoResolver.getRootSymbol(referenceSymbol); // if it is in the list, then we are done @@ -2625,7 +2625,7 @@ module ts { } } - // Finally, try all properties with the same name in any type the containing type extened or implemented, and + // Finally, try all properties with the same name in any type the containing type extended or implemented, and // see if any is in the list if (referenceSymbol.parent && referenceSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { var result: Symbol[] = []; @@ -2781,7 +2781,7 @@ module ts { // intersects with the class in the value space. // To achieve that we will keep iterating until the result stabilizes. - // Remeber the last meaning + // Remember the last meaning var lastIterationMeaning = meaning; for (var i = 0, n = declarations.length; i < n; i++) { @@ -2796,7 +2796,7 @@ module ts { return meaning; } - /// A node is considedered a writeAccess iff it is a name of a declaration or a target of an assignment + /// A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment function isWriteAccess(node: Node): boolean { if (node.kind === SyntaxKind.Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { return true; @@ -2873,7 +2873,7 @@ module ts { var emitFilesResult = getFullTypeCheckChecker().emitFiles(); emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus; - // Reset writer back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput + // Reset writer back to undefined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput this.writer = undefined; return emitOutput; } @@ -3154,7 +3154,7 @@ module ts { continue; } - // Looks to be within the trivia. See if we can find hte comment containing it. + // Looks to be within the trivia. See if we can find the comment containing it. var triviaList = matchPosition < TypeScript.start(token) ? token.leadingTrivia(syntaxTree.text) : token.trailingTrivia(syntaxTree.text); var trivia = findContainingComment(triviaList, matchPosition); if (trivia === null) { @@ -3362,7 +3362,7 @@ module ts { addResult(start - lastTokenOrCommentEnd, TokenClass.Whitespace); } - // Remeber the end of the last token + // Remember the end of the last token lastTokenOrCommentEnd = end; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 605308d7b5..4f622d7a21 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -147,13 +147,13 @@ module ts { getDefaultCompilationSettings(): string; } - /// TODO: delete this, it is only needed untill the VS interface is updated + /// TODO: delete this, it is only needed until the VS interface is updated enum LanguageVersion { EcmaScript3 = 0, EcmaScript5 = 1, } - enum ModuleGenTarget { + export enum ModuleGenTarget { Unspecified = 0, Synchronous = 1, Asynchronous = 2, @@ -188,9 +188,9 @@ module ts { if (typeof languageVersion === "undefined") return undefined; switch (languageVersion) { - case LanguageVersion.EcmaScript3: return ScriptTarget.ES3; + case LanguageVersion.EcmaScript3: return ScriptTarget.ES3 case LanguageVersion.EcmaScript5: return ScriptTarget.ES5; - default: throw Error("unsuported LanguageVersion value: " + languageVersion); + default: throw Error("unsupported LanguageVersion value: " + languageVersion); } } @@ -201,7 +201,7 @@ module ts { case ModuleGenTarget.Asynchronous: return ModuleKind.AMD; case ModuleGenTarget.Synchronous: return ModuleKind.CommonJS; case ModuleGenTarget.Unspecified: return ModuleKind.None; - default: throw Error("unsuported ModuleGenTarget value: " + moduleGenTarget); + default: throw Error("unsupported ModuleGenTarget value: " + moduleGenTarget); } } @@ -211,7 +211,7 @@ module ts { switch (scriptTarget) { case ScriptTarget.ES3: return LanguageVersion.EcmaScript3; case ScriptTarget.ES5: return LanguageVersion.EcmaScript5; - default: throw Error("unsuported ScriptTarget value: " + scriptTarget); + default: throw Error("unsupported ScriptTarget value: " + scriptTarget); } } @@ -222,7 +222,7 @@ module ts { case ModuleKind.AMD: return ModuleGenTarget.Asynchronous; case ModuleKind.CommonJS: return ModuleGenTarget.Synchronous; case ModuleKind.None: return ModuleGenTarget.Unspecified; - default: throw Error("unsuported ModuleKind value: " + moduleKind); + default: throw Error("unsupported ModuleKind value: " + moduleKind); } } @@ -326,8 +326,8 @@ module ts { /// TODO: this should be pushed into VS. /// We can not ask the LS instance to resolve, as this will lead to asking the host about files it does not know about, - /// something it is not desinged to handle. for now make sure we never get a "noresolve == false". - /// This value should not matter, as the host runs resolution logic independentlly + /// something it is not designed to handle. for now make sure we never get a "noresolve == false". + /// This value should not matter, as the host runs resolution logic independently options.noResolve = true; return options; @@ -432,7 +432,7 @@ module ts { } // DISPOSE - // Ensure (almost) determinstic release of internal Javascript resources when + // Ensure (almost) deterministic release of internal Javascript resources when // some external native objects holds onto us (e.g. Com/Interop). public dispose(dummy: any): void { this.logger.log("dispose()"); @@ -859,7 +859,7 @@ module ts { } -/// TODO: this is used by VS, clean this up on both sides of the interfrace +/// TODO: this is used by VS, clean this up on both sides of the interface module TypeScript.Services { export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory; }