From fe518783254125eee1bcb5ce6cf215cb0b8becdf Mon Sep 17 00:00:00 2001 From: Jesse Date: Sat, 6 Jan 2018 09:47:19 -0700 Subject: [PATCH] TODO comments updated by @imdoneio [ci skip] [imdone skip] --- .imdone/config.json | 74 ++++++ Gulpfile.ts | 2 +- lib/protocol.d.ts | 6 +- lib/tsserverlibrary.d.ts | 10 +- lib/tsserverlibrary.js | 226 +++++++++--------- lib/typescript.d.ts | 4 +- lib/typescript.js | 196 +++++++-------- lib/typescriptServices.d.ts | 4 +- lib/typescriptServices.js | 196 +++++++-------- src/compiler/binder.ts | 8 +- src/compiler/checker.ts | 44 ++-- src/compiler/commandLineParser.ts | 10 +- src/compiler/core.ts | 2 +- src/compiler/declarationEmitter.ts | 2 +- src/compiler/emitter.ts | 2 +- src/compiler/parser.ts | 6 +- src/compiler/performance.ts | 2 +- src/compiler/program.ts | 4 +- src/compiler/transformers/destructuring.ts | 2 +- src/compiler/transformers/es2015.ts | 10 +- src/compiler/transformers/generators.ts | 6 +- src/compiler/transformers/ts.ts | 4 +- src/compiler/types.ts | 6 +- src/compiler/utilities.ts | 6 +- src/compiler/visitor.ts | 2 +- src/harness/fourslash.ts | 4 +- src/harness/harness.ts | 2 +- src/harness/loggedIO.ts | 2 +- src/harness/parallel/host.ts | 2 +- src/harness/parallel/worker.ts | 2 +- src/harness/runner.ts | 2 +- src/harness/unittests/extractConstants.ts | 6 +- src/harness/unittests/incrementalParser.ts | 2 +- src/harness/unittests/telemetry.ts | 2 +- src/harness/unittests/tscWatchMode.ts | 6 +- src/harness/virtualFileSystemWithWatch.ts | 4 +- src/server/client.ts | 10 +- src/server/editorServices.ts | 6 +- src/server/protocol.ts | 26 +- src/server/scriptInfo.ts | 2 +- src/server/scriptVersionCache.ts | 2 +- src/server/server.ts | 4 +- src/server/session.ts | 14 +- src/server/typingsCache.ts | 2 +- .../typingsInstaller/typingsInstaller.ts | 2 +- src/server/utilities.ts | 4 +- src/services/classifier.ts | 6 +- .../fixClassIncorrectlyImplementsInterface.ts | 2 +- src/services/codefixes/fixJSDocTypes.ts | 4 +- src/services/codefixes/fixSpelling.ts | 2 +- src/services/codefixes/importFixes.ts | 6 +- src/services/codefixes/inferFromUsage.ts | 4 +- src/services/completions.ts | 14 +- src/services/documentHighlights.ts | 2 +- src/services/findAllReferences.ts | 2 +- src/services/formatting/rules.ts | 2 +- src/services/jsDoc.ts | 4 +- src/services/jsTyping.ts | 2 +- src/services/navigateTo.ts | 4 +- src/services/patternMatcher.ts | 8 +- src/services/refactors/extractSymbol.ts | 4 +- src/services/services.ts | 26 +- src/services/shims.ts | 6 +- src/services/signatureHelp.ts | 2 +- src/services/symbolDisplay.ts | 4 +- src/services/types.ts | 14 +- src/services/utilities.ts | 2 +- .../reference/aliasUsedAsNameValue.js | 4 +- .../reference/api/tsserverlibrary.d.ts | 10 +- tests/baselines/reference/api/typescript.d.ts | 4 +- tests/baselines/reference/arrayConcat3.js | 2 +- ...espaceDeclarationWithIdentifierPathName.js | 4 +- .../contextualTypingOfOptionalMembers.js | 4 +- .../controlFlowPropertyDeclarations.js | 4 +- tests/baselines/reference/lambdaArgCrash.js | 4 +- .../literalsInComputedProperties1.js | 4 +- tests/baselines/reference/parser509534.js | 4 +- .../baselines/reference/parserRealSource10.js | 4 +- .../baselines/reference/parserRealSource11.js | 36 +-- .../baselines/reference/parserRealSource12.js | 4 +- .../baselines/reference/parserRealSource14.js | 8 +- .../baselines/reference/parserRealSource2.js | 8 +- .../baselines/reference/parserRealSource4.js | 4 +- .../baselines/reference/parserRealSource5.js | 4 +- .../baselines/reference/parserRealSource7.js | 34 +-- .../baselines/reference/parserRealSource8.js | 20 +- .../baselines/reference/parserRealSource9.js | 12 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.2_A1.5_T2.symbols | 4 +- .../reference/parserS7.2_A1.5_T2.types | 16 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.3_A1.1_T2.symbols | 2 +- .../reference/parserS7.3_A1.1_T2.types | 8 +- tests/baselines/reference/parserharness.js | 20 +- tests/baselines/reference/promiseType.symbols | 4 +- tests/baselines/reference/promiseType.types | 4 +- .../reference/promiseTypeStrictNull.symbols | 4 +- .../reference/promiseTypeStrictNull.types | 4 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.2_A1.5_T2.symbols | 4 +- .../reference/scannerS7.2_A1.5_T2.types | 16 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.3_A1.1_T2.symbols | 2 +- .../reference/scannerS7.3_A1.1_T2.types | 8 +- .../reference/thisTypeInFunctions.js | 4 +- .../reference/thisTypeInFunctionsNegative.js | 2 +- .../reference/tsxElementResolution.js | 4 +- tests/baselines/reference/tsxTypeErrors.js | 4 +- tests/cases/compiler/aliasUsedAsNameValue.ts | 2 +- tests/cases/compiler/arrayConcat3.ts | 2 +- ...espaceDeclarationWithIdentifierPathName.ts | 2 +- .../controlFlowPropertyDeclarations.ts | 2 +- tests/cases/compiler/lambdaArgCrash.ts | 2 +- .../compiler/literalsInComputedProperties1.ts | 2 +- ...leResolutionWithSymlinks_referenceTypes.ts | 2 +- .../ecmascript5/RealWorld/parserharness.ts | 10 +- .../RegressionTests/parser509534.ts | 2 +- .../parser/ecmascript5/parserRealSource10.ts | 2 +- .../parser/ecmascript5/parserRealSource11.ts | 18 +- .../parser/ecmascript5/parserRealSource12.ts | 2 +- .../parser/ecmascript5/parserRealSource14.ts | 4 +- .../parser/ecmascript5/parserRealSource2.ts | 4 +- .../parser/ecmascript5/parserRealSource4.ts | 2 +- .../parser/ecmascript5/parserRealSource5.ts | 2 +- .../parser/ecmascript5/parserRealSource7.ts | 18 +- .../parser/ecmascript5/parserRealSource8.ts | 10 +- .../parser/ecmascript5/parserRealSource9.ts | 6 +- .../types/thisType/thisTypeInFunctions.ts | 2 +- .../thisType/thisTypeInFunctionsNegative.ts | 2 +- .../fourslash/ambientShorthandFindAllRefs.ts | 2 +- .../fourslash/codeFixAddMissingMember.ts | 2 +- .../fourslash/codeFixAddMissingMember2.ts | 2 +- .../fourslash/codeFixAddMissingMember3.ts | 2 +- .../fourslash/codeFixAddMissingMember4.ts | 2 +- .../fourslash/codeFixAddMissingMember5.ts | 2 +- .../fourslash/codeFixAddMissingMember6.ts | 2 +- .../fourslash/codeFixAddMissingMember7.ts | 2 +- .../fourslash/codeFixAddMissingMember_all.ts | 2 +- .../codeFixAddMissingMember_all_js.ts | 2 +- ...angeExtendsToImplementsAbstractModifier.ts | 2 +- ...xChangeExtendsToImplementsWithDecorator.ts | 2 +- ...eFixChangeExtendsToImplementsWithTrivia.ts | 2 +- ...ClassImplementClassFunctionVoidInferred.ts | 2 +- ...prExtendsAbstractExpressionWithTypeArgs.ts | 2 +- ...assExtendAbstractExpressionWithTypeArgs.ts | 2 +- .../codeFixClassExtendAbstractGetterSetter.ts | 2 +- .../codeFixClassExtendAbstractMethod.ts | 2 +- .../codeFixClassExtendAbstractMethodThis.ts | 2 +- ...stractMethodTypeParamsInstantiateNumber.ts | 2 +- ...endAbstractMethodTypeParamsInstantiateU.ts | 2 +- .../codeFixClassExtendAbstractMethod_all.ts | 2 +- .../codeFixClassExtendAbstractProperty.ts | 2 +- .../codeFixClassExtendAbstractPropertyThis.ts | 2 +- ...FixClassExtendAbstractProtectedProperty.ts | 2 +- ...odeFixClassExtendAbstractPublicProperty.ts | 2 +- ...ImplementClassAbstractGettersAndSetters.ts | 2 +- ...ClassImplementClassFunctionVoidInferred.ts | 2 +- ...xClassImplementClassMultipleSignatures1.ts | 2 +- ...xClassImplementClassMultipleSignatures2.ts | 2 +- ...FixClassImplementClassPropertyModifiers.ts | 2 +- ...FixClassImplementClassPropertyTypeQuery.ts | 2 +- .../codeFixClassImplementDeepInheritance.ts | 2 +- .../codeFixClassImplementDefaultClass.ts | 2 +- ...odeFixClassImplementInterfaceArrayTuple.ts | 2 +- ...xClassImplementInterfaceClassExpression.ts | 2 +- .../codeFixClassImplementInterfaceComments.ts | 2 +- ...lementInterfaceComputedPropertyLiterals.ts | 2 +- ...aceComputedPropertyNameWellKnownSymbols.ts | 2 +- ...deFixClassImplementInterfaceInNamespace.ts | 2 +- ...ssImplementInterfaceIndexSignaturesBoth.ts | 2 +- ...ImplementInterfaceIndexSignaturesNumber.ts | 2 +- ...ImplementInterfaceIndexSignaturesString.ts | 2 +- ...codeFixClassImplementInterfaceIndexType.ts | 2 +- ...mplementInterfaceInheritsAbstractMethod.ts | 2 +- ...odeFixClassImplementInterfaceMappedType.ts | 2 +- ...ImplementInterfaceMemberNestedTypeAlias.ts | 2 +- ...ixClassImplementInterfaceMemberOrdering.ts | 2 +- ...xClassImplementInterfaceMemberTypeAlias.ts | 2 +- ...mentInterfaceMethodThisAndSelfReference.ts | 2 +- ...ssImplementInterfaceMethodTypePredicate.ts | 2 +- ...tInterfaceMultipleMembersAndPunctuation.ts | 2 +- ...assImplementInterfaceMultipleSignatures.ts | 2 +- ...plementInterfaceMultipleSignaturesRest1.ts | 2 +- ...plementInterfaceMultipleSignaturesRest2.ts | 2 +- ...lassImplementInterfaceNamespaceConflict.ts | 2 +- ...ClassImplementInterfaceOptionalProperty.ts | 2 +- .../codeFixClassImplementInterfaceProperty.ts | 2 +- ...cePropertyFromParentConstructorFunction.ts | 2 +- ...assImplementInterfacePropertySignatures.ts | 2 +- ...FixClassImplementInterfaceQualifiedName.ts | 2 +- ...mentInterfaceTypeParamInstantiateDeeply.ts | 2 +- ...ementInterfaceTypeParamInstantiateError.ts | 2 +- ...mentInterfaceTypeParamInstantiateNumber.ts | 2 +- ...ImplementInterfaceTypeParamInstantiateT.ts | 2 +- ...ImplementInterfaceTypeParamInstantiateU.ts | 2 +- ...xClassImplementInterfaceTypeParamMethod.ts | 2 +- ...ClassImplementInterfaceUndeclaredSymbol.ts | 2 +- .../codeFixClassImplementInterface_all.ts | 2 +- .../codeFixClassSuperMustPrecedeThisAccess.ts | 2 +- ...deFixConstructorForDerivedNeedSuperCall.ts | 2 +- ...xConstructorForDerivedNeedSuperCall_all.ts | 2 +- .../codeFixUndeclaredInStaticMethod.ts | 2 +- .../fourslash/codeFixUndeclaredMethod.ts | 2 +- ...tInClosedObjectTypeLiteralInSignature02.ts | 2 +- ...tInClosedObjectTypeLiteralInSignature03.ts | 2 +- ...nUnclosedObjectTypeLiteralInSignature02.ts | 2 +- ...nUnclosedObjectTypeLiteralInSignature03.ts | 2 +- ...Import_default_alreadyExistedWithRename.ts | 2 +- .../completionsImport_default_anonymous.ts | 2 +- ...letionsImport_default_didNotExistBefore.ts | 2 +- ...sImport_default_exportDefaultIdentifier.ts | 2 +- .../completionsImport_fromAmbientModule.ts | 2 +- .../completionsImport_multipleWithSameName.ts | 2 +- ...tionsImport_named_namespaceImportExists.ts | 2 +- .../fourslash/completionsImport_ofAlias.ts | 6 +- ...mpletionsImport_ofAlias_preferShortPath.ts | 2 +- .../fourslash/completionsImport_require.ts | 4 +- tests/cases/fourslash/findAllRefsForModule.ts | 2 +- .../fourslash/findAllRefsForModuleGlobal.ts | 2 +- .../findAllRefsJsDocTemplateTag_class_js.ts | 2 +- ...findAllRefsJsDocTemplateTag_function_js.ts | 2 +- tests/cases/fourslash/fourslash.ts | 6 +- .../importNameCodeFixNewImportFile3.ts | 2 +- .../fourslash/importNameCodeFixReExport.ts | 2 +- .../fourslash/javaScriptModulesError1.ts | 2 +- ...JsdocTypedefTagTypeExpressionCompletion.ts | 2 +- .../convertFunctionToEs6Class-server.ts | 4 +- .../smartIndentObjectBindingPattern01.ts | 2 +- .../smartIndentObjectBindingPattern02.ts | 2 +- tests/cases/fourslash/todoComments13.ts | 2 +- tests/cases/fourslash/todoComments15.ts | 2 +- tests/cases/fourslash/todoComments19.ts | 2 +- tests/cases/fourslash/todoComments2.ts | 2 +- tests/cases/fourslash/todoComments20.ts | 2 +- tests/cases/fourslash/todoComments4.ts | 2 +- .../unclosedCommentsInConstructor.ts | 2 +- 236 files changed, 875 insertions(+), 809 deletions(-) create mode 100644 .imdone/config.json diff --git a/.imdone/config.json b/.imdone/config.json new file mode 100644 index 0000000000000..3c0b8c4e8e961 --- /dev/null +++ b/.imdone/config.json @@ -0,0 +1,74 @@ +{ + "exclude": [ + "^(node_modules|bower_components|\\.imdone|target|build|dist|logs|flow-typed)[\\/\\\\]?|\\.(git|svn|hg|npmignore)|\\~$|\\.(jpg|png|gif|swp|ttf|otf)$" + ], + "watcher": true, + "keepEmptyPriority": true, + "code": { + "include_lists": [ + "TODO", + "FIXME", + "HACK", + "CHANGED", + "XXX", + "IDEA", + "NOTE", + "REVIEW", + "TODO", + "NOTE", + "HACK", + "REVIEW", + "1", + "2", + "4903", + "XXX" + ] + }, + "lists": [ + { + "name": "TODO", + "hidden": false + }, + { + "name": "NOTE", + "hidden": false + }, + { + "name": "HACK", + "hidden": false + }, + { + "name": "REVIEW", + "hidden": false + }, + { + "name": "1", + "hidden": false + }, + { + "name": "2", + "hidden": false + }, + { + "name": "4903", + "hidden": false + }, + { + "name": "XXX", + "hidden": false + } + ], + "marked": { + "gfm": true, + "tables": true, + "breaks": false, + "pedantic": false, + "smartLists": true, + "langPrefix": "language-" + }, + "sync": { + "id": "5a50f985e38fd8346765dbc1", + "name": "imdone/TypeScript", + "useImdoneioForPriority": true + } +} \ No newline at end of file diff --git a/Gulpfile.ts b/Gulpfile.ts index 996fa1fc1400e..86ccb3ffe7c9c 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -77,7 +77,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), { const noop = () => {}; // tslint:disable-line no-empty function exec(cmd: string, args: string[], complete: () => void = noop, error: (e: any, status: number) => void = noop) { console.log(`${cmd} ${args.join(" ")}`); - // TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition + // TODO (weswig): Update child_process types to add windowsVerbatimArguments to the type definition id:0 gh:1 const subshellFlag = isWin ? "/c" : "-c"; const command = isWin ? [possiblyQuote(cmd), ...args] : [`${cmd} ${args.join(" ")}`]; const ex = cp.spawn(isWin ? "cmd" : "/bin/sh", [subshellFlag, ...command], { stdio: "inherit", windowsVerbatimArguments: true } as any); diff --git a/lib/protocol.d.ts b/lib/protocol.d.ts index 2bf4ae59f070d..fcd238265a6e8 100644 --- a/lib/protocol.d.ts +++ b/lib/protocol.d.ts @@ -150,7 +150,7 @@ declare namespace ts.server.protocol { body?: TextInsertion; } /** - * A request to get TODO comments from the file + * A request to get TODO comments from the file id:3 gh:4 */ interface TodoCommentRequest extends FileRequest { command: CommandTypes.TodoComments; @@ -161,7 +161,7 @@ declare namespace ts.server.protocol { */ interface TodoCommentRequestArgs extends FileRequestArgs { /** - * Array of target TodoCommentDescriptors that describes TODO comments to be found + * Array of target TodoCommentDescriptors that describes TODO comments to be found id:1 gh:2 */ descriptors: TodoCommentDescriptor[]; } @@ -1022,7 +1022,7 @@ declare namespace ts.server.protocol { } /** * Request to obtain the list of files that should be regenerated if target file is recompiled. - * NOTE: this us query-only operation and does not generate any output on disk. + * NOTE: this us query-only operation and does not generate any output on disk. id:2 gh:3 */ interface CompileOnSaveAffectedFileListRequest extends FileRequest { command: CommandTypes.CompileOnSaveAffectedFileList; diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 6fd389d170a98..fccdf14c71e01 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -2557,7 +2557,7 @@ declare namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:4 gh:5 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -2575,7 +2575,7 @@ declare namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:6 gh:7 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; @@ -5017,7 +5017,7 @@ declare namespace ts.server.protocol { body?: TextInsertion; } /** - * A request to get TODO comments from the file + * A request to get TODO comments from the file id:5 gh:6 */ interface TodoCommentRequest extends FileRequest { command: CommandTypes.TodoComments; @@ -5028,7 +5028,7 @@ declare namespace ts.server.protocol { */ interface TodoCommentRequestArgs extends FileRequestArgs { /** - * Array of target TodoCommentDescriptors that describes TODO comments to be found + * Array of target TodoCommentDescriptors that describes TODO comments to be found id:12 gh:13 */ descriptors: TodoCommentDescriptor[]; } @@ -5889,7 +5889,7 @@ declare namespace ts.server.protocol { } /** * Request to obtain the list of files that should be regenerated if target file is recompiled. - * NOTE: this us query-only operation and does not generate any output on disk. + * NOTE: this us query-only operation and does not generate any output on disk. id:7 gh:9 */ interface CompileOnSaveAffectedFileListRequest extends FileRequest { command: CommandTypes.CompileOnSaveAffectedFileList; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index a65ef12d20047..845509b0af1d8 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -1306,7 +1306,7 @@ var ts; (function (ts) { var performance; (function (performance) { - // NOTE: cannot use ts.noop as core.ts loads after this + // NOTE: cannot use ts.noop as core.ts loads after this id:13 gh:14 var profilerEvent = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : function () { }; var enabled = false; var profilerStart = 0; @@ -2920,7 +2920,7 @@ var ts; return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */; } function createIntlCollatorStringComparer(locale) { - // Intl.Collator.prototype.compare is bound to the collator. See NOTE in + // Intl.Collator.prototype.compare is bound to the collator. See NOTE in id:644 gh:645 // http://www.ecma-international.org/ecma-402/2.0/#sec-Intl.Collator.prototype.compare var comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return function (a, b) { return compareWithCallback(a, b, comparer); }; @@ -6511,7 +6511,7 @@ var ts; case 183 /* NewExpression */: return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 184 /* TaggedTemplateExpression */: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. + // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. id:8 gh:8 return false; } } @@ -9551,7 +9551,7 @@ var ts; if (!sys.fileExists(filePath)) { return false; } - // TODO: Add codePage support for readFile? + // TODO: Add codePage support for readFile? id:14 gh:15 var fileContents = ""; try { fileContents = sys.readFile(filePath); @@ -11203,7 +11203,7 @@ var ts; return node.kind === 279 /* JSDocComment */ || isJSDocTag(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; - // TODO: determine what this does before making it public. + // TODO: determine what this does before making it public. id:9 gh:10 /* @internal */ function isJSDocTag(node) { return node.kind >= 281 /* FirstJSDocTagNode */ && node.kind <= 289 /* LastJSDocTagNode */; @@ -17030,7 +17030,7 @@ var ts; return parseMethodDeclaration(node, asteriskToken); } // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production id:64 gh:65 // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern @@ -17300,7 +17300,7 @@ var ts; parseSemicolon(); return finishNode(node); } - // TODO: Review for error recovery + // TODO: Review for error recovery id:645 gh:646 function parseTryStatement() { var node = createNode(225 /* TryStatement */); parseExpected(102 /* TryKeyword */); @@ -18590,7 +18590,7 @@ var ts; if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { removeTrailingNewlines(comments); parseTag(indent); - // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. + // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. id:10 gh:11 // Real-world comments may break this rule, so "BeginningOfLine" will not be a real line beginning // for malformed examples like `/** @param {string} x @returns {number} the length */` state = 0 /* BeginningOfLine */; @@ -21089,7 +21089,7 @@ var ts; raw_1.compileOnSave = baseRaw_1.compileOnSave; } ownConfig.options = ts.assign({}, extendedConfig.options, ownConfig.options); - // TODO extend type typeAcquisition + // TODO extend type typeAcquisition id:16 gh:17 } } return ownConfig; @@ -21334,7 +21334,7 @@ var ts; * Tests for a path that ends in a recursive directory wildcard. * Matches **, \**, **\, and \**\, but not a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:11 gh:12 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -21346,7 +21346,7 @@ var ts; * Tests for a path with multiple recursive directory wildcards. * Matches **\** and **\a\**, but not **\a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:69 gh:70 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -21360,7 +21360,7 @@ var ts; * Tests for a path where .. appears after a recursive directory wildcard. * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\* * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:646 gh:647 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -21374,7 +21374,7 @@ var ts; * Tests for a path containing a wildcard character in a directory component of the path. * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:15 gh:16 * * Breakdown: * \/ # matches a directory separator. @@ -21388,7 +21388,7 @@ var ts; * Matches the portion of a wildcard path that does not contain wildcards. * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:18 gh:19 * * Breakdown: * ^ # matches the beginning of the string @@ -23080,11 +23080,11 @@ var ts; // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. + // TODO: Make this a more specific error and decouple it from the exclusion logic. id:46 gh:47 // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge id:71 gh:72 // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. @@ -23650,7 +23650,7 @@ var ts; function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); var preTryFlow = currentFlow; - // TODO: Every statement in try block is potentially an exit point! + // TODO: Every statement in try block is potentially an exit point! id:647 gh:648 bind(node.tryBlock); addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; @@ -25835,7 +25835,7 @@ var ts; /** * Gets the transform flags to exclude when unioning the transform flags of a subtree. * - * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. + * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. id:17 gh:18 * For performance reasons, `computeTransformFlagsForNode` uses local constant values rather * than calling this function. */ @@ -29026,7 +29026,7 @@ var ts; // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree + // NOTE (cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree id:20 gh:21 // up front (for example, during checking) could determine if we need to emit the imports // and we could then access that data during declaration emit. writer.trackSymbol(symbol, enclosingDeclaration, meaning); @@ -32704,7 +32704,7 @@ var ts; var typeStr = typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */); error(node, diag, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { - // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) + // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) id:49 gh:50 return unknownType; } } @@ -34181,7 +34181,7 @@ var ts; return true; } } - // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. + // TODO (anhans): A block should be context-sensitive if it has a context-sensitive return value. id:74 gh:75 return node.body.kind === 208 /* Block */ ? false : isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { @@ -34269,7 +34269,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:648 gh:649 if (source === target) { return -1 /* True */; } @@ -35770,7 +35770,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:19 gh:20 if (source === target) { return -1 /* True */; } @@ -37036,7 +37036,7 @@ var ts; } function getTypeWithFacts(type, include) { if (type.flags & 1048576 /* IndexedAccess */) { - // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to + // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to id:22 gh:23 // - See discussion in https://github.com/Microsoft/TypeScript/pull/19275 for details, and test `strictNullNotNullIndexTypeShouldWork` for current behavior var baseConstraint = getBaseConstraintOfType(type) || emptyObjectType; var result = filterType(baseConstraint, function (t) { return (getTypeFacts(t) & include) !== 0; }); @@ -39582,7 +39582,7 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - // TODO (yuisu): comment + // TODO (yuisu): comment id:53 gh:54 switch (tagName.kind) { case 180 /* PropertyAccessExpression */: case 99 /* ThisKeyword */: @@ -40851,7 +40851,7 @@ var ts; return true; } function callLikeExpressionMayHaveTypeArguments(node) { - // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) + // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) id:77 gh:78 return ts.isCallOrNewExpression(node); } function resolveUntypedCall(node) { @@ -42615,7 +42615,7 @@ var ts; else if (returnType && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present id:649 gh:650 error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { @@ -42932,12 +42932,12 @@ var ts; // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature. // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported + // NOTE: do not raise error if leftType is unknown as related error was already reported id:21 gh:22 if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 16382 /* Primitive */)) { error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - // NOTE: do not raise error if right is unknown as related error was already reported + // NOTE: do not raise error if right is unknown as related error was already reported id:24 gh:25 if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } @@ -43252,7 +43252,7 @@ var ts; } else if (isTypeAny(leftType) || isTypeAny(rightType)) { // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. + // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. id:56 gh:57 resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; } // Symbols are not allowed at all in arithmetic expressions @@ -43895,7 +43895,7 @@ var ts; } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - // TODO(rbuckton): Should we start checking JSDoc types? + // TODO (rbuckton): Should we start checking JSDoc types? id:81 gh:82 if (node.type) { checkSourceElement(node.type); } @@ -44478,7 +44478,7 @@ var ts; if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; - // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) + // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) id:650 gh:651 var subsequentName = subsequentNode.name; if (node.name && subsequentName && (ts.isComputedPropertyName(node.name) && ts.isComputedPropertyName(subsequentName) || @@ -45558,7 +45558,7 @@ var ts; return; } // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern + // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern id:23 gh:24 // so we'll always treat binding elements as initialized if (node.kind === 227 /* VariableDeclaration */ && !node.initializer) { return; @@ -46244,7 +46244,7 @@ var ts; // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid + // TODO: Check that target label is valid id:26 gh:27 } function isGetAccessorWithAnnotatedSetAccessor(node) { return node.kind === 154 /* GetAccessor */ @@ -46272,7 +46272,7 @@ var ts; if (functionFlags & 1 /* Generator */) { // A generator does not need its return expressions checked against its return type. // Instead, the yield expressions are checked against the element type. - // TODO: Check return expressions of generators when return type tracking is added + // TODO: Check return expressions of generators when return type tracking is added id:58 gh:59 // for generators. return; } @@ -46744,7 +46744,7 @@ var ts; // but not by other kinds of members. // Base class instance member variables and accessors can be overridden by // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration + // NOTE: assignability is checked in checkClassDeclaration id:84 gh:85 var baseProperties = getPropertiesOfType(baseType); for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) { var baseProperty = baseProperties_1[_i]; @@ -50161,7 +50161,7 @@ var ts; // export_opt ExternalImportDeclaration // export_opt AmbientDeclaration // - // TODO: The spec needs to be amended to reflect this grammar. + // TODO: The spec needs to be amended to reflect this grammar. id:651 gh:652 if (node.kind === 231 /* InterfaceDeclaration */ || node.kind === 232 /* TypeAliasDeclaration */ || node.kind === 239 /* ImportDeclaration */ || @@ -54795,7 +54795,7 @@ var ts; } /** * Similar to `reduceLeft`, performs a reduction against each child of a node. - * NOTE: Unlike `forEachChild`, this does *not* visit every node. + * NOTE: Unlike `forEachChild`, this does *not* visit every node. id:25 gh:26 * * @param node The node containing the children to reduce. * @param initial The initial value to supply to the reduction. @@ -55612,7 +55612,7 @@ var ts; } return ts.aggregateTransformFlags(ts.inlineExpressions(expressions)) || ts.createOmittedExpression(); function emitExpression(expression) { - // NOTE: this completely disables source maps, but aligns with the behavior of + // NOTE: this completely disables source maps, but aligns with the behavior of id:27 gh:28 // `emitAssignment` in the old emitter. ts.setEmitFlags(expression, 64 /* NoNestedSourceMaps */); ts.aggregateTransformFlags(expression); @@ -58404,7 +58404,7 @@ var ts; // namespace hello.hi.world { // function foo() {} // - // // TODO, blah + // // TODO , blah id:60 gh:61 // } // // should be emitted as @@ -58416,7 +58416,7 @@ var ts; // var world; // (function (world) { // function foo() { } - // // TODO, blah + // // TODO , blah id:87 gh:88 // })(world = hi.world || (hi.world = {})); // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); @@ -60526,7 +60526,7 @@ var ts; HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement"; HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper"; HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName"; - // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. + // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. id:652 gh:653 // // Ancestor masks // @@ -62424,7 +62424,7 @@ var ts; } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: id:28 gh:29 // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. (extraVariableDeclarations || (extraVariableDeclarations = [])).push(ts.createVariableDeclaration(currentState.thisName, @@ -62500,7 +62500,7 @@ var ts; var statements = []; // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop // simple loops are emitted as just 'loop()'; - // NOTE: if loop uses only 'continue' it still will be emitted as simple loop + // NOTE: if loop uses only 'continue' it still will be emitted as simple loop id:29 gh:30 var isSimpleLoop = !(state.nonLocalJumps & ~4 /* Continue */) && !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues; @@ -63310,7 +63310,7 @@ var ts; } /** * Determines whether a name is the name of a declaration with a colliding name. - * NOTE: This function expects to be called with an original source tree node. + * NOTE: This function expects to be called with an original source tree node. id:63 gh:64 * * @param node An original source tree node. */ @@ -63477,7 +63477,7 @@ var ts; // Resume at the next label. // .yieldstar (x) - Delegate yield to the value of the optional // expression `x`. Resume at the next label. -// NOTE: `x` must be an Iterator, not an Iterable. +// NOTE: `x` must be an Iterator, not an Iterable. id:90 gh:91 // .loop CONTINUE, BREAK - Marks the beginning of a loop. Any "continue" or // "break" abrupt completions jump to the CONTINUE or // BREAK labels, respectively. @@ -63611,7 +63611,7 @@ var ts; ExceptionBlockState[ExceptionBlockState["Finally"] = 2] = "Finally"; ExceptionBlockState[ExceptionBlockState["Done"] = 3] = "Done"; })(ExceptionBlockState || (ExceptionBlockState = {})); - // NOTE: changes to this enum should be reflected in the __generator helper. + // NOTE: changes to this enum should be reflected in the __generator helper. id:653 gh:654 var Instruction; (function (Instruction) { Instruction[Instruction["Next"] = 0] = "Next"; @@ -64680,7 +64680,7 @@ var ts; return node; } function transformAndEmitForInStatement(node) { - // TODO(rbuckton): Source map locations + // TODO (rbuckton): Source map locations id:31 gh:32 if (containsYield(node)) { // [source] // for (var p in o) { @@ -70442,7 +70442,7 @@ var ts; } else if (node.kind === 150 /* PropertyDeclaration */ || node.kind === 149 /* PropertySignature */ || (node.kind === 147 /* Parameter */ && ts.hasModifier(node.parent, 8 /* Private */))) { - // TODO(jfreeman): Deal with computed properties in error reporting. + // TODO (jfreeman): Deal with computed properties in error reporting. id:30 gh:31 if (ts.hasModifier(node, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -72178,7 +72178,7 @@ var ts; comments.reset(); setWriter(/*output*/ undefined); } - // TODO: Should this just be `emit`? + // TODO: Should this just be `emit`? id:126 gh:127 // See https://github.com/Microsoft/TypeScript/pull/18284#discussion_r137611034 function emitIfPresent(node) { if (node) { @@ -76410,7 +76410,7 @@ var ts; // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - // NOTE: body of ambient module is always a module block, if it exists + // NOTE: body of ambient module is always a module block, if it exists id:93 gh:94 var body = node.body; if (body) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { @@ -76511,7 +76511,7 @@ var ts; if (filesByName.has(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path - // NOTE: this only makes sense for case-insensitive file systems + // NOTE: this only makes sense for case-insensitive file systems id:654 gh:655 if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd); } @@ -77647,7 +77647,7 @@ var ts; function isThis(node) { switch (node.kind) { case 99 /* ThisKeyword */: - // case SyntaxKind.ThisType: TODO: GH#9267 + // case SyntaxKind.ThisType: TODO: GH#9267 id:33 gh:34 return true; case 71 /* Identifier */: // 'this' as a parameter @@ -79852,7 +79852,7 @@ var ts; // specially. var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { - // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` + // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` id:32 gh:33 docCommentAndDiagnostics.jsDoc.parent = token; classifyJSDocComment(docCommentAndDiagnostics.jsDoc); return; @@ -80040,11 +80040,11 @@ var ts; return token.parent.kind === 257 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 12 /* RegularExpressionLiteral */) { - // TODO: we should get another classification type for these literals. + // TODO: we should get another classification type for these literals. id:132 gh:133 return 6 /* stringLiteral */; } else if (ts.isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. + // TODO (drosen): we should *also* get another classification type for these literals. id:97 gh:98 return 6 /* stringLiteral */; } else if (tokenKind === 10 /* JsxText */) { @@ -80617,7 +80617,7 @@ var ts; } getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log, allowStringLiteral, recommendedCompletion, symbolToOriginInfoMap); } - // TODO add filter for keyword based on type/value/namespace and also location + // TODO add filter for keyword based on type/value/namespace and also location id:655 gh:656 // Add all keywords if // - this is not a member completion list (all the keywords) // - other filters are enabled in required scenario so add those keywords @@ -80657,7 +80657,7 @@ var ts; if (!displayName) { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // TODO (drosen): Right now we just permit *all* semantic meanings when calling id:35 gh:36 // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report // that a suggestion for a value is an interface. We COULD also just do what @@ -80993,7 +80993,7 @@ var ts; function getCompletionData(typeChecker, log, sourceFile, position, allSourceFiles, options, target) { var request; var start = ts.timestamp(); - var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 + var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 id:34 gh:35 // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.) log("getCompletionData: Get current token: " + (ts.timestamp() - start)); start = ts.timestamp(); @@ -81095,7 +81095,7 @@ var ts; var isRightOfDot = false; var isRightOfOpenTag = false; var isStartingCloseTag = false; - var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 + var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 id:136 gh:137 if (contextToken) { // Bail out if this is a known invalid completion location if (isCompletionListBlocker(contextToken)) { @@ -82058,8 +82058,8 @@ var ts; } } else { - // TODO: Account for computed property name - // NOTE: if one only performs this step when m.name is an identifier, + // TODO: Account for computed property name id:101 gh:102 + // NOTE: if one only performs this step when m.name is an identifier, id:656 gh:657 // things like '__proto__' are not filtered out. var name = ts.getNameOfDeclaration(m); existingName = ts.getEscapedTextOfIdentifierOrLiteral(name); @@ -82187,7 +82187,7 @@ var ts; // e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid. // We, thus, need to check if whatever was inside the quotes is actually a valid identifier name. if (performCharacterChecks && !ts.isIdentifierText(name, target)) { - // TODO: GH#18169 + // TODO: GH#18169 id:37 gh:38 return allowStringLiteral ? JSON.stringify(name) : undefined; } return name; @@ -82503,7 +82503,7 @@ var ts; return !statement.label || isLabeledBy(node, statement.label.text); default: // Don't cross function boundaries. - // TODO: GH#20090 + // TODO: GH#20090 id:36 gh:37 return (ts.isFunctionLike(node) && "quit"); } }); @@ -84049,7 +84049,7 @@ var ts; function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) { if (container === void 0) { container = sourceFile; } var positions = []; - /// TODO: Cache symbol existence for files to save text search + /// TODO: Cache symbol existence for files to save text search id:141 gh:142 // Also, need to make this work for unicode escapes. // Be resilient in the face of a symbol with no name or zero length name if (!symbolName || !symbolName.length) { @@ -85567,7 +85567,7 @@ var ts; // * The opening comment line // * the first line (without a param) for the object's untagged info (this is also where the caret ends up) // * the '@param'-tagged lines - // * TODO: other tags. + // * TODO: other tags. id:104 gh:105 // * the closing comment line // * if the caret was directly in front of the object, then we add an extra line and indentation. var preamble = "/**" + newLine + @@ -85873,7 +85873,7 @@ var ts; } // check if name is scope package like: starts with @ and has one '/' in the middle // scoped packages are not currently supported - // TODO: when support will be added we'll need to split and check both scope and package name + // TODO: when support will be added we'll need to split and check both scope and package name id:657 gh:658 if (/^@[^/]+\/[^/]+$/.test(packageName)) { return 1 /* ScopedPackagesNotSupported */; } @@ -86056,7 +86056,7 @@ var ts; return bestMatchKind; } function compareNavigateToItems(i1, i2) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. + // TODO (cyrusn): get the gamut of comparisons that VS already uses here. id:39 gh:40 return ts.compareValues(i1.matchKind, i2.matchKind) || ts.compareStringsCaseSensitiveUI(i1.name, i2.name); } @@ -86072,7 +86072,7 @@ var ts; isCaseSensitive: rawItem.isCaseSensitive, fileName: rawItem.fileName, textSpan: ts.createTextSpanFromNode(declaration), - // TODO(jfreeman): What should be the containerName when the container has a computed name? + // TODO (jfreeman): What should be the containerName when the container has a computed name? id:38 gh:39 containerName: containerName ? containerName.text : "", containerKind: containerName ? ts.getNodeKind(container) : "" /* unknown */ }; @@ -87203,7 +87203,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:146 gh:147 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -87216,7 +87216,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:106 gh:107 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -87250,12 +87250,12 @@ var ts; if (ch < 127 /* maxAsciiCharacter */) { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a id:658 gh:659 // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } function isDigit(ch) { - // TODO(cyrusn): Find a way to support this for unicode digits. + // TODO (cyrusn): Find a way to support this for unicode digits. id:41 gh:42 return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } function isWordChar(ch) { @@ -88156,7 +88156,7 @@ var ts; if (argumentInfo) { return argumentInfo; } - // TODO: Handle generic call with incomplete syntax + // TODO: Handle generic call with incomplete syntax id:40 gh:41 } return undefined; } @@ -88252,7 +88252,7 @@ var ts; (function (ts) { var SymbolDisplay; (function (SymbolDisplay) { - // TODO(drosen): use contextual SemanticMeaning. + // TODO (drosen): use contextual SemanticMeaning. id:149 gh:150 function getSymbolKind(typeChecker, symbol, location) { var flags = ts.getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { @@ -88355,7 +88355,7 @@ var ts; : "" /* none */; } SymbolDisplay.getSymbolModifiers = getSymbolModifiers; - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location + // TODO (drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location id:109 gh:110 function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } var displayParts = []; @@ -89721,7 +89721,7 @@ var ts; case 225 /* TryStatement */: case 213 /* DoStatement */: case 221 /* WithStatement */: - // TODO + // TODO id:659 gh:660 // case SyntaxKind.ElseClause: case 264 /* CatchClause */: return true; @@ -92500,7 +92500,7 @@ var ts; // This is the identifier of the misspelled word. eg: // this.speling = 1; // ^^^^^^^ - var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 + var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 id:43 gh:44 var checker = context.program.getTypeChecker(); var suggestion; if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { @@ -92957,7 +92957,7 @@ var ts; function getActionsForJSDocTypes(context) { var sourceFile = context.sourceFile; var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); - // NOTE: Some locations are not handled yet: + // NOTE: Some locations are not handled yet: id:42 gh:43 // MappedTypeNode.typeParameters and SignatureDeclaration.typeParameters, as well as CallExpression.typeArguments var decl = ts.findAncestor(node, function (n) { return n.kind === 203 /* AsExpression */ || @@ -93188,7 +93188,7 @@ var ts; return declaration.name; } } - // TODO(anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? + // TODO (anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? id:152 gh:153 function getImportDeclarations(moduleSymbol, checker, _a, cachedImportDeclarations) { var imports = _a.imports; if (cachedImportDeclarations === void 0) { cachedImportDeclarations = []; } @@ -94407,7 +94407,7 @@ var ts; if (node === parent.left && (node.parent.parent.kind === 227 /* VariableDeclaration */ || ts.isAssignmentExpression(node.parent.parent, /*excludeCompoundAssignment*/ true))) { // var x = x || {}; - // TODO: use getFalsyflagsOfType + // TODO: use getFalsyflagsOfType id:111 gh:112 addCandidateType(usageContext, checker.getTypeAtLocation(parent.right)); } break; @@ -95764,7 +95764,7 @@ var ts; // Declaring exactly one variable: let x = newFunction(); var variableDeclaration = exposedVariableDeclarations[0]; newNodes.push(ts.createVariableStatement( - /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns + /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns id:660 gh:661 variableDeclaration.parent.flags))); } else { @@ -96259,7 +96259,7 @@ var ts; constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); } if (ts.isArrowFunction(scope) && !ts.isBlock(scope.body)) { - // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this + // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this id:45 gh:46 constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); } constantErrorsPerScope.push(constantErrors); @@ -98387,8 +98387,8 @@ var ts; // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. + // i.e. 'undefined' in position 3 above means TODO (jason) didn't match. id:44 gh:45 + // "hack" in position 4 means HACK did match. id:156 gh:157 var firstDescriptorCaptureIndex = 3; ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); var preamble = matchArray[1]; @@ -98419,26 +98419,26 @@ var ts; return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } function getTodoCommentsRegExp() { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to + // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to id:113 gh:114 // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: + // TODO comments can appear in one of the following forms: id:661 gh:662 // - // 1) // TODO or /////////// TODO + // 1) // TODO or /////////// TODO id:48 gh:49 // - // 2) /* TODO or /********** TODO + // 2) /* TODO or /********** TODO id:47 gh:48 // // 3) /* - // * TODO + // * TODO id:158 gh:159 // */ // - // The following three regexps are used to match the start of the text up to the TODO + // The following three regexps are used to match the start of the text up to the TODO id:115 gh:116 // comment portion. var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. + // Match any of the above three TODO comment start regexps. id:662 gh:663 // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. + // so that we can determine the starting position of the TODO comment match. id:51 gh:52 var preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: @@ -98453,7 +98453,7 @@ var ts; // text up to the end of the line (or */). var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We + // This is the portion of the match we'll return as part of the TODO comment result. We id:50 gh:51 // match the literal portion up to the end of the line or end of comment. var messagePortion = "(" + literals + messageRemainder + ")"; var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; @@ -98463,7 +98463,7 @@ var ts; // 'g' is so that we are doing a global search and can find matches several times // in the input. // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). + // 'i' is for case insensitivity (We do this to match C# TODO comment code). id:160 gh:161 // // 'm' is so we can find matches in a multi-line input. return new RegExp(regExpString, "gim"); @@ -98733,7 +98733,7 @@ var ts; LogLevel[LogLevel["verbose"] = 3] = "verbose"; })(LogLevel = server.LogLevel || (server.LogLevel = {})); server.emptyArray = createSortedArray(); - // TODO: Use a const enum (https://github.com/Microsoft/TypeScript/issues/16804) + // TODO: Use a const enum (https://github.com/Microsoft/TypeScript/issues/16804) id:118 gh:119 var Msg; (function (Msg) { Msg["Err"] = "Err"; @@ -98745,7 +98745,7 @@ var ts; case server.ProjectKind.Configured: return ts.getDirectoryPath(project.getProjectName()); case server.ProjectKind.Inferred: - // TODO: fixme + // TODO: fixme id:663 gh:664 return ""; case server.ProjectKind.External: var projectName = ts.normalizeSlashes(project.getProjectName()); @@ -99018,7 +99018,7 @@ var ts; (function (server) { var protocol; (function (protocol) { - // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. + // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. id:55 gh:56 var CommandTypes; (function (CommandTypes) { CommandTypes["Brace"] = "brace"; @@ -99124,7 +99124,7 @@ var ts; CommandTypes["GetEditsForRefactor"] = "getEditsForRefactor"; /* @internal */ CommandTypes["GetEditsForRefactorFull"] = "getEditsForRefactor-full"; - // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. + // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. id:52 gh:53 })(CommandTypes = protocol.CommandTypes || (protocol.CommandTypes = {})); var IndentStyle; (function (IndentStyle) { @@ -99367,17 +99367,17 @@ var ts; this.handlers = ts.createMapFromTemplate((_a = {}, _a[server.CommandNames.OpenExternalProject] = function (request) { _this.projectService.openExternalProject(request.arguments, /*suppressRefreshOfInferredProjects*/ false); - // TODO: report errors + // TODO: report errors id:162 gh:163 return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.OpenExternalProjects] = function (request) { _this.projectService.openExternalProjects(request.arguments.projects); - // TODO: report errors + // TODO: report errors id:121 gh:122 return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.CloseExternalProject] = function (request) { _this.projectService.closeExternalProject(request.arguments.projectFileName); - // TODO: report errors + // TODO: report errors id:664 gh:665 return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.SynchronizeProjectList] = function (request) { @@ -99401,7 +99401,7 @@ var ts; _a[server.CommandNames.ApplyChangedToOpenFiles] = function (request) { _this.changeSeq++; _this.projectService.applyChangesInOpenFiles(request.arguments.openFiles, request.arguments.changedFiles, request.arguments.closedFiles); - // TODO: report errors + // TODO: report errors id:59 gh:60 return _this.requiredResponse(/*response*/ true); }, _a[server.CommandNames.Exit] = function () { @@ -100335,7 +100335,7 @@ var ts; var scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); var startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset); var endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); - // TODO: avoid duplicate code (with formatonkey) + // TODO: avoid duplicate code (with formatonkey) id:54 gh:55 var edits = languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file)); if (!edits) { return undefined; @@ -101203,7 +101203,7 @@ var ts; ScriptVersionCache.prototype.currentVersionToIndex = function () { return this.currentVersion % ScriptVersionCache.maxVersions; }; - // REVIEW: can optimize by coalescing simple edits + // REVIEW: can optimize by coalescing simple edits id:164 gh:165 ScriptVersionCache.prototype.edit = function (pos, deleteLen, insertedText) { this.changes.push(new TextChange(pos, deleteLen, insertedText)); if (this.changes.length > ScriptVersionCache.changeNumberThreshold || @@ -101828,7 +101828,7 @@ var ts; if (!this.useScriptVersionCacheIfValidOrOpen()) { return ts.computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text); } - // TODO: assert this offset is actually on the line + // TODO: assert this offset is actually on the line id:125 gh:126 return this.svc.lineOffsetToPosition(line, offset); }; TextStorage.prototype.positionToLineOffset = function (position) { @@ -102774,7 +102774,7 @@ var ts; !setIsEqualTo(opt1.exclude, opt2.exclude); } function compilerOptionsChanged(opt1, opt2) { - // TODO: add more relevant properties + // TODO: add more relevant properties id:665 gh:666 return opt1.allowJs !== opt2.allowJs; } function unresolvedImportsChanged(imports1, imports2) { @@ -104604,7 +104604,7 @@ var ts; }; ProjectService.prototype.handleDeletedFile = function (info) { this.stopWatchingScriptInfo(info); - // TODO: handle isOpen = true case + // TODO: handle isOpen = true case id:62 gh:63 if (!info.isScriptOpen()) { this.filenameToScriptInfo.delete(info.path); // capture list of projects since detachAllProjects will wipe out original list @@ -105225,7 +105225,7 @@ var ts; var languageServiceEnabled = !this.exceededTotalSizeLimitForNonTsFiles(configFileName, projectOptions.compilerOptions, projectOptions.files, fileNamePropertyReader); var project = new server.ConfiguredProject(configFileName, this, this.documentRegistry, projectOptions.configHasFilesProperty, projectOptions.compilerOptions, languageServiceEnabled, projectOptions.compileOnSave === undefined ? false : projectOptions.compileOnSave, cachedDirectoryStructureHost); project.configFileSpecs = configFileSpecs; - // TODO: We probably should also watch the configFiles that are extended + // TODO: We probably should also watch the configFiles that are extended id:57 gh:58 project.configFileWatcher = this.watchFile(this.host, configFileName, function (_fileName, eventKind) { return _this.onConfigChangedForConfiguredProject(project, eventKind); }, "Config file for the program" /* ConfigFilePath */, project); if (languageServiceEnabled) { project.watchWildcards(projectOptions.wildcardDirectories); @@ -105377,7 +105377,7 @@ var ts; if (!ts.containsPath(project.projectRootPath, info.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames)) continue; // ignore inferred projects that are higher up in the project root. - // TODO(rbuckton): Should we add the file as a root to these as well? + // TODO (rbuckton): Should we add the file as a root to these as well? id:166 gh:167 if (bestMatch && bestMatch.projectRootPath.length > project.projectRootPath.length) continue; bestMatch = project; @@ -106348,7 +106348,7 @@ var ts; message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine), start: diagnostic.start, length: diagnostic.length, - /// TODO: no need for the tolowerCase call + /// TODO: no need for the tolowerCase call id:128 gh:129 category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(), code: diagnostic.code }; @@ -106844,7 +106844,7 @@ var ts; })(ts || (ts = {})); /* tslint:enable:no-in-operator */ /* tslint:enable:no-null */ -/// TODO: this is used by VS, clean this up on both sides of the interface +/// TODO: this is used by VS, clean this up on both sides of the interface id:666 gh:667 /* @internal */ var TypeScript; (function (TypeScript) { @@ -106854,6 +106854,6 @@ var TypeScript; })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); // 'toolsVersion' gets consumed by the managed side, so it's not unused. -// TODO: it should be moved into a namespace though. +// TODO: it should be moved into a namespace though. id:65 gh:66 /* @internal */ var toolsVersion = ts.versionMajorMinor; diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 9573a51760fd3..8b3a32790bd98 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -2557,7 +2557,7 @@ declare namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:61 gh:62 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -2575,7 +2575,7 @@ declare namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:168 gh:169 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; diff --git a/lib/typescript.js b/lib/typescript.js index 1fbae487f8038..34b0565de803a 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1306,7 +1306,7 @@ var ts; (function (ts) { var performance; (function (performance) { - // NOTE: cannot use ts.noop as core.ts loads after this + // NOTE: cannot use ts.noop as core.ts loads after this id:131 gh:132 var profilerEvent = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : function () { }; var enabled = false; var profilerStart = 0; @@ -2920,7 +2920,7 @@ var ts; return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */; } function createIntlCollatorStringComparer(locale) { - // Intl.Collator.prototype.compare is bound to the collator. See NOTE in + // Intl.Collator.prototype.compare is bound to the collator. See NOTE in id:667 gh:668 // http://www.ecma-international.org/ecma-402/2.0/#sec-Intl.Collator.prototype.compare var comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return function (a, b) { return compareWithCallback(a, b, comparer); }; @@ -8308,7 +8308,7 @@ var ts; case 183 /* NewExpression */: return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 184 /* TaggedTemplateExpression */: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. + // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. id:67 gh:68 return false; } } @@ -11348,7 +11348,7 @@ var ts; if (!sys.fileExists(filePath)) { return false; } - // TODO: Add codePage support for readFile? + // TODO: Add codePage support for readFile? id:66 gh:67 var fileContents = ""; try { fileContents = sys.readFile(filePath); @@ -13000,7 +13000,7 @@ var ts; return node.kind === 279 /* JSDocComment */ || isJSDocTag(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; - // TODO: determine what this does before making it public. + // TODO: determine what this does before making it public. id:170 gh:171 /* @internal */ function isJSDocTag(node) { return node.kind >= 281 /* FirstJSDocTagNode */ && node.kind <= 289 /* LastJSDocTagNode */; @@ -17030,7 +17030,7 @@ var ts; return parseMethodDeclaration(node, asteriskToken); } // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production id:134 gh:135 // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern @@ -17300,7 +17300,7 @@ var ts; parseSemicolon(); return finishNode(node); } - // TODO: Review for error recovery + // TODO: Review for error recovery id:668 gh:669 function parseTryStatement() { var node = createNode(225 /* TryStatement */); parseExpected(102 /* TryKeyword */); @@ -18590,7 +18590,7 @@ var ts; if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { removeTrailingNewlines(comments); parseTag(indent); - // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. + // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. id:70 gh:71 // Real-world comments may break this rule, so "BeginningOfLine" will not be a real line beginning // for malformed examples like `/** @param {string} x @returns {number} the length */` state = 0 /* BeginningOfLine */; @@ -20034,11 +20034,11 @@ var ts; // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. + // TODO: Make this a more specific error and decouple it from the exclusion logic. id:68 gh:69 // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge id:172 gh:173 // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. @@ -20604,7 +20604,7 @@ var ts; function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); var preTryFlow = currentFlow; - // TODO: Every statement in try block is potentially an exit point! + // TODO: Every statement in try block is potentially an exit point! id:137 gh:138 bind(node.tryBlock); addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; @@ -22789,7 +22789,7 @@ var ts; /** * Gets the transform flags to exclude when unioning the transform flags of a subtree. * - * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. + * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. id:669 gh:670 * For performance reasons, `computeTransformFlagsForNode` uses local constant values rather * than calling this function. */ @@ -26977,7 +26977,7 @@ var ts; // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree + // NOTE (cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree id:73 gh:74 // up front (for example, during checking) could determine if we need to emit the imports // and we could then access that data during declaration emit. writer.trackSymbol(symbol, enclosingDeclaration, meaning); @@ -30655,7 +30655,7 @@ var ts; var typeStr = typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */); error(node, diag, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { - // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) + // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) id:72 gh:73 return unknownType; } } @@ -32132,7 +32132,7 @@ var ts; return true; } } - // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. + // TODO (anhans): A block should be context-sensitive if it has a context-sensitive return value. id:174 gh:175 return node.body.kind === 208 /* Block */ ? false : isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { @@ -32220,7 +32220,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:140 gh:141 if (source === target) { return -1 /* True */; } @@ -33721,7 +33721,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:670 gh:671 if (source === target) { return -1 /* True */; } @@ -34987,7 +34987,7 @@ var ts; } function getTypeWithFacts(type, include) { if (type.flags & 1048576 /* IndexedAccess */) { - // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to + // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to id:76 gh:77 // - See discussion in https://github.com/Microsoft/TypeScript/pull/19275 for details, and test `strictNullNotNullIndexTypeShouldWork` for current behavior var baseConstraint = getBaseConstraintOfType(type) || emptyObjectType; var result = filterType(baseConstraint, function (t) { return (getTypeFacts(t) & include) !== 0; }); @@ -37533,7 +37533,7 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - // TODO (yuisu): comment + // TODO (yuisu): comment id:75 gh:76 switch (tagName.kind) { case 180 /* PropertyAccessExpression */: case 99 /* ThisKeyword */: @@ -38802,7 +38802,7 @@ var ts; return true; } function callLikeExpressionMayHaveTypeArguments(node) { - // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) + // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) id:176 gh:177 return ts.isCallOrNewExpression(node); } function resolveUntypedCall(node) { @@ -40566,7 +40566,7 @@ var ts; else if (returnType && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present id:143 gh:144 error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { @@ -40883,12 +40883,12 @@ var ts; // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature. // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported + // NOTE: do not raise error if leftType is unknown as related error was already reported id:671 gh:672 if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 16382 /* Primitive */)) { error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - // NOTE: do not raise error if right is unknown as related error was already reported + // NOTE: do not raise error if right is unknown as related error was already reported id:79 gh:80 if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } @@ -41203,7 +41203,7 @@ var ts; } else if (isTypeAny(leftType) || isTypeAny(rightType)) { // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. + // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. id:78 gh:79 resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; } // Symbols are not allowed at all in arithmetic expressions @@ -41846,7 +41846,7 @@ var ts; } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - // TODO(rbuckton): Should we start checking JSDoc types? + // TODO (rbuckton): Should we start checking JSDoc types? id:178 gh:179 if (node.type) { checkSourceElement(node.type); } @@ -42429,7 +42429,7 @@ var ts; if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; - // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) + // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) id:147 gh:148 var subsequentName = subsequentNode.name; if (node.name && subsequentName && (ts.isComputedPropertyName(node.name) && ts.isComputedPropertyName(subsequentName) || @@ -43509,7 +43509,7 @@ var ts; return; } // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern + // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern id:672 gh:673 // so we'll always treat binding elements as initialized if (node.kind === 227 /* VariableDeclaration */ && !node.initializer) { return; @@ -44195,7 +44195,7 @@ var ts; // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid + // TODO: Check that target label is valid id:82 gh:83 } function isGetAccessorWithAnnotatedSetAccessor(node) { return node.kind === 154 /* GetAccessor */ @@ -44223,7 +44223,7 @@ var ts; if (functionFlags & 1 /* Generator */) { // A generator does not need its return expressions checked against its return type. // Instead, the yield expressions are checked against the element type. - // TODO: Check return expressions of generators when return type tracking is added + // TODO: Check return expressions of generators when return type tracking is added id:80 gh:81 // for generators. return; } @@ -44695,7 +44695,7 @@ var ts; // but not by other kinds of members. // Base class instance member variables and accessors can be overridden by // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration + // NOTE: assignability is checked in checkClassDeclaration id:181 gh:182 var baseProperties = getPropertiesOfType(baseType); for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) { var baseProperty = baseProperties_1[_i]; @@ -48112,7 +48112,7 @@ var ts; // export_opt ExternalImportDeclaration // export_opt AmbientDeclaration // - // TODO: The spec needs to be amended to reflect this grammar. + // TODO: The spec needs to be amended to reflect this grammar. id:151 gh:152 if (node.kind === 231 /* InterfaceDeclaration */ || node.kind === 232 /* TypeAliasDeclaration */ || node.kind === 239 /* ImportDeclaration */ || @@ -52746,7 +52746,7 @@ var ts; } /** * Similar to `reduceLeft`, performs a reduction against each child of a node. - * NOTE: Unlike `forEachChild`, this does *not* visit every node. + * NOTE: Unlike `forEachChild`, this does *not* visit every node. id:673 gh:674 * * @param node The node containing the children to reduce. * @param initial The initial value to supply to the reduction. @@ -53563,7 +53563,7 @@ var ts; } return ts.aggregateTransformFlags(ts.inlineExpressions(expressions)) || ts.createOmittedExpression(); function emitExpression(expression) { - // NOTE: this completely disables source maps, but aligns with the behavior of + // NOTE: this completely disables source maps, but aligns with the behavior of id:85 gh:86 // `emitAssignment` in the old emitter. ts.setEmitFlags(expression, 64 /* NoNestedSourceMaps */); ts.aggregateTransformFlags(expression); @@ -56355,7 +56355,7 @@ var ts; // namespace hello.hi.world { // function foo() {} // - // // TODO, blah + // // TODO , blah id:83 gh:84 // } // // should be emitted as @@ -56367,7 +56367,7 @@ var ts; // var world; // (function (world) { // function foo() { } - // // TODO, blah + // // TODO , blah id:183 gh:184 // })(world = hi.world || (hi.world = {})); // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); @@ -58477,7 +58477,7 @@ var ts; HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement"; HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper"; HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName"; - // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. + // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. id:155 gh:156 // // Ancestor masks // @@ -60375,7 +60375,7 @@ var ts; } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: id:674 gh:675 // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. (extraVariableDeclarations || (extraVariableDeclarations = [])).push(ts.createVariableDeclaration(currentState.thisName, @@ -60451,7 +60451,7 @@ var ts; var statements = []; // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop // simple loops are emitted as just 'loop()'; - // NOTE: if loop uses only 'continue' it still will be emitted as simple loop + // NOTE: if loop uses only 'continue' it still will be emitted as simple loop id:88 gh:89 var isSimpleLoop = !(state.nonLocalJumps & ~4 /* Continue */) && !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues; @@ -61261,7 +61261,7 @@ var ts; } /** * Determines whether a name is the name of a declaration with a colliding name. - * NOTE: This function expects to be called with an original source tree node. + * NOTE: This function expects to be called with an original source tree node. id:86 gh:87 * * @param node An original source tree node. */ @@ -61540,7 +61540,7 @@ var ts; // Resume at the next label. // .yieldstar (x) - Delegate yield to the value of the optional // expression `x`. Resume at the next label. -// NOTE: `x` must be an Iterator, not an Iterable. +// NOTE: `x` must be an Iterator, not an Iterable. id:187 gh:188 // .loop CONTINUE, BREAK - Marks the beginning of a loop. Any "continue" or // "break" abrupt completions jump to the CONTINUE or // BREAK labels, respectively. @@ -61674,7 +61674,7 @@ var ts; ExceptionBlockState[ExceptionBlockState["Finally"] = 2] = "Finally"; ExceptionBlockState[ExceptionBlockState["Done"] = 3] = "Done"; })(ExceptionBlockState || (ExceptionBlockState = {})); - // NOTE: changes to this enum should be reflected in the __generator helper. + // NOTE: changes to this enum should be reflected in the __generator helper. id:157 gh:158 var Instruction; (function (Instruction) { Instruction[Instruction["Next"] = 0] = "Next"; @@ -62743,7 +62743,7 @@ var ts; return node; } function transformAndEmitForInStatement(node) { - // TODO(rbuckton): Source map locations + // TODO (rbuckton): Source map locations id:675 gh:676 if (containsYield(node)) { // [source] // for (var p in o) { @@ -69129,7 +69129,7 @@ var ts; } else if (node.kind === 150 /* PropertyDeclaration */ || node.kind === 149 /* PropertySignature */ || (node.kind === 147 /* Parameter */ && ts.hasModifier(node.parent, 8 /* Private */))) { - // TODO(jfreeman): Deal with computed properties in error reporting. + // TODO (jfreeman): Deal with computed properties in error reporting. id:91 gh:92 if (ts.hasModifier(node, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -70129,7 +70129,7 @@ var ts; comments.reset(); setWriter(/*output*/ undefined); } - // TODO: Should this just be `emit`? + // TODO: Should this just be `emit`? id:89 gh:90 // See https://github.com/Microsoft/TypeScript/pull/18284#discussion_r137611034 function emitIfPresent(node) { if (node) { @@ -74361,7 +74361,7 @@ var ts; // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - // NOTE: body of ambient module is always a module block, if it exists + // NOTE: body of ambient module is always a module block, if it exists id:190 gh:191 var body = node.body; if (body) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { @@ -74462,7 +74462,7 @@ var ts; if (filesByName.has(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path - // NOTE: this only makes sense for case-insensitive file systems + // NOTE: this only makes sense for case-insensitive file systems id:159 gh:160 if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd); } @@ -76456,7 +76456,7 @@ var ts; raw_1.compileOnSave = baseRaw_1.compileOnSave; } ownConfig.options = ts.assign({}, extendedConfig.options, ownConfig.options); - // TODO extend type typeAcquisition + // TODO extend type typeAcquisition id:676 gh:677 } } return ownConfig; @@ -76701,7 +76701,7 @@ var ts; * Tests for a path that ends in a recursive directory wildcard. * Matches **, \**, **\, and \**\, but not a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:95 gh:96 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76713,7 +76713,7 @@ var ts; * Tests for a path with multiple recursive directory wildcards. * Matches **\** and **\a\**, but not **\a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:92 gh:93 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76727,7 +76727,7 @@ var ts; * Tests for a path where .. appears after a recursive directory wildcard. * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\* * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:195 gh:196 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76741,7 +76741,7 @@ var ts; * Tests for a path containing a wildcard character in a directory component of the path. * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:161 gh:162 * * Breakdown: * \/ # matches a directory separator. @@ -76755,7 +76755,7 @@ var ts; * Matches the portion of a wildcard path that does not contain wildcards. * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:677 gh:678 * * Breakdown: * ^ # matches the beginning of the string @@ -77647,7 +77647,7 @@ var ts; function isThis(node) { switch (node.kind) { case 99 /* ThisKeyword */: - // case SyntaxKind.ThisType: TODO: GH#9267 + // case SyntaxKind.ThisType: TODO: GH#9267 id:98 gh:99 return true; case 71 /* Identifier */: // 'this' as a parameter @@ -79248,7 +79248,7 @@ var ts; // specially. var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { - // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` + // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` id:94 gh:95 docCommentAndDiagnostics.jsDoc.parent = token; classifyJSDocComment(docCommentAndDiagnostics.jsDoc); return; @@ -79436,11 +79436,11 @@ var ts; return token.parent.kind === 257 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 12 /* RegularExpressionLiteral */) { - // TODO: we should get another classification type for these literals. + // TODO: we should get another classification type for these literals. id:200 gh:201 return 6 /* stringLiteral */; } else if (ts.isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. + // TODO (drosen): we should *also* get another classification type for these literals. id:163 gh:164 return 6 /* stringLiteral */; } else if (tokenKind === 10 /* JsxText */) { @@ -80013,7 +80013,7 @@ var ts; } getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log, allowStringLiteral, recommendedCompletion, symbolToOriginInfoMap); } - // TODO add filter for keyword based on type/value/namespace and also location + // TODO add filter for keyword based on type/value/namespace and also location id:678 gh:679 // Add all keywords if // - this is not a member completion list (all the keywords) // - other filters are enabled in required scenario so add those keywords @@ -80053,7 +80053,7 @@ var ts; if (!displayName) { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // TODO (drosen): Right now we just permit *all* semantic meanings when calling id:100 gh:101 // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report // that a suggestion for a value is an interface. We COULD also just do what @@ -80389,7 +80389,7 @@ var ts; function getCompletionData(typeChecker, log, sourceFile, position, allSourceFiles, options, target) { var request; var start = ts.timestamp(); - var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 + var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 id:96 gh:97 // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.) log("getCompletionData: Get current token: " + (ts.timestamp() - start)); start = ts.timestamp(); @@ -80491,7 +80491,7 @@ var ts; var isRightOfDot = false; var isRightOfOpenTag = false; var isStartingCloseTag = false; - var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 + var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 id:203 gh:204 if (contextToken) { // Bail out if this is a known invalid completion location if (isCompletionListBlocker(contextToken)) { @@ -81454,8 +81454,8 @@ var ts; } } else { - // TODO: Account for computed property name - // NOTE: if one only performs this step when m.name is an identifier, + // TODO: Account for computed property name id:165 gh:166 + // NOTE: if one only performs this step when m.name is an identifier, id:679 gh:680 // things like '__proto__' are not filtered out. var name = ts.getNameOfDeclaration(m); existingName = ts.getEscapedTextOfIdentifierOrLiteral(name); @@ -81583,7 +81583,7 @@ var ts; // e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid. // We, thus, need to check if whatever was inside the quotes is actually a valid identifier name. if (performCharacterChecks && !ts.isIdentifierText(name, target)) { - // TODO: GH#18169 + // TODO: GH#18169 id:103 gh:104 return allowStringLiteral ? JSON.stringify(name) : undefined; } return name; @@ -81899,7 +81899,7 @@ var ts; return !statement.label || isLabeledBy(node, statement.label.text); default: // Don't cross function boundaries. - // TODO: GH#20090 + // TODO: GH#20090 id:99 gh:100 return (ts.isFunctionLike(node) && "quit"); } }); @@ -83445,7 +83445,7 @@ var ts; function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) { if (container === void 0) { container = sourceFile; } var positions = []; - /// TODO: Cache symbol existence for files to save text search + /// TODO: Cache symbol existence for files to save text search id:206 gh:207 // Also, need to make this work for unicode escapes. // Be resilient in the face of a symbol with no name or zero length name if (!symbolName || !symbolName.length) { @@ -84963,7 +84963,7 @@ var ts; // * The opening comment line // * the first line (without a param) for the object's untagged info (this is also where the caret ends up) // * the '@param'-tagged lines - // * TODO: other tags. + // * TODO: other tags. id:167 gh:168 // * the closing comment line // * if the caret was directly in front of the object, then we add an extra line and indentation. var preamble = "/**" + newLine + @@ -85269,7 +85269,7 @@ var ts; } // check if name is scope package like: starts with @ and has one '/' in the middle // scoped packages are not currently supported - // TODO: when support will be added we'll need to split and check both scope and package name + // TODO: when support will be added we'll need to split and check both scope and package name id:680 gh:681 if (/^@[^/]+\/[^/]+$/.test(packageName)) { return 1 /* ScopedPackagesNotSupported */; } @@ -85452,7 +85452,7 @@ var ts; return bestMatchKind; } function compareNavigateToItems(i1, i2) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. + // TODO (cyrusn): get the gamut of comparisons that VS already uses here. id:107 gh:108 return ts.compareValues(i1.matchKind, i2.matchKind) || ts.compareStringsCaseSensitiveUI(i1.name, i2.name); } @@ -85468,7 +85468,7 @@ var ts; isCaseSensitive: rawItem.isCaseSensitive, fileName: rawItem.fileName, textSpan: ts.createTextSpanFromNode(declaration), - // TODO(jfreeman): What should be the containerName when the container has a computed name? + // TODO (jfreeman): What should be the containerName when the container has a computed name? id:102 gh:103 containerName: containerName ? containerName.text : "", containerKind: containerName ? ts.getNodeKind(container) : "" /* unknown */ }; @@ -86599,7 +86599,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:209 gh:210 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -86612,7 +86612,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:169 gh:170 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -86646,12 +86646,12 @@ var ts; if (ch < 127 /* maxAsciiCharacter */) { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a id:681 gh:682 // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } function isDigit(ch) { - // TODO(cyrusn): Find a way to support this for unicode digits. + // TODO (cyrusn): Find a way to support this for unicode digits. id:110 gh:111 return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } function isWordChar(ch) { @@ -87552,7 +87552,7 @@ var ts; if (argumentInfo) { return argumentInfo; } - // TODO: Handle generic call with incomplete syntax + // TODO: Handle generic call with incomplete syntax id:105 gh:106 } return undefined; } @@ -87648,7 +87648,7 @@ var ts; (function (ts) { var SymbolDisplay; (function (SymbolDisplay) { - // TODO(drosen): use contextual SemanticMeaning. + // TODO (drosen): use contextual SemanticMeaning. id:213 gh:214 function getSymbolKind(typeChecker, symbol, location) { var flags = ts.getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { @@ -87751,7 +87751,7 @@ var ts; : "" /* none */; } SymbolDisplay.getSymbolModifiers = getSymbolModifiers; - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location + // TODO (drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location id:171 gh:172 function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } var displayParts = []; @@ -89117,7 +89117,7 @@ var ts; case 225 /* TryStatement */: case 213 /* DoStatement */: case 221 /* WithStatement */: - // TODO + // TODO id:682 gh:683 // case SyntaxKind.ElseClause: case 264 /* CatchClause */: return true; @@ -91896,7 +91896,7 @@ var ts; // This is the identifier of the misspelled word. eg: // this.speling = 1; // ^^^^^^^ - var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 + var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 id:114 gh:115 var checker = context.program.getTypeChecker(); var suggestion; if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { @@ -92353,7 +92353,7 @@ var ts; function getActionsForJSDocTypes(context) { var sourceFile = context.sourceFile; var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); - // NOTE: Some locations are not handled yet: + // NOTE: Some locations are not handled yet: id:108 gh:109 // MappedTypeNode.typeParameters and SignatureDeclaration.typeParameters, as well as CallExpression.typeArguments var decl = ts.findAncestor(node, function (n) { return n.kind === 203 /* AsExpression */ || @@ -92584,7 +92584,7 @@ var ts; return declaration.name; } } - // TODO(anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? + // TODO (anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? id:216 gh:217 function getImportDeclarations(moduleSymbol, checker, _a, cachedImportDeclarations) { var imports = _a.imports; if (cachedImportDeclarations === void 0) { cachedImportDeclarations = []; } @@ -93803,7 +93803,7 @@ var ts; if (node === parent.left && (node.parent.parent.kind === 227 /* VariableDeclaration */ || ts.isAssignmentExpression(node.parent.parent, /*excludeCompoundAssignment*/ true))) { // var x = x || {}; - // TODO: use getFalsyflagsOfType + // TODO: use getFalsyflagsOfType id:173 gh:174 addCandidateType(usageContext, checker.getTypeAtLocation(parent.right)); } break; @@ -95160,7 +95160,7 @@ var ts; // Declaring exactly one variable: let x = newFunction(); var variableDeclaration = exposedVariableDeclarations[0]; newNodes.push(ts.createVariableStatement( - /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns + /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns id:683 gh:684 variableDeclaration.parent.flags))); } else { @@ -95655,7 +95655,7 @@ var ts; constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); } if (ts.isArrowFunction(scope) && !ts.isBlock(scope.body)) { - // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this + // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this id:117 gh:118 constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); } constantErrorsPerScope.push(constantErrors); @@ -97783,8 +97783,8 @@ var ts; // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. + // i.e. 'undefined' in position 3 above means TODO (jason) didn't match. id:112 gh:113 + // "hack" in position 4 means HACK did match. id:220 gh:221 var firstDescriptorCaptureIndex = 3; ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); var preamble = matchArray[1]; @@ -97815,26 +97815,26 @@ var ts; return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } function getTodoCommentsRegExp() { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to + // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to id:175 gh:176 // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: + // TODO comments can appear in one of the following forms: id:684 gh:685 // - // 1) // TODO or /////////// TODO + // 1) // TODO or /////////// TODO id:120 gh:121 // - // 2) /* TODO or /********** TODO + // 2) /* TODO or /********** TODO id:116 gh:117 // // 3) /* - // * TODO + // * TODO id:226 gh:227 // */ // - // The following three regexps are used to match the start of the text up to the TODO + // The following three regexps are used to match the start of the text up to the TODO id:177 gh:178 // comment portion. var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. + // Match any of the above three TODO comment start regexps. id:685 gh:686 // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. + // so that we can determine the starting position of the TODO comment match. id:123 gh:124 var preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: @@ -97849,7 +97849,7 @@ var ts; // text up to the end of the line (or */). var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We + // This is the portion of the match we'll return as part of the TODO comment result. We id:119 gh:120 // match the literal portion up to the end of the line or end of comment. var messagePortion = "(" + literals + messageRemainder + ")"; var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; @@ -97859,7 +97859,7 @@ var ts; // 'g' is so that we are doing a global search and can find matches several times // in the input. // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). + // 'i' is for case insensitivity (We do this to match C# TODO comment code). id:229 gh:230 // // 'm' is so we can find matches in a multi-line input. return new RegExp(regExpString, "gim"); @@ -98961,7 +98961,7 @@ var ts; message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine), start: diagnostic.start, length: diagnostic.length, - /// TODO: no need for the tolowerCase call + /// TODO: no need for the tolowerCase call id:179 gh:180 category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(), code: diagnostic.code }; @@ -99457,7 +99457,7 @@ var ts; })(ts || (ts = {})); /* tslint:enable:no-in-operator */ /* tslint:enable:no-null */ -/// TODO: this is used by VS, clean this up on both sides of the interface +/// TODO: this is used by VS, clean this up on both sides of the interface id:686 gh:687 /* @internal */ var TypeScript; (function (TypeScript) { @@ -99467,6 +99467,6 @@ var TypeScript; })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); // 'toolsVersion' gets consumed by the managed side, so it's not unused. -// TODO: it should be moved into a namespace though. +// TODO: it should be moved into a namespace though. id:127 gh:128 /* @internal */ var toolsVersion = ts.versionMajorMinor; diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 7b78c4237d632..d0d8db02fd9c5 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -2557,7 +2557,7 @@ declare namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:122 gh:123 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -2575,7 +2575,7 @@ declare namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:232 gh:233 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 1fbae487f8038..5de9a03f635ac 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -1306,7 +1306,7 @@ var ts; (function (ts) { var performance; (function (performance) { - // NOTE: cannot use ts.noop as core.ts loads after this + // NOTE: cannot use ts.noop as core.ts loads after this id:180 gh:181 var profilerEvent = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : function () { }; var enabled = false; var profilerStart = 0; @@ -2920,7 +2920,7 @@ var ts; return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */; } function createIntlCollatorStringComparer(locale) { - // Intl.Collator.prototype.compare is bound to the collator. See NOTE in + // Intl.Collator.prototype.compare is bound to the collator. See NOTE in id:687 gh:688 // http://www.ecma-international.org/ecma-402/2.0/#sec-Intl.Collator.prototype.compare var comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return function (a, b) { return compareWithCallback(a, b, comparer); }; @@ -8308,7 +8308,7 @@ var ts; case 183 /* NewExpression */: return parent.typeArguments && ts.indexOf(parent.typeArguments, node) >= 0; case 184 /* TaggedTemplateExpression */: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. + // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. id:130 gh:131 return false; } } @@ -11348,7 +11348,7 @@ var ts; if (!sys.fileExists(filePath)) { return false; } - // TODO: Add codePage support for readFile? + // TODO: Add codePage support for readFile? id:124 gh:125 var fileContents = ""; try { fileContents = sys.readFile(filePath); @@ -13000,7 +13000,7 @@ var ts; return node.kind === 279 /* JSDocComment */ || isJSDocTag(node); } ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode; - // TODO: determine what this does before making it public. + // TODO: determine what this does before making it public. id:234 gh:235 /* @internal */ function isJSDocTag(node) { return node.kind >= 281 /* FirstJSDocTagNode */ && node.kind <= 289 /* LastJSDocTagNode */; @@ -17030,7 +17030,7 @@ var ts; return parseMethodDeclaration(node, asteriskToken); } // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production id:182 gh:183 // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern @@ -17300,7 +17300,7 @@ var ts; parseSemicolon(); return finishNode(node); } - // TODO: Review for error recovery + // TODO: Review for error recovery id:688 gh:689 function parseTryStatement() { var node = createNode(225 /* TryStatement */); parseExpected(102 /* TryKeyword */); @@ -18590,7 +18590,7 @@ var ts; if (state === 0 /* BeginningOfLine */ || state === 1 /* SawAsterisk */) { removeTrailingNewlines(comments); parseTag(indent); - // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. + // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. id:135 gh:136 // Real-world comments may break this rule, so "BeginningOfLine" will not be a real line beginning // for malformed examples like `/** @param {string} x @returns {number} the length */` state = 0 /* BeginningOfLine */; @@ -20034,11 +20034,11 @@ var ts; // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. + // TODO: Make this a more specific error and decouple it from the exclusion logic. id:129 gh:130 // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge id:239 gh:240 // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. @@ -20604,7 +20604,7 @@ var ts; function bindTryStatement(node) { var preFinallyLabel = createBranchLabel(); var preTryFlow = currentFlow; - // TODO: Every statement in try block is potentially an exit point! + // TODO: Every statement in try block is potentially an exit point! id:184 gh:185 bind(node.tryBlock); addAntecedent(preFinallyLabel, currentFlow); var flowAfterTry = currentFlow; @@ -22789,7 +22789,7 @@ var ts; /** * Gets the transform flags to exclude when unioning the transform flags of a subtree. * - * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. + * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. id:689 gh:690 * For performance reasons, `computeTransformFlagsForNode` uses local constant values rather * than calling this function. */ @@ -26977,7 +26977,7 @@ var ts; // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree + // NOTE (cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree id:138 gh:139 // up front (for example, during checking) could determine if we need to emit the imports // and we could then access that data during declaration emit. writer.trackSymbol(symbol, enclosingDeclaration, meaning); @@ -30655,7 +30655,7 @@ var ts; var typeStr = typeToString(type, /*enclosingDeclaration*/ undefined, 1 /* WriteArrayAsGenericType */); error(node, diag, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { - // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) + // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) id:133 gh:134 return unknownType; } } @@ -32132,7 +32132,7 @@ var ts; return true; } } - // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. + // TODO (anhans): A block should be context-sensitive if it has a context-sensitive return value. id:245 gh:246 return node.body.kind === 208 /* Block */ ? false : isContextSensitive(node.body); } function isContextSensitiveFunctionOrObjectLiteralMethod(func) { @@ -32220,7 +32220,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesRelated(source, target, callbackCheck, ignoreReturnTypes, reportErrors, errorReporter, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:188 gh:189 if (source === target) { return -1 /* True */; } @@ -33721,7 +33721,7 @@ var ts; * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:690 gh:691 if (source === target) { return -1 /* True */; } @@ -34987,7 +34987,7 @@ var ts; } function getTypeWithFacts(type, include) { if (type.flags & 1048576 /* IndexedAccess */) { - // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to + // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to id:142 gh:143 // - See discussion in https://github.com/Microsoft/TypeScript/pull/19275 for details, and test `strictNullNotNullIndexTypeShouldWork` for current behavior var baseConstraint = getBaseConstraintOfType(type) || emptyObjectType; var result = filterType(baseConstraint, function (t) { return (getTypeFacts(t) & include) !== 0; }); @@ -37533,7 +37533,7 @@ var ts; * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName) { - // TODO (yuisu): comment + // TODO (yuisu): comment id:139 gh:140 switch (tagName.kind) { case 180 /* PropertyAccessExpression */: case 99 /* ThisKeyword */: @@ -38802,7 +38802,7 @@ var ts; return true; } function callLikeExpressionMayHaveTypeArguments(node) { - // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) + // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) id:248 gh:249 return ts.isCallOrNewExpression(node); } function resolveUntypedCall(node) { @@ -40566,7 +40566,7 @@ var ts; else if (returnType && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present id:192 gh:193 error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { @@ -40883,12 +40883,12 @@ var ts; // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature. // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported + // NOTE: do not raise error if leftType is unknown as related error was already reported id:691 gh:692 if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 16382 /* Primitive */)) { error(left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - // NOTE: do not raise error if right is unknown as related error was already reported + // NOTE: do not raise error if right is unknown as related error was already reported id:145 gh:146 if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { error(right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } @@ -41203,7 +41203,7 @@ var ts; } else if (isTypeAny(leftType) || isTypeAny(rightType)) { // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. + // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. id:144 gh:145 resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; } // Symbols are not allowed at all in arithmetic expressions @@ -41846,7 +41846,7 @@ var ts; } checkTypeParameters(node.typeParameters); ts.forEach(node.parameters, checkParameter); - // TODO(rbuckton): Should we start checking JSDoc types? + // TODO (rbuckton): Should we start checking JSDoc types? id:267 gh:268 if (node.type) { checkSourceElement(node.type); } @@ -42429,7 +42429,7 @@ var ts; if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { var errorNode_1 = subsequentNode.name || subsequentNode; - // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) + // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) id:196 gh:197 var subsequentName = subsequentNode.name; if (node.name && subsequentName && (ts.isComputedPropertyName(node.name) && ts.isComputedPropertyName(subsequentName) || @@ -43509,7 +43509,7 @@ var ts; return; } // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern + // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern id:692 gh:693 // so we'll always treat binding elements as initialized if (node.kind === 227 /* VariableDeclaration */ && !node.initializer) { return; @@ -44195,7 +44195,7 @@ var ts; // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid + // TODO: Check that target label is valid id:150 gh:151 } function isGetAccessorWithAnnotatedSetAccessor(node) { return node.kind === 154 /* GetAccessor */ @@ -44223,7 +44223,7 @@ var ts; if (functionFlags & 1 /* Generator */) { // A generator does not need its return expressions checked against its return type. // Instead, the yield expressions are checked against the element type. - // TODO: Check return expressions of generators when return type tracking is added + // TODO: Check return expressions of generators when return type tracking is added id:148 gh:149 // for generators. return; } @@ -44695,7 +44695,7 @@ var ts; // but not by other kinds of members. // Base class instance member variables and accessors can be overridden by // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration + // NOTE: assignability is checked in checkClassDeclaration id:270 gh:271 var baseProperties = getPropertiesOfType(baseType); for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) { var baseProperty = baseProperties_1[_i]; @@ -48112,7 +48112,7 @@ var ts; // export_opt ExternalImportDeclaration // export_opt AmbientDeclaration // - // TODO: The spec needs to be amended to reflect this grammar. + // TODO: The spec needs to be amended to reflect this grammar. id:199 gh:200 if (node.kind === 231 /* InterfaceDeclaration */ || node.kind === 232 /* TypeAliasDeclaration */ || node.kind === 239 /* ImportDeclaration */ || @@ -52746,7 +52746,7 @@ var ts; } /** * Similar to `reduceLeft`, performs a reduction against each child of a node. - * NOTE: Unlike `forEachChild`, this does *not* visit every node. + * NOTE: Unlike `forEachChild`, this does *not* visit every node. id:693 gh:694 * * @param node The node containing the children to reduce. * @param initial The initial value to supply to the reduction. @@ -53563,7 +53563,7 @@ var ts; } return ts.aggregateTransformFlags(ts.inlineExpressions(expressions)) || ts.createOmittedExpression(); function emitExpression(expression) { - // NOTE: this completely disables source maps, but aligns with the behavior of + // NOTE: this completely disables source maps, but aligns with the behavior of id:154 gh:155 // `emitAssignment` in the old emitter. ts.setEmitFlags(expression, 64 /* NoNestedSourceMaps */); ts.aggregateTransformFlags(expression); @@ -56355,7 +56355,7 @@ var ts; // namespace hello.hi.world { // function foo() {} // - // // TODO, blah + // // TODO , blah id:153 gh:154 // } // // should be emitted as @@ -56367,7 +56367,7 @@ var ts; // var world; // (function (world) { // function foo() { } - // // TODO, blah + // // TODO , blah id:272 gh:273 // })(world = hi.world || (hi.world = {})); // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); @@ -58477,7 +58477,7 @@ var ts; HierarchyFacts[HierarchyFacts["ForInOrForOfStatement"] = 2048] = "ForInOrForOfStatement"; HierarchyFacts[HierarchyFacts["ConstructorWithCapturedSuper"] = 4096] = "ConstructorWithCapturedSuper"; HierarchyFacts[HierarchyFacts["ComputedPropertyName"] = 8192] = "ComputedPropertyName"; - // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. + // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. id:204 gh:205 // // Ancestor masks // @@ -60375,7 +60375,7 @@ var ts; } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: id:694 gh:695 // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. (extraVariableDeclarations || (extraVariableDeclarations = [])).push(ts.createVariableDeclaration(currentState.thisName, @@ -60451,7 +60451,7 @@ var ts; var statements = []; // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop // simple loops are emitted as just 'loop()'; - // NOTE: if loop uses only 'continue' it still will be emitted as simple loop + // NOTE: if loop uses only 'continue' it still will be emitted as simple loop id:185 gh:186 var isSimpleLoop = !(state.nonLocalJumps & ~4 /* Continue */) && !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues; @@ -61261,7 +61261,7 @@ var ts; } /** * Determines whether a name is the name of a declaration with a colliding name. - * NOTE: This function expects to be called with an original source tree node. + * NOTE: This function expects to be called with an original source tree node. id:186 gh:187 * * @param node An original source tree node. */ @@ -61540,7 +61540,7 @@ var ts; // Resume at the next label. // .yieldstar (x) - Delegate yield to the value of the optional // expression `x`. Resume at the next label. -// NOTE: `x` must be an Iterator, not an Iterable. +// NOTE: `x` must be an Iterator, not an Iterable. id:275 gh:276 // .loop CONTINUE, BREAK - Marks the beginning of a loop. Any "continue" or // "break" abrupt completions jump to the CONTINUE or // BREAK labels, respectively. @@ -61674,7 +61674,7 @@ var ts; ExceptionBlockState[ExceptionBlockState["Finally"] = 2] = "Finally"; ExceptionBlockState[ExceptionBlockState["Done"] = 3] = "Done"; })(ExceptionBlockState || (ExceptionBlockState = {})); - // NOTE: changes to this enum should be reflected in the __generator helper. + // NOTE: changes to this enum should be reflected in the __generator helper. id:208 gh:209 var Instruction; (function (Instruction) { Instruction[Instruction["Next"] = 0] = "Next"; @@ -62743,7 +62743,7 @@ var ts; return node; } function transformAndEmitForInStatement(node) { - // TODO(rbuckton): Source map locations + // TODO (rbuckton): Source map locations id:695 gh:696 if (containsYield(node)) { // [source] // for (var p in o) { @@ -69129,7 +69129,7 @@ var ts; } else if (node.kind === 150 /* PropertyDeclaration */ || node.kind === 149 /* PropertySignature */ || (node.kind === 147 /* Parameter */ && ts.hasModifier(node.parent, 8 /* Private */))) { - // TODO(jfreeman): Deal with computed properties in error reporting. + // TODO (jfreeman): Deal with computed properties in error reporting. id:189 gh:190 if (ts.hasModifier(node, 32 /* Static */)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? @@ -70129,7 +70129,7 @@ var ts; comments.reset(); setWriter(/*output*/ undefined); } - // TODO: Should this just be `emit`? + // TODO: Should this just be `emit`? id:191 gh:192 // See https://github.com/Microsoft/TypeScript/pull/18284#discussion_r137611034 function emitIfPresent(node) { if (node) { @@ -74361,7 +74361,7 @@ var ts; // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - // NOTE: body of ambient module is always a module block, if it exists + // NOTE: body of ambient module is always a module block, if it exists id:279 gh:280 var body = node.body; if (body) { for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { @@ -74462,7 +74462,7 @@ var ts; if (filesByName.has(path)) { var file_1 = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path - // NOTE: this only makes sense for case-insensitive file systems + // NOTE: this only makes sense for case-insensitive file systems id:212 gh:213 if (file_1 && options.forceConsistentCasingInFileNames && ts.getNormalizedAbsolutePath(file_1.fileName, currentDirectory) !== ts.getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file_1.fileName, refFile, refPos, refEnd); } @@ -76456,7 +76456,7 @@ var ts; raw_1.compileOnSave = baseRaw_1.compileOnSave; } ownConfig.options = ts.assign({}, extendedConfig.options, ownConfig.options); - // TODO extend type typeAcquisition + // TODO extend type typeAcquisition id:696 gh:697 } } return ownConfig; @@ -76701,7 +76701,7 @@ var ts; * Tests for a path that ends in a recursive directory wildcard. * Matches **, \**, **\, and \**\, but not a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:193 gh:194 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76713,7 +76713,7 @@ var ts; * Tests for a path with multiple recursive directory wildcards. * Matches **\** and **\a\**, but not **\a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:194 gh:195 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76727,7 +76727,7 @@ var ts; * Tests for a path where .. appears after a recursive directory wildcard. * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\* * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:282 gh:283 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -76741,7 +76741,7 @@ var ts; * Tests for a path containing a wildcard character in a directory component of the path. * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:215 gh:216 * * Breakdown: * \/ # matches a directory separator. @@ -76755,7 +76755,7 @@ var ts; * Matches the portion of a wildcard path that does not contain wildcards. * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:697 gh:698 * * Breakdown: * ^ # matches the beginning of the string @@ -77647,7 +77647,7 @@ var ts; function isThis(node) { switch (node.kind) { case 99 /* ThisKeyword */: - // case SyntaxKind.ThisType: TODO: GH#9267 + // case SyntaxKind.ThisType: TODO: GH#9267 id:197 gh:198 return true; case 71 /* Identifier */: // 'this' as a parameter @@ -79248,7 +79248,7 @@ var ts; // specially. var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { - // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` + // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` id:198 gh:199 docCommentAndDiagnostics.jsDoc.parent = token; classifyJSDocComment(docCommentAndDiagnostics.jsDoc); return; @@ -79436,11 +79436,11 @@ var ts; return token.parent.kind === 257 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; } else if (tokenKind === 12 /* RegularExpressionLiteral */) { - // TODO: we should get another classification type for these literals. + // TODO: we should get another classification type for these literals. id:285 gh:286 return 6 /* stringLiteral */; } else if (ts.isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. + // TODO (drosen): we should *also* get another classification type for these literals. id:219 gh:220 return 6 /* stringLiteral */; } else if (tokenKind === 10 /* JsxText */) { @@ -80013,7 +80013,7 @@ var ts; } getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log, allowStringLiteral, recommendedCompletion, symbolToOriginInfoMap); } - // TODO add filter for keyword based on type/value/namespace and also location + // TODO add filter for keyword based on type/value/namespace and also location id:698 gh:699 // Add all keywords if // - this is not a member completion list (all the keywords) // - other filters are enabled in required scenario so add those keywords @@ -80053,7 +80053,7 @@ var ts; if (!displayName) { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // TODO (drosen): Right now we just permit *all* semantic meanings when calling id:202 gh:203 // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report // that a suggestion for a value is an interface. We COULD also just do what @@ -80389,7 +80389,7 @@ var ts; function getCompletionData(typeChecker, log, sourceFile, position, allSourceFiles, options, target) { var request; var start = ts.timestamp(); - var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 + var currentToken = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 id:201 gh:202 // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.) log("getCompletionData: Get current token: " + (ts.timestamp() - start)); start = ts.timestamp(); @@ -80491,7 +80491,7 @@ var ts; var isRightOfDot = false; var isRightOfOpenTag = false; var isStartingCloseTag = false; - var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 + var location = ts.getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 id:288 gh:289 if (contextToken) { // Bail out if this is a known invalid completion location if (isCompletionListBlocker(contextToken)) { @@ -81454,8 +81454,8 @@ var ts; } } else { - // TODO: Account for computed property name - // NOTE: if one only performs this step when m.name is an identifier, + // TODO: Account for computed property name id:221 gh:222 + // NOTE: if one only performs this step when m.name is an identifier, id:699 gh:700 // things like '__proto__' are not filtered out. var name = ts.getNameOfDeclaration(m); existingName = ts.getEscapedTextOfIdentifierOrLiteral(name); @@ -81583,7 +81583,7 @@ var ts; // e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid. // We, thus, need to check if whatever was inside the quotes is actually a valid identifier name. if (performCharacterChecks && !ts.isIdentifierText(name, target)) { - // TODO: GH#18169 + // TODO: GH#18169 id:205 gh:206 return allowStringLiteral ? JSON.stringify(name) : undefined; } return name; @@ -81899,7 +81899,7 @@ var ts; return !statement.label || isLabeledBy(node, statement.label.text); default: // Don't cross function boundaries. - // TODO: GH#20090 + // TODO: GH#20090 id:207 gh:208 return (ts.isFunctionLike(node) && "quit"); } }); @@ -83445,7 +83445,7 @@ var ts; function getPossibleSymbolReferencePositions(sourceFile, symbolName, container) { if (container === void 0) { container = sourceFile; } var positions = []; - /// TODO: Cache symbol existence for files to save text search + /// TODO: Cache symbol existence for files to save text search id:291 gh:292 // Also, need to make this work for unicode escapes. // Be resilient in the face of a symbol with no name or zero length name if (!symbolName || !symbolName.length) { @@ -84963,7 +84963,7 @@ var ts; // * The opening comment line // * the first line (without a param) for the object's untagged info (this is also where the caret ends up) // * the '@param'-tagged lines - // * TODO: other tags. + // * TODO: other tags. id:223 gh:224 // * the closing comment line // * if the caret was directly in front of the object, then we add an extra line and indentation. var preamble = "/**" + newLine + @@ -85269,7 +85269,7 @@ var ts; } // check if name is scope package like: starts with @ and has one '/' in the middle // scoped packages are not currently supported - // TODO: when support will be added we'll need to split and check both scope and package name + // TODO: when support will be added we'll need to split and check both scope and package name id:700 gh:701 if (/^@[^/]+\/[^/]+$/.test(packageName)) { return 1 /* ScopedPackagesNotSupported */; } @@ -85452,7 +85452,7 @@ var ts; return bestMatchKind; } function compareNavigateToItems(i1, i2) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. + // TODO (cyrusn): get the gamut of comparisons that VS already uses here. id:210 gh:211 return ts.compareValues(i1.matchKind, i2.matchKind) || ts.compareStringsCaseSensitiveUI(i1.name, i2.name); } @@ -85468,7 +85468,7 @@ var ts; isCaseSensitive: rawItem.isCaseSensitive, fileName: rawItem.fileName, textSpan: ts.createTextSpanFromNode(declaration), - // TODO(jfreeman): What should be the containerName when the container has a computed name? + // TODO (jfreeman): What should be the containerName when the container has a computed name? id:211 gh:212 containerName: containerName ? containerName.text : "", containerKind: containerName ? ts.getNodeKind(container) : "" /* unknown */ }; @@ -86599,7 +86599,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:295 gh:296 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -86612,7 +86612,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 6 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:225 gh:226 // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -86646,12 +86646,12 @@ var ts; if (ch < 127 /* maxAsciiCharacter */) { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a id:701 gh:702 // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } function isDigit(ch) { - // TODO(cyrusn): Find a way to support this for unicode digits. + // TODO (cyrusn): Find a way to support this for unicode digits. id:237 gh:238 return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; } function isWordChar(ch) { @@ -87552,7 +87552,7 @@ var ts; if (argumentInfo) { return argumentInfo; } - // TODO: Handle generic call with incomplete syntax + // TODO: Handle generic call with incomplete syntax id:214 gh:215 } return undefined; } @@ -87648,7 +87648,7 @@ var ts; (function (ts) { var SymbolDisplay; (function (SymbolDisplay) { - // TODO(drosen): use contextual SemanticMeaning. + // TODO (drosen): use contextual SemanticMeaning. id:297 gh:298 function getSymbolKind(typeChecker, symbol, location) { var flags = ts.getCombinedLocalAndExportSymbolFlags(symbol); if (flags & 32 /* Class */) { @@ -87751,7 +87751,7 @@ var ts; : "" /* none */; } SymbolDisplay.getSymbolModifiers = getSymbolModifiers; - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location + // TODO (drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location id:228 gh:229 function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { if (semanticMeaning === void 0) { semanticMeaning = ts.getMeaningFromLocation(location); } var displayParts = []; @@ -89117,7 +89117,7 @@ var ts; case 225 /* TryStatement */: case 213 /* DoStatement */: case 221 /* WithStatement */: - // TODO + // TODO id:702 gh:703 // case SyntaxKind.ElseClause: case 264 /* CatchClause */: return true; @@ -91896,7 +91896,7 @@ var ts; // This is the identifier of the misspelled word. eg: // this.speling = 1; // ^^^^^^^ - var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 + var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 id:240 gh:241 var checker = context.program.getTypeChecker(); var suggestion; if (ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) { @@ -92353,7 +92353,7 @@ var ts; function getActionsForJSDocTypes(context) { var sourceFile = context.sourceFile; var node = ts.getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); - // NOTE: Some locations are not handled yet: + // NOTE: Some locations are not handled yet: id:217 gh:218 // MappedTypeNode.typeParameters and SignatureDeclaration.typeParameters, as well as CallExpression.typeArguments var decl = ts.findAncestor(node, function (n) { return n.kind === 203 /* AsExpression */ || @@ -92584,7 +92584,7 @@ var ts; return declaration.name; } } - // TODO(anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? + // TODO (anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? id:300 gh:301 function getImportDeclarations(moduleSymbol, checker, _a, cachedImportDeclarations) { var imports = _a.imports; if (cachedImportDeclarations === void 0) { cachedImportDeclarations = []; } @@ -93803,7 +93803,7 @@ var ts; if (node === parent.left && (node.parent.parent.kind === 227 /* VariableDeclaration */ || ts.isAssignmentExpression(node.parent.parent, /*excludeCompoundAssignment*/ true))) { // var x = x || {}; - // TODO: use getFalsyflagsOfType + // TODO: use getFalsyflagsOfType id:231 gh:232 addCandidateType(usageContext, checker.getTypeAtLocation(parent.right)); } break; @@ -95160,7 +95160,7 @@ var ts; // Declaring exactly one variable: let x = newFunction(); var variableDeclaration = exposedVariableDeclarations[0]; newNodes.push(ts.createVariableStatement( - /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns + /*modifiers*/ undefined, ts.createVariableDeclarationList([ts.createVariableDeclaration(ts.getSynthesizedDeepClone(variableDeclaration.name), /*type*/ ts.getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns id:703 gh:704 variableDeclaration.parent.flags))); } else { @@ -95655,7 +95655,7 @@ var ts; constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); } if (ts.isArrowFunction(scope) && !ts.isBlock(scope.body)) { - // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this + // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this id:243 gh:244 constantErrors.push(ts.createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); } constantErrorsPerScope.push(constantErrors); @@ -97783,8 +97783,8 @@ var ts; // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. + // i.e. 'undefined' in position 3 above means TODO (jason) didn't match. id:218 gh:219 + // "hack" in position 4 means HACK did match. id:302 gh:303 var firstDescriptorCaptureIndex = 3; ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); var preamble = matchArray[1]; @@ -97815,26 +97815,26 @@ var ts; return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } function getTodoCommentsRegExp() { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to + // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to id:235 gh:236 // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: + // TODO comments can appear in one of the following forms: id:704 gh:705 // - // 1) // TODO or /////////// TODO + // 1) // TODO or /////////// TODO id:246 gh:247 // - // 2) /* TODO or /********** TODO + // 2) /* TODO or /********** TODO id:222 gh:223 // // 3) /* - // * TODO + // * TODO id:305 gh:306 // */ // - // The following three regexps are used to match the start of the text up to the TODO + // The following three regexps are used to match the start of the text up to the TODO id:241 gh:242 // comment portion. var singleLineCommentStart = /(?:\/\/+\s*)/.source; var multiLineCommentStart = /(?:\/\*+\s*)/.source; var anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. + // Match any of the above three TODO comment start regexps. id:705 gh:706 // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. + // so that we can determine the starting position of the TODO comment match. id:250 gh:251 var preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: @@ -97849,7 +97849,7 @@ var ts; // text up to the end of the line (or */). var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We + // This is the portion of the match we'll return as part of the TODO comment result. We id:224 gh:225 // match the literal portion up to the end of the line or end of comment. var messagePortion = "(" + literals + messageRemainder + ")"; var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; @@ -97859,7 +97859,7 @@ var ts; // 'g' is so that we are doing a global search and can find matches several times // in the input. // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). + // 'i' is for case insensitivity (We do this to match C# TODO comment code). id:309 gh:310 // // 'm' is so we can find matches in a multi-line input. return new RegExp(regExpString, "gim"); @@ -98961,7 +98961,7 @@ var ts; message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine), start: diagnostic.start, length: diagnostic.length, - /// TODO: no need for the tolowerCase call + /// TODO: no need for the tolowerCase call id:247 gh:248 category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(), code: diagnostic.code }; @@ -99457,7 +99457,7 @@ var ts; })(ts || (ts = {})); /* tslint:enable:no-in-operator */ /* tslint:enable:no-null */ -/// TODO: this is used by VS, clean this up on both sides of the interface +/// TODO: this is used by VS, clean this up on both sides of the interface id:706 gh:707 /* @internal */ var TypeScript; (function (TypeScript) { @@ -99467,6 +99467,6 @@ var TypeScript; })(Services = TypeScript.Services || (TypeScript.Services = {})); })(TypeScript || (TypeScript = {})); // 'toolsVersion' gets consumed by the managed side, so it's not unused. -// TODO: it should be moved into a namespace though. +// TODO: it should be moved into a namespace though. id:253 gh:254 /* @internal */ var toolsVersion = ts.versionMajorMinor; diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 4eab97f28bb27..54c99ca336ba5 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -442,12 +442,12 @@ namespace ts { // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. + // TODO: Make this a more specific error and decouple it from the exclusion logic. id:227 gh:228 // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge + // NOTE: Nested ambient modules always should go to to 'locals' table to prevent their automatic merge id:312 gh:313 // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. @@ -1051,7 +1051,7 @@ namespace ts { function bindTryStatement(node: TryStatement): void { const preFinallyLabel = createBranchLabel(); const preTryFlow = currentFlow; - // TODO: Every statement in try block is potentially an exit point! + // TODO: Every statement in try block is potentially an exit point! id:251 gh:252 bind(node.tryBlock); addAntecedent(preFinallyLabel, currentFlow); @@ -3562,7 +3562,7 @@ namespace ts { /** * Gets the transform flags to exclude when unioning the transform flags of a subtree. * - * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. + * NOTE: This needs to be kept up-to-date with the exclusions used in `computeTransformFlagsForNode`. id:707 gh:708 * For performance reasons, `computeTransformFlagsForNode` uses local constant values rather * than calling this function. */ diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 53ad6511820d2..43cd4112f4389 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3286,7 +3286,7 @@ namespace ts { // this to determine if an import it has previously seen (and not written out) needs // to be written to the file once the walk of the tree is complete. // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree + // NOTE (cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree id:255 gh:256 // up front (for example, during checking) could determine if we need to emit the imports // and we could then access that data during declaration emit. writer.trackSymbol(symbol, enclosingDeclaration, meaning); @@ -6777,7 +6777,7 @@ namespace ts { const type = getTypeFromTypeNode(node.type); if (parameterName.kind === SyntaxKind.Identifier) { return createIdentifierTypePredicate( - parameterName && parameterName.escapedText as string, // TODO: GH#18217 + parameterName && parameterName.escapedText as string, // TODO: GH#18217 id:230 gh:231 parameterName && getTypePredicateParameterIndex((node.parent as SignatureDeclaration).parameters, parameterName), type); } @@ -7335,7 +7335,7 @@ namespace ts { const typeStr = typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrayAsGenericType); error(node, diag, typeStr, minTypeArgumentCount, typeParameters.length); if (!isJs) { - // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) + // TODO: Adopt same permissive behavior in TS as in JS to reduce follow-on editing experience failures (requires editing fillMissingTypeArguments) id:315 gh:316 return unknownType; } } @@ -9002,7 +9002,7 @@ namespace ts { } } - // TODO(anhans): A block should be context-sensitive if it has a context-sensitive return value. + // TODO (anhans): A block should be context-sensitive if it has a context-sensitive return value. id:254 gh:255 return node.body.kind === SyntaxKind.Block ? false : isContextSensitive(node.body); } @@ -9115,7 +9115,7 @@ namespace ts { reportErrors: boolean, errorReporter: ErrorReporter, compareTypes: TypeComparer): Ternary { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:708 gh:709 if (source === target) { return Ternary.True; } @@ -10707,7 +10707,7 @@ namespace ts { * See signatureRelatedTo, compareSignaturesIdentical */ function compareSignaturesIdentical(source: Signature, target: Signature, partialMatch: boolean, ignoreThisTypes: boolean, ignoreReturnTypes: boolean, compareTypes: (s: Type, t: Type) => Ternary): Ternary { - // TODO (drosen): De-duplicate code between related functions. + // TODO (drosen): De-duplicate code between related functions. id:258 gh:259 if (source === target) { return Ternary.True; } @@ -12067,7 +12067,7 @@ namespace ts { function getTypeWithFacts(type: Type, include: TypeFacts) { if (type.flags & TypeFlags.IndexedAccess) { - // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to + // TODO (weswig): This is a substitute for a lazy negated type to remove the types indicated by the TypeFacts from the (potential) union the IndexedAccess refers to id:233 gh:234 // - See discussion in https://github.com/Microsoft/TypeScript/pull/19275 for details, and test `strictNullNotNullIndexTypeShouldWork` for current behavior const baseConstraint = getBaseConstraintOfType(type) || emptyObjectType; const result = filterType(baseConstraint, t => (getTypeFacts(t) & include) !== 0); @@ -14852,7 +14852,7 @@ namespace ts { * Returns true iff React would emit this tag name as a string rather than an identifier or qualified name */ function isJsxIntrinsicIdentifier(tagName: JsxTagNameExpression) { - // TODO (yuisu): comment + // TODO (yuisu): comment id:317 gh:318 switch (tagName.kind) { case SyntaxKind.PropertyAccessExpression: case SyntaxKind.ThisKeyword: @@ -16255,7 +16255,7 @@ namespace ts { } function callLikeExpressionMayHaveTypeArguments(node: CallLikeExpression): node is CallExpression | NewExpression { - // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) + // TODO: Also include tagged templates (https://github.com/Microsoft/TypeScript/issues/11947) id:299 gh:300 return isCallOrNewExpression(node); } @@ -18152,7 +18152,7 @@ namespace ts { return true; } - /** NOTE: Return value of `[]` means a different thing than `undefined`. `[]` means return `void`, `undefined` means return `never`. */ + /** NOTE: Return value of `[]` means a different thing than `undefined`. `[]` means return `void`, `undefined` means return `never`. id:709 gh:710*/ function checkAndAggregateReturnExpressionTypes(func: FunctionLikeDeclaration, checkMode: CheckMode): Type[] | undefined { const functionFlags = getFunctionFlags(func); const aggregatedTypes: Type[] = []; @@ -18231,7 +18231,7 @@ namespace ts { else if (returnType && !hasExplicitReturn) { // minimal check: function has syntactic return type annotation and no explicit return statements in the body // this function does not conform to the specification. - // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present + // NOTE: having returnType !== undefined is a precondition for entering this branch so func.type will always be present id:260 gh:261 error(getEffectiveReturnTypeNode(func), Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value); } else if (returnType && strictNullChecks && !isTypeAssignableTo(undefinedType, returnType)) { @@ -18582,12 +18582,12 @@ namespace ts { // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, // and the right operand to be of type Any, a subtype of the 'Function' interface type, or have a call or construct signature. // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported + // NOTE: do not raise error if leftType is unknown as related error was already reported id:236 gh:237 if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, TypeFlags.Primitive)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - // NOTE: do not raise error if right is unknown as related error was already reported + // NOTE: do not raise error if right is unknown as related error was already reported id:319 gh:320 if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } @@ -18925,7 +18925,7 @@ namespace ts { } else if (isTypeAny(leftType) || isTypeAny(rightType)) { // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. + // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. id:303 gh:304 resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; } @@ -19622,7 +19622,7 @@ namespace ts { if (node.kind === SyntaxKind.IndexSignature) { checkGrammarIndexSignature(node); } - // TODO (yuisu): Remove this check in else-if when SyntaxKind.Construct is moved and ambient context is handled + // TODO (yuisu): Remove this check in else-if when SyntaxKind.Construct is moved and ambient context is handled id:710 gh:711 else if (node.kind === SyntaxKind.FunctionType || node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.ConstructorType || node.kind === SyntaxKind.CallSignature || node.kind === SyntaxKind.Constructor || node.kind === SyntaxKind.ConstructSignature) { @@ -19652,7 +19652,7 @@ namespace ts { forEach(node.parameters, checkParameter); - // TODO(rbuckton): Should we start checking JSDoc types? + // TODO (rbuckton): Should we start checking JSDoc types? id:262 gh:263 if (node.type) { checkSourceElement(node.type); } @@ -20292,7 +20292,7 @@ namespace ts { if (subsequentNode && subsequentNode.pos === node.end) { if (subsequentNode.kind === node.kind) { const errorNode: Node = (subsequentNode).name || subsequentNode; - // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) + // TODO: GH#17345: These are methods, so handle computed name case. (`Always allowing computed property names is *not* the correct behavior!) id:238 gh:239 const subsequentName = (subsequentNode).name; if (node.name && subsequentName && (isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) || @@ -21524,7 +21524,7 @@ namespace ts { } // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern + // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern id:321 gh:322 // so we'll always treat binding elements as initialized if (node.kind === SyntaxKind.VariableDeclaration && !node.initializer) { return; @@ -22300,7 +22300,7 @@ namespace ts { // Grammar checking if (!checkGrammarStatementInAmbientContext(node)) checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid + // TODO: Check that target label is valid id:306 gh:307 } function isGetAccessorWithAnnotatedSetAccessor(node: FunctionLike) { @@ -22336,7 +22336,7 @@ namespace ts { if (isGenerator) { // AsyncGenerator function or Generator function // A generator does not need its return expressions checked against its return type. // Instead, the yield expressions are checked against the element type. - // TODO: Check return types of generators when return type tracking is added + // TODO: Check return types of generators when return type tracking is added id:711 gh:712 // for generators. return; } @@ -22873,7 +22873,7 @@ namespace ts { // Base class instance member variables and accessors can be overridden by // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration + // NOTE: assignability is checked in checkClassDeclaration id:264 gh:265 const baseProperties = getPropertiesOfType(baseType); for (const baseProperty of baseProperties) { const base = getTargetSymbol(baseProperty); @@ -26638,7 +26638,7 @@ namespace ts { // export_opt ExternalImportDeclaration // export_opt AmbientDeclaration // - // TODO: The spec needs to be amended to reflect this grammar. + // TODO: The spec needs to be amended to reflect this grammar. id:242 gh:243 if (node.kind === SyntaxKind.InterfaceDeclaration || node.kind === SyntaxKind.TypeAliasDeclaration || node.kind === SyntaxKind.ImportDeclaration || diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 19d4dbbd003a6..4fd823a284c05 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1586,7 +1586,7 @@ namespace ts { raw.compileOnSave = baseRaw.compileOnSave; } ownConfig.options = assign({}, extendedConfig.options, ownConfig.options); - // TODO extend type typeAcquisition + // TODO extend type typeAcquisition id:323 gh:324 } } @@ -1898,7 +1898,7 @@ namespace ts { * Tests for a path that ends in a recursive directory wildcard. * Matches **, \**, **\, and \**\, but not a**b. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:308 gh:309 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -1911,7 +1911,7 @@ namespace ts { * Tests for a path where .. appears after a recursive directory wildcard. * Matches **\..\*, **\a\..\*, and **\.., but not ..\**\* * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:712 gh:713 * * Breakdown: * (^|\/) # matches either the beginning of the string or a directory separator. @@ -1926,7 +1926,7 @@ namespace ts { * Tests for a path containing a wildcard character in a directory component of the path. * Matches \*\, \?\, and \a*b\, but not \a\ or \a\*. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:269 gh:270 * * Breakdown: * \/ # matches a directory separator. @@ -1941,7 +1941,7 @@ namespace ts { * Matches the portion of a wildcard path that does not contain wildcards. * Matches \a of \a\*, or \a\b\c of \a\b\c\?\d. * - * NOTE: used \ in place of / above to avoid issues with multiline comments. + * NOTE: used \ in place of / above to avoid issues with multiline comments. id:244 gh:245 * * Breakdown: * ^ # matches the beginning of the string diff --git a/src/compiler/core.ts b/src/compiler/core.ts index eb0696a1869e1..efa2807d29ad3 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1744,7 +1744,7 @@ namespace ts { } function createIntlCollatorStringComparer(locale: string | undefined): Comparer { - // Intl.Collator.prototype.compare is bound to the collator. See NOTE in + // Intl.Collator.prototype.compare is bound to the collator. See NOTE in id:325 gh:326 // http://www.ecma-international.org/ecma-402/2.0/#sec-Intl.Collator.prototype.compare const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return (a, b) => compareWithCallback(a, b, comparer); diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index b4ff7c7f641eb..c06685e7e8f10 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1298,7 +1298,7 @@ namespace ts { // The only exception here is if the constructor was marked as private. we are not emitting the constructor parameters at all. else if (node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature || (node.kind === SyntaxKind.Parameter && hasModifier(node.parent, ModifierFlags.Private))) { - // TODO(jfreeman): Deal with computed properties in error reporting. + // TODO (jfreeman): Deal with computed properties in error reporting. id:310 gh:311 if (hasModifier(node, ModifierFlags.Static)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 7a1d88d3bfd71..c5d8b03395acd 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -406,7 +406,7 @@ namespace ts { setWriter(/*output*/ undefined); } - // TODO: Should this just be `emit`? + // TODO: Should this just be `emit`? id:713 gh:714 // See https://github.com/Microsoft/TypeScript/pull/18284#discussion_r137611034 function emitIfPresent(node: Node | undefined) { if (node) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ce4115b08d439..58e1dec085fd5 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4523,7 +4523,7 @@ namespace ts { } // check if it is short-hand property assignment or normal property assignment - // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production id:273 gh:274 // CoverInitializedName[Yield] : // IdentifierReference[?Yield] Initializer[In, ?Yield] // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern @@ -4837,7 +4837,7 @@ namespace ts { return finishNode(node); } - // TODO: Review for error recovery + // TODO: Review for error recovery id:249 gh:250 function parseTryStatement(): TryStatement { const node = createNode(SyntaxKind.TryStatement); @@ -6284,7 +6284,7 @@ namespace ts { if (state === JSDocState.BeginningOfLine || state === JSDocState.SawAsterisk) { removeTrailingNewlines(comments); parseTag(indent); - // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. + // NOTE: According to usejsdoc.org, a tag goes to end of line, except the last tag. id:327 gh:328 // Real-world comments may break this rule, so "BeginningOfLine" will not be a real line beginning // for malformed examples like `/** @param {string} x @returns {number} the length */` state = JSDocState.BeginningOfLine; diff --git a/src/compiler/performance.ts b/src/compiler/performance.ts index 104148ed4abeb..c1c8843b53f69 100644 --- a/src/compiler/performance.ts +++ b/src/compiler/performance.ts @@ -10,7 +10,7 @@ namespace ts { namespace ts.performance { declare const onProfilerEvent: { (markName: string): void; profiler: boolean; }; - // NOTE: cannot use ts.noop as core.ts loads after this + // NOTE: cannot use ts.noop as core.ts loads after this id:311 gh:312 const profilerEvent: (markName: string) => void = typeof onProfilerEvent === "function" && onProfilerEvent.profiler === true ? onProfilerEvent : () => { /*empty*/ }; let enabled = false; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 959dee19e03de..28fa8cf40b478 100755 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1661,7 +1661,7 @@ namespace ts { // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted - // NOTE: body of ambient module is always a module block, if it exists + // NOTE: body of ambient module is always a module block, if it exists id:714 gh:715 const body = (node).body; if (body) { for (const statement of body.statements) { @@ -1775,7 +1775,7 @@ namespace ts { if (filesByName.has(path)) { const file = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path - // NOTE: this only makes sense for case-insensitive file systems + // NOTE: this only makes sense for case-insensitive file systems id:277 gh:278 if (file && options.forceConsistentCasingInFileNames && getNormalizedAbsolutePath(file.fileName, currentDirectory) !== getNormalizedAbsolutePath(fileName, currentDirectory)) { reportFileNamesDifferOnlyInCasingError(fileName, file.fileName, refFile, refPos, refEnd); } diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index a283275d066dc..f2e75eba30a2d 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -103,7 +103,7 @@ namespace ts { return aggregateTransformFlags(inlineExpressions(expressions)) || createOmittedExpression(); function emitExpression(expression: Expression) { - // NOTE: this completely disables source maps, but aligns with the behavior of + // NOTE: this completely disables source maps, but aligns with the behavior of id:252 gh:253 // `emitAssignment` in the old emitter. setEmitFlags(expression, EmitFlags.NoNestedSourceMaps); aggregateTransformFlags(expression); diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 65771410ea253..4d789bd83f1fa 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -46,7 +46,7 @@ namespace ts { * if (state === "break") break; * } * - * NOTE: values to out parameters are not copies if loop is abrupted with 'return' - in this case this will end the entire enclosing function + * NOTE: values to out parameters are not copies if loop is abrupted with 'return' - in this case this will end the entire enclosing function id:329 gh:330 * so nobody can observe this new value. */ interface LoopOutParameter { @@ -187,7 +187,7 @@ namespace ts { ForInOrForOfStatement = 1 << 11, // Enclosing block-scoped container is a ForInStatement or ForOfStatement ConstructorWithCapturedSuper = 1 << 12, // Enclosed in a constructor that captures 'this' for use with 'super' ComputedPropertyName = 1 << 13, // Enclosed in a computed property name - // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. + // NOTE: do not add more ancestor flags without also updating AncestorFactsMask below. id:313 gh:314 // // Ancestor masks @@ -2801,7 +2801,7 @@ namespace ts { } else { // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: + // NOTE: id:715 gh:716 // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. (extraVariableDeclarations || (extraVariableDeclarations = [])).push( @@ -2891,7 +2891,7 @@ namespace ts { const statements: Statement[] = []; // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop // simple loops are emitted as just 'loop()'; - // NOTE: if loop uses only 'continue' it still will be emitted as simple loop + // NOTE: if loop uses only 'continue' it still will be emitted as simple loop id:280 gh:281 const isSimpleLoop = !(state.nonLocalJumps & ~Jump.Continue) && !state.labeledNonLocalBreaks && @@ -3917,7 +3917,7 @@ namespace ts { /** * Determines whether a name is the name of a declaration with a colliding name. - * NOTE: This function expects to be called with an original source tree node. + * NOTE: This function expects to be called with an original source tree node. id:256 gh:257 * * @param node An original source tree node. */ diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index bd2a4ef554d34..bf97ba4701869 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -25,7 +25,7 @@ // Resume at the next label. // .yieldstar (x) - Delegate yield to the value of the optional // expression `x`. Resume at the next label. -// NOTE: `x` must be an Iterator, not an Iterable. +// NOTE: `x` must be an Iterator, not an Iterable. id:331 gh:332 // .loop CONTINUE, BREAK - Marks the beginning of a loop. Any "continue" or // "break" abrupt completions jump to the CONTINUE or // BREAK labels, respectively. @@ -208,7 +208,7 @@ namespace ts { endLabel: Label; } - // NOTE: changes to this enum should be reflected in the __generator helper. + // NOTE: changes to this enum should be reflected in the __generator helper. id:314 gh:315 const enum Instruction { Next = 0, Throw = 1, @@ -1511,7 +1511,7 @@ namespace ts { } function transformAndEmitForInStatement(node: ForInStatement) { - // TODO(rbuckton): Source map locations + // TODO (rbuckton): Source map locations id:716 gh:717 if (containsYield(node)) { // [source] // for (var p in o) { diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 3c1bba280f0f9..218a3131fc8ca 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2992,7 +2992,7 @@ namespace ts { // namespace hello.hi.world { // function foo() {} // - // // TODO, blah + // // TODO , blah id:283 gh:284 // } // // should be emitted as @@ -3004,7 +3004,7 @@ namespace ts { // var world; // (function (world) { // function foo() { } - // // TODO, blah + // // TODO , blah id:257 gh:258 // })(world = hi.world || (hi.world = {})); // })(hi = hello.hi || (hello.hi = {})); // })(hello || (hello = {})); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4f5ef1900f52e..f7de3263d3733 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1687,7 +1687,7 @@ namespace ts { expression: Expression; } - // NOTE: MetaProperty is really a MemberExpression, but we consider it a PrimaryExpression + // NOTE: MetaProperty is really a MemberExpression, but we consider it a PrimaryExpression id:334 gh:335 // for the same reasons we treat NewExpression as a PrimaryExpression. export interface MetaProperty extends PrimaryExpression { kind: SyntaxKind.MetaProperty; @@ -4643,7 +4643,7 @@ namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:316 gh:317 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -4664,7 +4664,7 @@ namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:717 gh:718 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 8a3e31323154a..443a672fd08c7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -805,7 +805,7 @@ namespace ts { case SyntaxKind.NewExpression: return (parent).typeArguments && indexOf((parent).typeArguments, node) >= 0; case SyntaxKind.TaggedTemplateExpression: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. + // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. id:286 gh:287 return false; } } @@ -4064,7 +4064,7 @@ namespace ts { return false; } - // TODO: Add codePage support for readFile? + // TODO: Add codePage support for readFile? id:259 gh:260 let fileContents = ""; try { fileContents = sys.readFile(filePath); @@ -5806,7 +5806,7 @@ namespace ts { return node.kind === SyntaxKind.JSDocComment || isJSDocTag(node); } - // TODO: determine what this does before making it public. + // TODO: determine what this does before making it public. id:337 gh:338 /* @internal */ export function isJSDocTag(node: Node): boolean { return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode; diff --git a/src/compiler/visitor.ts b/src/compiler/visitor.ts index 0b40e20a7b7c1..8ee058877e311 100644 --- a/src/compiler/visitor.ts +++ b/src/compiler/visitor.ts @@ -928,7 +928,7 @@ namespace ts { /** * Similar to `reduceLeft`, performs a reduction against each child of a node. - * NOTE: Unlike `forEachChild`, this does *not* visit every node. + * NOTE: Unlike `forEachChild`, this does *not* visit every node. id:318 gh:319 * * @param node The node containing the children to reduce. * @param initial The initial value to supply to the reduction. diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 9ab7dd31ffdca..a4cd6b4f06078 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2560,7 +2560,7 @@ Actual: ${stringify(fullActual)}`); for (const codeFix of codeFixes) { this.applyEdits(codeFix.changes[0].fileName, codeFix.changes[0].textChanges, /*isFormattingEdit*/ false); let text = this.rangeText(ranges[0]); - // TODO:GH#18445 (remove this line to see errors in many `importNameCodeFix` tests) + // TODO: GH#18445 (remove this line to see errors in many `importNameCodeFix` tests) id:718 gh:719 text = text.replace(/\r\n/g, "\n"); actualTextArray.push(text); scriptInfo.updateContent(originalContent); @@ -3001,7 +3001,7 @@ Actual: ${stringify(fullActual)}`); } } else { - // TODO: test editInfo.renameFilename value + // TODO: test editInfo.renameFilename value id:289 gh:290 assert.isDefined(editInfo.renameFilename); if (renamePosition !== editInfo.renameLocation) { this.raiseError(`Expected rename position of ${renamePosition}, but got ${editInfo.renameLocation}`); diff --git a/src/harness/harness.ts b/src/harness/harness.ts index b38bd523fae14..f82c9e3f7fc97 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1441,7 +1441,7 @@ namespace Harness { const length = (end - err.start) - Math.max(0, thisLineStart - err.start); // Calculate the start of the squiggle const squiggleStart = Math.max(0, relativeOffset); - // TODO/REVIEW: this doesn't work quite right in the browser if a multi file test has files whose names are just the right length relative to one another + // TODO /REVIEW: this doesn't work quite right in the browser if a multi file test has files whose names are just the right length relative to one another id:261 gh:262 outputLines += (newLine() + " " + line.substr(0, squiggleStart).replace(/[^\s]/g, " ") + new Array(Math.min(length, line.length - squiggleStart) + 1).join("~")); // If the error ended here, or we're at the end of the file, emit its message diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index 949c6e5d947c7..636f8798051d2 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -336,7 +336,7 @@ namespace Playback { // Because extensions is an array of all allowed extension, we will want to merge each of the replayLog.directoriesRead into one // if each of the directoriesRead has matched path with the given path (directory with same path but different extension will considered // different entry). - // TODO (yuisu): We can certainly remove these once we recapture the RWC using new API + // TODO (yuisu): We can certainly remove these once we recapture the RWC using new API id:340 gh:341 const normalizedPath = ts.normalizePath(path).toLowerCase(); return ts.flatMap(replayLog.directoriesRead, directory => { if (ts.normalizeSlashes(directory.path).toLowerCase() === normalizedPath) { diff --git a/src/harness/parallel/host.ts b/src/harness/parallel/host.ts index eca719628c795..f09ec013f18c2 100644 --- a/src/harness/parallel/host.ts +++ b/src/harness/parallel/host.ts @@ -136,7 +136,7 @@ namespace Harness.Parallel.Host { const workers: ChildProcessPartial[] = []; let closedWorkers = 0; for (let i = 0; i < workerCount; i++) { - // TODO: Just send the config over the IPC channel or in the command line arguments + // TODO: Just send the config over the IPC channel or in the command line arguments id:320 gh:321 const config: TestConfig = { light: Harness.lightMode, listenForWork: true, runUnitTests }; const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`); Harness.IO.writeFile(configPath, JSON.stringify(config)); diff --git a/src/harness/parallel/worker.ts b/src/harness/parallel/worker.ts index 013992a8e350c..48dfbae25a673 100644 --- a/src/harness/parallel/worker.ts +++ b/src/harness/parallel/worker.ts @@ -122,7 +122,7 @@ namespace Harness.Parallel.Worker { } if (callback.length === 0) { try { - // TODO: If we ever start using async test completions, polyfill promise return handling + // TODO: If we ever start using async test completions, polyfill promise return handling id:719 gh:720 callback.call(fakeContext); } catch (error) { diff --git a/src/harness/runner.ts b/src/harness/runner.ts index 2bd098b742db1..26dec4d2c37f3 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -198,7 +198,7 @@ function handleTestConfig() { runners.push(new CompilerBaselineRunner(CompilerTestType.Conformance)); runners.push(new CompilerBaselineRunner(CompilerTestType.Regressions)); - // TODO: project tests don"t work in the browser yet + // TODO: project tests don"t work in the browser yet id:292 gh:293 if (Utils.getExecutionEnvironment() !== Utils.ExecutionEnvironment.Browser) { runners.push(new ProjectRunner()); } diff --git a/src/harness/unittests/extractConstants.ts b/src/harness/unittests/extractConstants.ts index 71b550cba8fa0..901806da137ad 100644 --- a/src/harness/unittests/extractConstants.ts +++ b/src/harness/unittests/extractConstants.ts @@ -107,11 +107,11 @@ function F() { testExtractConstant("extractConstant_VariableList_const", `const a = 1, b = [#|a + 1|];`); - // NOTE: this test isn't normative - it just documents our sub-optimal behavior. + // NOTE: this test isn't normative - it just documents our sub-optimal behavior. id:263 gh:264 testExtractConstant("extractConstant_VariableList_let", `let a = 1, b = [#|a + 1|];`); - // NOTE: this test isn't normative - it just documents our sub-optimal behavior. + // NOTE: this test isn't normative - it just documents our sub-optimal behavior. id:342 gh:343 testExtractConstant("extractConstant_VariableList_MultipleLines", `const /*About A*/a = 1, /*About B*/b = [#|a + 1|];`); @@ -263,7 +263,7 @@ namespace N { // Force this test to be TS-only } }`); - // TODO (https://github.com/Microsoft/TypeScript/issues/20727): the extracted constant should have a type annotation. + // TODO (https://github.com/Microsoft/TypeScript/issues/20727): the extracted constant should have a type annotation. id:322 gh:323 testExtractConstant("extractConstant_ContextualType", ` interface I { a: 1 | 2 | 3 } let i: I = [#|{ a: 1 }|]; diff --git a/src/harness/unittests/incrementalParser.ts b/src/harness/unittests/incrementalParser.ts index c71b89d3da68d..40e25f850363f 100644 --- a/src/harness/unittests/incrementalParser.ts +++ b/src/harness/unittests/incrementalParser.ts @@ -42,7 +42,7 @@ namespace ts { } } - // NOTE: 'reusedElements' is the expected count of elements reused from the old tree to the new + // NOTE: 'reusedElements' is the expected count of elements reused from the old tree to the new id:720 gh:721 // tree. It may change as we tweak the parser. If the count increases then that should always // be a good thing. If it decreases, that's not great (less reusability), but that may be // unavoidable. If it does decrease an investigation should be done to make sure that things diff --git a/src/harness/unittests/telemetry.ts b/src/harness/unittests/telemetry.ts index 9bb2db738013d..8387f31c1c323 100644 --- a/src/harness/unittests/telemetry.ts +++ b/src/harness/unittests/telemetry.ts @@ -57,7 +57,7 @@ namespace ts.projectSystem { open(); - // TODO: Apparently compilerOptions is mutated, so have to repeat it here! + // TODO: Apparently compilerOptions is mutated, so have to repeat it here! id:294 gh:295 et.assertProjectInfoTelemetryEvent({ projectId: Harness.mockHash("/hunter2/foo.csproj"), compilerOptions: { strict: true }, diff --git a/src/harness/unittests/tscWatchMode.ts b/src/harness/unittests/tscWatchMode.ts index 758a55b8f9518..281d997d8968f 100644 --- a/src/harness/unittests/tscWatchMode.ts +++ b/src/harness/unittests/tscWatchMode.ts @@ -221,7 +221,7 @@ namespace ts.tscWatch { checkProgramActualFiles(watch(), [appFile.path, libFile.path, moduleFile.path]); - // TODO: Should we watch creation of config files in the root file's file hierarchy? + // TODO: Should we watch creation of config files in the root file's file hierarchy? id:265 gh:266 // const configFileLocations = ["/a/b/c/", "/a/b/", "/a/", "/"]; // const configFiles = flatMap(configFileLocations, location => [location + "tsconfig.json", location + "jsconfig.json"]); @@ -284,7 +284,7 @@ namespace ts.tscWatch { checkWatchedDirectories(host, [configDir, combinePaths(configDir, projectSystem.nodeModulesAtTypes)], /*recursive*/ true); }); - // TODO: if watching for config file creation + // TODO: if watching for config file creation id:344 gh:345 // it("add and then remove a config file in a folder with loose files", () => { // }); @@ -1448,7 +1448,7 @@ namespace ts.tscWatch { }); it("should work fine for files with circular references", () => { - // TODO: do not exit on such errors? Just continue to watch the files for update in watch mode + // TODO: do not exit on such errors? Just continue to watch the files for update in watch mode id:324 gh:325 const file1: FileOrFolder = { path: "/a/b/file1.ts", diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index a6fe27ca9c698..964e3e4ea8c71 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -316,13 +316,13 @@ interface Array {}` } } else { - // TODO: Changing from file => folder + // TODO: Changing from file => folder id:721 gh:722 } } else { // Folder if (isString(fileOrDirectory.content)) { - // TODO: Changing from folder => file + // TODO: Changing from folder => file id:296 gh:297 } else { // Folder update: Nothing to do. diff --git a/src/server/client.ts b/src/server/client.ts index f34516ac4fd92..8407f25dcf390 100644 --- a/src/server/client.ts +++ b/src/server/client.ts @@ -183,12 +183,12 @@ namespace ts.server { entries: response.body.map(entry => { if (entry.replacementSpan !== undefined) { const { name, kind, kindModifiers, sortText, replacementSpan, hasAction, source, isRecommended } = entry; - // TODO: GH#241 + // TODO: GH#241 id:266 gh:267 const res: CompletionEntry = { name, kind, kindModifiers, sortText, replacementSpan: this.decodeSpan(replacementSpan, fileName), hasAction, source, isRecommended }; return res; } - return entry as { name: string, kind: ScriptElementKind, kindModifiers: string, sortText: string }; // TODO: GH#18217 + return entry as { name: string, kind: ScriptElementKind, kindModifiers: string, sortText: string }; // TODO: GH#18217 id:345 gh:346 }) }; } @@ -234,7 +234,7 @@ namespace ts.server { const args: protocol.FormatRequestArgs = this.createFileLocationRequestArgsWithEndLineAndOffset(file, start, end); - // TODO: handle FormatCodeOptions + // TODO: handle FormatCodeOptions id:326 gh:327 const request = this.processRequest(CommandNames.Format, args); const response = this.processResponse(request); @@ -248,7 +248,7 @@ namespace ts.server { getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, _options: FormatCodeOptions): ts.TextChange[] { const args: protocol.FormatOnKeyRequestArgs = { ...this.createFileLocationRequestArgs(fileName, position), key }; - // TODO: handle FormatCodeOptions + // TODO: handle FormatCodeOptions id:722 gh:723 const request = this.processRequest(CommandNames.Formatonkey, args); const response = this.processResponse(request); @@ -559,7 +559,7 @@ namespace ts.server { const request = this.processRequest(CommandNames.GetCodeFixes, args); const response = this.processResponse(request); - // TODO: GH#20538 shouldn't need cast + // TODO: GH#20538 shouldn't need cast id:298 gh:299 return (response.body as ReadonlyArray).map(({ description, changes, fixId }) => ({ description, changes: this.convertChanges(changes, file), fixId })); } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 664938a4cdc21..d713d546f54ef 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -782,7 +782,7 @@ namespace ts.server { private handleDeletedFile(info: ScriptInfo) { this.stopWatchingScriptInfo(info); - // TODO: handle isOpen = true case + // TODO: handle isOpen = true case id:268 gh:269 if (!info.isScriptOpen()) { this.filenameToScriptInfo.delete(info.path); @@ -1514,7 +1514,7 @@ namespace ts.server { cachedDirectoryStructureHost); project.configFileSpecs = configFileSpecs; - // TODO: We probably should also watch the configFiles that are extended + // TODO: We probably should also watch the configFiles that are extended id:346 gh:347 project.configFileWatcher = this.watchFile( this.host, configFileName, @@ -1683,7 +1683,7 @@ namespace ts.server { // ignore inferred projects that don't contain the root's path if (!containsPath(project.projectRootPath, info.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames)) continue; // ignore inferred projects that are higher up in the project root. - // TODO(rbuckton): Should we add the file as a root to these as well? + // TODO (rbuckton): Should we add the file as a root to these as well? id:328 gh:329 if (bestMatch && bestMatch.projectRootPath.length > project.projectRootPath.length) continue; bestMatch = project; } diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 4bd7a0a0967d7..1571f71a7a11e 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2,7 +2,7 @@ * Declaration module describing the TypeScript Server protocol */ namespace ts.server.protocol { - // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. + // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. id:723 gh:724 export const enum CommandTypes { Brace = "brace", /* @internal */ @@ -102,7 +102,7 @@ namespace ts.server.protocol { GetCodeFixes = "getCodeFixes", /* @internal */ GetCodeFixesFull = "getCodeFixes-full", - // TODO: GH#20538 + // TODO: GH#20538 id:301 gh:302 /* @internal */ GetCombinedCodeFix = "getCombinedCodeFix", /* @internal */ @@ -115,7 +115,7 @@ namespace ts.server.protocol { /* @internal */ GetEditsForRefactorFull = "getEditsForRefactor-full", - // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. + // NOTE: If updating this, be sure to also update `allCommandNames` in `harness/unittests/session.ts`. id:271 gh:272 } /** @@ -255,7 +255,7 @@ namespace ts.server.protocol { } /** - * A request to get TODO comments from the file + * A request to get TODO comments from the file id:347 gh:348 */ export interface TodoCommentRequest extends FileRequest { command: CommandTypes.TodoComments; @@ -267,7 +267,7 @@ namespace ts.server.protocol { */ export interface TodoCommentRequestArgs extends FileRequestArgs { /** - * Array of target TodoCommentDescriptors that describes TODO comments to be found + * Array of target TodoCommentDescriptors that describes TODO comments to be found id:330 gh:331 */ descriptors: TodoCommentDescriptor[]; } @@ -557,14 +557,14 @@ namespace ts.server.protocol { arguments: CodeFixRequestArgs; } - // TODO: GH#20538 + // TODO: GH#20538 id:724 gh:725 /* @internal */ export interface GetCombinedCodeFixRequest extends Request { command: CommandTypes.GetCombinedCodeFix; arguments: GetCombinedCodeFixRequestArgs; } - // TODO: GH#20538 + // TODO: GH#20538 id:304 gh:305 /* @internal */ export interface GetCombinedCodeFixResponse extends Response { body: CombinedCodeActions; @@ -622,14 +622,14 @@ namespace ts.server.protocol { errorCodes?: ReadonlyArray; } - // TODO: GH#20538 + // TODO: GH#20538 id:274 gh:275 /* @internal */ export interface GetCombinedCodeFixRequestArgs { scope: GetCombinedCodeFixScope; fixId: {}; } - // TODO: GH#20538 + // TODO: GH#20538 id:348 gh:349 /* @internal */ export interface GetCombinedCodeFixScope { type: "file"; @@ -1443,7 +1443,7 @@ namespace ts.server.protocol { /** * Request to obtain the list of files that should be regenerated if target file is recompiled. - * NOTE: this us query-only operation and does not generate any output on disk. + * NOTE: this us query-only operation and does not generate any output on disk. id:332 gh:333 */ export interface CompileOnSaveAffectedFileListRequest extends FileRequest { command: CommandTypes.CompileOnSaveAffectedFileList; @@ -1619,7 +1619,7 @@ namespace ts.server.protocol { export interface CodeFixResponse extends Response { /** The code actions that are available */ - body?: CodeAction[]; // TODO: GH#20538 CodeFixAction[] + body?: CodeAction[]; // TODO: GH#20538 CodeFixAction[] id:725 gh:726 } export interface CodeAction { @@ -1631,14 +1631,14 @@ namespace ts.server.protocol { commands?: {}[]; } - // TODO: GH#20538 + // TODO: GH#20538 id:307 gh:308 /* @internal */ export interface CombinedCodeActions { changes: ReadonlyArray; commands?: ReadonlyArray<{}>; } - // TODO: GH#20538 + // TODO: GH#20538 id:276 gh:277 /* @internal */ export interface CodeFixAction extends CodeAction { /** diff --git a/src/server/scriptInfo.ts b/src/server/scriptInfo.ts index f800a1117d071..740ee46dc8c5b 100644 --- a/src/server/scriptInfo.ts +++ b/src/server/scriptInfo.ts @@ -146,7 +146,7 @@ namespace ts.server { return computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text); } - // TODO: assert this offset is actually on the line + // TODO: assert this offset is actually on the line id:349 gh:350 return this.svc.lineOffsetToPosition(line, offset); } diff --git a/src/server/scriptVersionCache.ts b/src/server/scriptVersionCache.ts index fe71040b4f632..503fbffeb9830 100644 --- a/src/server/scriptVersionCache.ts +++ b/src/server/scriptVersionCache.ts @@ -276,7 +276,7 @@ namespace ts.server { return this.currentVersion % ScriptVersionCache.maxVersions; } - // REVIEW: can optimize by coalescing simple edits + // REVIEW: can optimize by coalescing simple edits id:333 gh:334 edit(pos: number, deleteLen: number, insertedText?: string) { this.changes.push(new TextChange(pos, deleteLen, insertedText)); if (this.changes.length > ScriptVersionCache.changeNumberThreshold || diff --git a/src/server/server.ts b/src/server/server.ts index 8e53c4d51092a..d53f6648d0777 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -665,7 +665,7 @@ namespace ts.server { return new Logger(logFileName, envLogOptions.traceToConsole, logVerbosity); } // This places log file in the directory containing editorServices.js - // TODO: check that this location is writable + // TODO: check that this location is writable id:726 gh:727 // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond @@ -756,7 +756,7 @@ namespace ts.server { } } - // REVIEW: for now this implementation uses polling. + // REVIEW: for now this implementation uses polling. id:353 gh:354 // The advantage of polling is that it works reliably // on all os and with network mounted files. // For 90 referenced files, the average time to detect diff --git a/src/server/session.ts b/src/server/session.ts index 9dcf58734a73d..8bbd550c2ceb1 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -1115,7 +1115,7 @@ namespace ts.server { const startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset); const endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); - // TODO: avoid duplicate code (with formatonkey) + // TODO: avoid duplicate code (with formatonkey) id:278 gh:279 const edits = languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file)); if (!edits) { @@ -1585,8 +1585,8 @@ namespace ts.server { for (const command of toArray(commands)) { const { project } = this.getFileAndProject(command); project.getLanguageService().applyCodeActionCommand(command).then( - _result => { /* TODO: GH#20447 report success message? */ }, - _error => { /* TODO: GH#20447 report errors */ }); + _result => { /* TODO: GH#20447 report success message? id:350 gh:351*/ }, + _error => { /* TODO: GH#20447 report errors id:335 gh:336*/ }); } return {}; } @@ -1718,17 +1718,17 @@ namespace ts.server { }, [CommandNames.OpenExternalProject]: (request: protocol.OpenExternalProjectRequest) => { this.projectService.openExternalProject(request.arguments, /*suppressRefreshOfInferredProjects*/ false); - // TODO: GH#20447 report errors + // TODO: GH#20447 report errors id:727 gh:728 return this.requiredResponse(/*response*/ true); }, [CommandNames.OpenExternalProjects]: (request: protocol.OpenExternalProjectsRequest) => { this.projectService.openExternalProjects(request.arguments.projects); - // TODO: GH#20447 report errors + // TODO: GH#20447 report errors id:355 gh:356 return this.requiredResponse(/*response*/ true); }, [CommandNames.CloseExternalProject]: (request: protocol.CloseExternalProjectRequest) => { this.projectService.closeExternalProject(request.arguments.projectFileName); - // TODO: GH#20447 report errors + // TODO: GH#20447 report errors id:281 gh:282 return this.requiredResponse(/*response*/ true); }, [CommandNames.SynchronizeProjectList]: (request: protocol.SynchronizeProjectListRequest) => { @@ -1752,7 +1752,7 @@ namespace ts.server { [CommandNames.ApplyChangedToOpenFiles]: (request: protocol.ApplyChangedToOpenFilesRequest) => { this.changeSeq++; this.projectService.applyChangesInOpenFiles(request.arguments.openFiles, request.arguments.changedFiles, request.arguments.closedFiles); - // TODO: report errors + // TODO: report errors id:351 gh:352 return this.requiredResponse(/*response*/ true); }, [CommandNames.Exit]: () => { diff --git a/src/server/typingsCache.ts b/src/server/typingsCache.ts index a1d8f65f6e061..3b60d86b90919 100644 --- a/src/server/typingsCache.ts +++ b/src/server/typingsCache.ts @@ -71,7 +71,7 @@ namespace ts.server { } function compilerOptionsChanged(opt1: CompilerOptions, opt2: CompilerOptions): boolean { - // TODO: add more relevant properties + // TODO: add more relevant properties id:336 gh:337 return opt1.allowJs !== opt2.allowJs; } diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/server/typingsInstaller/typingsInstaller.ts index 283770d1dc862..c58cd1bccce8b 100644 --- a/src/server/typingsInstaller/typingsInstaller.ts +++ b/src/server/typingsInstaller/typingsInstaller.ts @@ -283,7 +283,7 @@ namespace ts.server.typingsInstaller { return; } - // TODO: watch project directory + // TODO: watch project directory id:728 gh:729 if (this.log.isEnabled()) { this.log.writeLine(`Installed typings ${JSON.stringify(scopedTypings)}`); } diff --git a/src/server/utilities.ts b/src/server/utilities.ts index d76ff1bf6d0cd..a53115061e658 100644 --- a/src/server/utilities.ts +++ b/src/server/utilities.ts @@ -23,7 +23,7 @@ namespace ts.server { getLogFileName(): string; } - // TODO: Use a const enum (https://github.com/Microsoft/TypeScript/issues/16804) + // TODO: Use a const enum (https://github.com/Microsoft/TypeScript/issues/16804) id:357 gh:358 export enum Msg { Err = "Err", Info = "Info", @@ -39,7 +39,7 @@ namespace ts.server { case ProjectKind.Configured: return getDirectoryPath(project.getProjectName()); case ProjectKind.Inferred: - // TODO: fixme + // TODO: fixme id:284 gh:285 return ""; case ProjectKind.External: const projectName = normalizeSlashes(project.getProjectName()); diff --git a/src/services/classifier.ts b/src/services/classifier.ts index 32b3dac2ccaad..0edb820204fab 100644 --- a/src/services/classifier.ts +++ b/src/services/classifier.ts @@ -660,7 +660,7 @@ namespace ts { // specially. const docCommentAndDiagnostics = parseIsolatedJSDocComment(sourceFile.text, start, width); if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { - // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` + // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` id:352 gh:353 docCommentAndDiagnostics.jsDoc.parent = token as HasJSDoc; classifyJSDocComment(docCommentAndDiagnostics.jsDoc); return; @@ -876,11 +876,11 @@ namespace ts { return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral; } else if (tokenKind === SyntaxKind.RegularExpressionLiteral) { - // TODO: we should get another classification type for these literals. + // TODO: we should get another classification type for these literals. id:338 gh:339 return ClassificationType.stringLiteral; } else if (isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. + // TODO (drosen): we should *also* get another classification type for these literals. id:729 gh:730 return ClassificationType.stringLiteral; } else if (tokenKind === SyntaxKind.JsxText) { diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index 0236b0c79b7bb..7cf4159b0325a 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -2,7 +2,7 @@ namespace ts.codefix { const errorCodes = [Diagnostics.Class_0_incorrectly_implements_interface_1.code, Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code]; - const fixId = "fixClassIncorrectlyImplementsInterface"; // TODO: share a group with fixClassDoesntImplementInheritedAbstractMember? + const fixId = "fixClassIncorrectlyImplementsInterface"; // TODO: share a group with fixClassDoesntImplementInheritedAbstractMember? id:359 gh:360 registerCodeFix({ errorCodes, getCodeActions(context) { diff --git a/src/services/codefixes/fixJSDocTypes.ts b/src/services/codefixes/fixJSDocTypes.ts index 8c43ed0cc7fb3..137b8074859af 100644 --- a/src/services/codefixes/fixJSDocTypes.ts +++ b/src/services/codefixes/fixJSDocTypes.ts @@ -57,14 +57,14 @@ namespace ts.codefix { return checker.typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.NoTruncation); } - // TODO: GH#19856 Node & { type: TypeNode } + // TODO: GH#19856 Node & { type: TypeNode } id:287 gh:288 type TypeContainer = | AsExpression | CallSignatureDeclaration | ConstructSignatureDeclaration | FunctionDeclaration | GetAccessorDeclaration | IndexSignatureDeclaration | MappedTypeNode | MethodDeclaration | MethodSignature | ParameterDeclaration | PropertyDeclaration | PropertySignature | SetAccessorDeclaration | TypeAliasDeclaration | TypeAssertion | VariableDeclaration; function isTypeContainer(node: Node): node is TypeContainer { - // NOTE: Some locations are not handled yet: + // NOTE: Some locations are not handled yet: id:354 gh:355 // MappedTypeNode.typeParameters and SignatureDeclaration.typeParameters, as well as CallExpression.typeArguments switch (node.kind) { case SyntaxKind.AsExpression: diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index 64cdc3181fb00..de3d2c7721ea4 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -27,7 +27,7 @@ namespace ts.codefix { // This is the identifier of the misspelled word. eg: // this.speling = 1; // ^^^^^^^ - const node = getTokenAtPosition(sourceFile, pos, /*includeJsDocComment*/ false); // TODO: GH#15852 + const node = getTokenAtPosition(sourceFile, pos, /*includeJsDocComment*/ false); // TODO: GH#15852 id:339 gh:340 let suggestion: string; if (isPropertyAccessExpression(node.parent) && node.parent.name === node) { diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index a69152ad2b5ff..cf3c2307327a9 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -10,7 +10,7 @@ namespace ts.codefix { Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code ], getCodeActions: getImportCodeActions, - // TODO: GH#20315 + // TODO: GH#20315 id:730 gh:731 fixIds: [], getAllCodeActions: notImplemented, }); @@ -158,7 +158,7 @@ namespace ts.codefix { return { description: formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)), changes, - // TODO: GH#20315 + // TODO: GH#20315 id:360 gh:361 fixId: undefined, kind, moduleSpecifier @@ -234,7 +234,7 @@ namespace ts.codefix { } } - // TODO(anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? + // TODO (anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array? id:290 gh:291 function getImportDeclarations(moduleSymbol: Symbol, checker: TypeChecker, { imports }: SourceFile, cachedImportDeclarations: ImportDeclarationMap = []): ReadonlyArray { const moduleSymbolId = getUniqueSymbolId(moduleSymbol, checker); let cached = cachedImportDeclarations[moduleSymbolId]; diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts index 95d85bc5aa028..8727b7ed451bc 100644 --- a/src/services/codefixes/inferFromUsage.ts +++ b/src/services/codefixes/inferFromUsage.ts @@ -26,7 +26,7 @@ namespace ts.codefix { errorCodes, getCodeActions({ sourceFile, program, span: { start }, errorCode, cancellationToken }) { if (isSourceFileJavaScript(sourceFile)) { - return undefined; // TODO: GH#20113 + return undefined; // TODO: GH#20113 id:356 gh:357 } const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); @@ -481,7 +481,7 @@ namespace ts.codefix { if (node === parent.left && (node.parent.parent.kind === SyntaxKind.VariableDeclaration || isAssignmentExpression(node.parent.parent, /*excludeCompoundAssignment*/ true))) { // var x = x || {}; - // TODO: use getFalsyflagsOfType + // TODO: use getFalsyflagsOfType id:341 gh:342 addCandidateType(usageContext, checker.getTypeAtLocation(parent.right)); } break; diff --git a/src/services/completions.ts b/src/services/completions.ts index ed1933c36166a..202d1591fd94d 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -93,7 +93,7 @@ namespace ts.Completions { getCompletionEntriesFromSymbols(symbols, entries, location, /*performCharacterChecks*/ true, typeChecker, compilerOptions.target, log, allowStringLiteral, recommendedCompletion, symbolToOriginInfoMap); } - // TODO add filter for keyword based on type/value/namespace and also location + // TODO add filter for keyword based on type/value/namespace and also location id:731 gh:732 // Add all keywords if // - this is not a member completion list (all the keywords) @@ -153,7 +153,7 @@ namespace ts.Completions { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // TODO (drosen): Right now we just permit *all* semantic meanings when calling id:361 gh:362 // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report // that a suggestion for a value is an interface. We COULD also just do what @@ -663,7 +663,7 @@ namespace ts.Completions { let request: Request | undefined; let start = timestamp(); - let currentToken = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 + let currentToken = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 id:293 gh:294 // We will check for jsdoc comments with insideComment and getJsDocTagAtPosition. (TODO: that seems rather inefficient to check the same thing so many times.) log("getCompletionData: Get current token: " + (timestamp() - start)); @@ -777,7 +777,7 @@ namespace ts.Completions { let isRightOfOpenTag = false; let isStartingCloseTag = false; - let location = getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 + let location = getTouchingPropertyName(sourceFile, position, insideJsDocTagTypeExpression); // TODO: GH#15853 id:358 gh:359 if (contextToken) { // Bail out if this is a known invalid completion location if (isCompletionListBlocker(contextToken)) { @@ -1870,8 +1870,8 @@ namespace ts.Completions { } } else { - // TODO: Account for computed property name - // NOTE: if one only performs this step when m.name is an identifier, + // TODO: Account for computed property name id:343 gh:344 + // NOTE: if one only performs this step when m.name is an identifier, id:732 gh:733 // things like '__proto__' are not filtered out. const name = getNameOfDeclaration(m); existingName = getEscapedTextOfIdentifierOrLiteral(name as (Identifier | LiteralExpression)); @@ -2018,7 +2018,7 @@ namespace ts.Completions { // e.g "b a" is valid quoted name but when we strip off the quotes, it is invalid. // We, thus, need to check if whatever was inside the quotes is actually a valid identifier name. if (performCharacterChecks && !isIdentifierText(name, target)) { - // TODO: GH#18169 + // TODO: GH#18169 id:362 gh:363 return allowStringLiteral ? JSON.stringify(name) : undefined; } diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts index d9a9a03c38b45..94953b36a5027 100644 --- a/src/services/documentHighlights.ts +++ b/src/services/documentHighlights.ts @@ -202,7 +202,7 @@ namespace ts.DocumentHighlights { return !statement.label || isLabeledBy(node, statement.label.text); default: // Don't cross function boundaries. - // TODO: GH#20090 + // TODO: GH#20090 id:380 gh:381 return (isFunctionLike(node) && "quit") as false | "quit"; } }); diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 6e43ac37def9d..1fc4121ae40fa 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -702,7 +702,7 @@ namespace ts.FindAllReferences.Core { function getPossibleSymbolReferencePositions(sourceFile: SourceFile, symbolName: string, container: Node = sourceFile): number[] { const positions: number[] = []; - /// TODO: Cache symbol existence for files to save text search + /// TODO: Cache symbol existence for files to save text search id:363 gh:364 // Also, need to make this work for unicode escapes. // Be resilient in the face of a symbol with no name or zero length name diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index debf1702b4914..be8ebc042c9b0 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -572,7 +572,7 @@ namespace ts.formatting { case SyntaxKind.TryStatement: case SyntaxKind.DoStatement: case SyntaxKind.WithStatement: - // TODO + // TODO id:364 gh:365 // case SyntaxKind.ElseClause: case SyntaxKind.CatchClause: return true; diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 33d84763d440e..02f9693614260 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -150,7 +150,7 @@ namespace ts.JsDoc { export function getJSDocTagCompletionDetails(name: string): CompletionEntryDetails { return { name, - kind: ScriptElementKind.unknown, // TODO: should have its own kind? + kind: ScriptElementKind.unknown, // TODO: should have its own kind? id:733 gh:734 kindModifiers: "", displayParts: [textPart(name)], documentation: emptyArray, @@ -269,7 +269,7 @@ namespace ts.JsDoc { // * The opening comment line // * the first line (without a param) for the object's untagged info (this is also where the caret ends up) // * the '@param'-tagged lines - // * TODO: other tags. + // * TODO: other tags. id:365 gh:366 // * the closing comment line // * if the caret was directly in front of the object, then we add an extra line and indentation. const preamble = "/**" + newLine + diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index 1c2f87fa428c5..2ff05d2b378a5 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -280,7 +280,7 @@ namespace ts.JsTyping { } // check if name is scope package like: starts with @ and has one '/' in the middle // scoped packages are not currently supported - // TODO: when support will be added we'll need to split and check both scope and package name + // TODO: when support will be added we'll need to split and check both scope and package name id:383 gh:384 if (/^@[^/]+\/[^/]+$/.test(packageName)) { return PackageNameValidationResult.ScopedPackagesNotSupported; } diff --git a/src/services/navigateTo.ts b/src/services/navigateTo.ts index 762726adb771c..c02f955074e92 100644 --- a/src/services/navigateTo.ts +++ b/src/services/navigateTo.ts @@ -174,7 +174,7 @@ namespace ts.NavigateTo { } function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. + // TODO (cyrusn): get the gamut of comparisons that VS already uses here. id:366 gh:367 return compareValues(i1.matchKind, i2.matchKind) || compareStringsCaseSensitiveUI(i1.name, i2.name); } @@ -191,7 +191,7 @@ namespace ts.NavigateTo { isCaseSensitive: rawItem.isCaseSensitive, fileName: rawItem.fileName, textSpan: createTextSpanFromNode(declaration), - // TODO(jfreeman): What should be the containerName when the container has a computed name? + // TODO (jfreeman): What should be the containerName when the container has a computed name? id:367 gh:368 containerName: containerName ? (containerName).text : "", containerKind: containerName ? getNodeKind(container) : ScriptElementKind.unknown }; diff --git a/src/services/patternMatcher.ts b/src/services/patternMatcher.ts index db957816146bb..d9d95d14af4fd 100644 --- a/src/services/patternMatcher.ts +++ b/src/services/patternMatcher.ts @@ -491,7 +491,7 @@ namespace ts { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:734 gh:735 // non-allocating manner. const str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -508,7 +508,7 @@ namespace ts { } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a id:368 gh:369 // non-allocating manner. const str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -550,13 +550,13 @@ namespace ts { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a id:385 gh:386 // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } function isDigit(ch: number) { - // TODO(cyrusn): Find a way to support this for unicode digits. + // TODO (cyrusn): Find a way to support this for unicode digits. id:369 gh:370 return ch >= CharacterCodes._0 && ch <= CharacterCodes._9; } diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index b7aa5ac33d1f0..e833e4726d499 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -844,7 +844,7 @@ namespace ts.refactor.extractSymbol { newNodes.push(createVariableStatement( /*modifiers*/ undefined, createVariableDeclarationList( - [createVariableDeclaration(getSynthesizedDeepClone(variableDeclaration.name), /*type*/ getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns + [createVariableDeclaration(getSynthesizedDeepClone(variableDeclaration.name), /*type*/ getSynthesizedDeepClone(variableDeclaration.type), /*initializer*/ call)], // TODO (acasey): test binding patterns id:370 gh:371 variableDeclaration.parent.flags))); } else { @@ -1451,7 +1451,7 @@ namespace ts.refactor.extractSymbol { constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); } if (isArrowFunction(scope) && !isBlock(scope.body)) { - // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this + // TODO (https://github.com/Microsoft/TypeScript/issues/18924): allow this id:735 gh:736 constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); } constantErrorsPerScope.push(constantErrors); diff --git a/src/services/services.ts b/src/services/services.ts index 1660ca10e4347..a2417b6f9b73a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1924,7 +1924,7 @@ namespace ts { : Promise.reject("Host does not implement `installPackage`"); default: Debug.fail(); - // TODO: Debug.assertNever(action); will only work if there is more than one type. + // TODO: Debug.assertNever(action); will only work if there is more than one type. id:371 gh:372 } } @@ -2013,8 +2013,8 @@ namespace ts { // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. + // i.e. 'undefined' in position 3 above means TODO (jason) didn't match. id:413 gh:414 + // "hack" in position 4 means HACK did match. id:372 gh:373 const firstDescriptorCaptureIndex = 3; Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); @@ -2053,28 +2053,28 @@ namespace ts { } function getTodoCommentsRegExp(): RegExp { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to + // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to id:373 gh:374 // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: + // TODO comments can appear in one of the following forms: id:736 gh:737 // - // 1) // TODO or /////////// TODO + // 1) // TODO or /////////// TODO id:374 gh:375 // - // 2) /* TODO or /********** TODO + // 2) /* TODO or /********** TODO id:416 gh:417 // // 3) /* - // * TODO + // * TODO id:375 gh:376 // */ // - // The following three regexps are used to match the start of the text up to the TODO + // The following three regexps are used to match the start of the text up to the TODO id:376 gh:377 // comment portion. const singleLineCommentStart = /(?:\/\/+\s*)/.source; const multiLineCommentStart = /(?:\/\*+\s*)/.source; const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. + // Match any of the above three TODO comment start regexps. id:737 gh:738 // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. + // so that we can determine the starting position of the TODO comment match. id:377 gh:378 const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; // Takes the descriptors and forms a regexp that matches them as if they were literals. @@ -2092,7 +2092,7 @@ namespace ts { const endOfLineOrEndOfComment = /(?:$|\*\/)/.source; const messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We + // This is the portion of the match we'll return as part of the TODO comment result. We id:464 gh:465 // match the literal portion up to the end of the line or end of comment. const messagePortion = "(" + literals + messageRemainder + ")"; const regExpString = preamble + messagePortion + endOfLineOrEndOfComment; @@ -2104,7 +2104,7 @@ namespace ts { // 'g' is so that we are doing a global search and can find matches several times // in the input. // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). + // 'i' is for case insensitivity (We do this to match C# TODO comment code). id:378 gh:379 // // 'm' is so we can find matches in a multi-line input. return new RegExp(regExpString, "gim"); diff --git a/src/services/shims.ts b/src/services/shims.ts index 34a8bbb10d9a7..e0c8f81d269a2 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -587,7 +587,7 @@ namespace ts { message: flattenDiagnosticMessageText(diagnostic.messageText, newLine), start: diagnostic.start, length: diagnostic.length, - /// TODO: no need for the tolowerCase call + /// TODO: no need for the tolowerCase call id:379 gh:380 category: DiagnosticCategory[diagnostic.category].toLowerCase(), code: diagnostic.code }; @@ -1249,14 +1249,14 @@ namespace ts { /* tslint:enable:no-null */ -/// TODO: this is used by VS, clean this up on both sides of the interface +/// TODO: this is used by VS, clean this up on both sides of the interface id:738 gh:739 /* @internal */ namespace TypeScript.Services { export const TypeScriptServicesFactory = ts.TypeScriptServicesFactory; } // 'toolsVersion' gets consumed by the managed side, so it's not unused. -// TODO: it should be moved into a namespace though. +// TODO: it should be moved into a namespace though. id:381 gh:382 /* @internal */ const toolsVersion = ts.versionMajorMinor; diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index 36c83f5f4af38..6dff7133e1a8d 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -340,7 +340,7 @@ namespace ts.SignatureHelp { } - // TODO: Handle generic call with incomplete syntax + // TODO: Handle generic call with incomplete syntax id:468 gh:470 } return undefined; } diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index e79dde41e69ea..e01fbff5f6a97 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -1,6 +1,6 @@ /* @internal */ namespace ts.SymbolDisplay { - // TODO(drosen): use contextual SemanticMeaning. + // TODO (drosen): use contextual SemanticMeaning. id:382 gh:383 export function getSymbolKind(typeChecker: TypeChecker, symbol: Symbol, location: Node): ScriptElementKind { const flags = getCombinedLocalAndExportSymbolFlags(symbol); @@ -108,7 +108,7 @@ namespace ts.SymbolDisplay { tags: JSDocTagInfo[]; } - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location + // TODO (drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location id:384 gh:385 export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node, location: Node, semanticMeaning = getMeaningFromLocation(location)): SymbolDisplayPartsDocumentationAndSymbolKind { diff --git a/src/services/types.ts b/src/services/types.ts index 813e8790933ec..83ead70c252fe 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -224,7 +224,7 @@ namespace ts { getSyntacticDiagnostics(fileName: string): Diagnostic[]; getSemanticDiagnostics(fileName: string): Diagnostic[]; - // TODO: Rename this to getProgramDiagnostics to better indicate that these are any + // TODO: Rename this to getProgramDiagnostics to better indicate that these are any id:739 gh:740 // diagnostics present for the program level, and not just 'options' diagnostics. getCompilerOptionsDiagnostics(): Diagnostic[]; @@ -295,9 +295,9 @@ namespace ts { getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan; - // TODO: GH#20538 return `ReadonlyArray` + // TODO: GH#20538 return `ReadonlyArray` id:388 gh:389 getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: ReadonlyArray, formatOptions: FormatCodeSettings): ReadonlyArray; - // TODO: GH#20538 + // TODO: GH#20538 id:474 gh:475 /* @internal */ getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings): CombinedCodeActions; applyCodeActionCommand(action: CodeActionCommand): Promise; @@ -327,7 +327,7 @@ namespace ts { dispose(): void; } - // TODO: GH#20538 + // TODO: GH#20538 id:387 gh:388 /* @internal */ export interface CombinedCodeFixScope { type: "file"; fileName: string; } @@ -418,7 +418,7 @@ namespace ts { commands?: CodeActionCommand[]; } - // TODO: GH#20538 + // TODO: GH#20538 id:386 gh:387 /* @internal */ export interface CodeFixAction extends CodeAction { /** @@ -428,7 +428,7 @@ namespace ts { fixId?: {}; } - // TODO: GH#20538 + // TODO: GH#20538 id:740 gh:741 /* @internal */ export interface CombinedCodeActions { changes: ReadonlyArray; @@ -547,7 +547,7 @@ namespace ts { name: string; kind: ScriptElementKind; kindModifiers: string; - matchKind: string; // TODO: keyof typeof PatternMatchKind; (https://github.com/Microsoft/TypeScript/issues/15102) + matchKind: string; // TODO: keyof typeof PatternMatchKind; (https://github.com/Microsoft/TypeScript/issues/15102) id:393 gh:394 isCaseSensitive: boolean; fileName: string; textSpan: TextSpan; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 96a1cdd55fca9..284df300a97e8 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -391,7 +391,7 @@ namespace ts { export function isThis(node: Node): boolean { switch (node.kind) { case SyntaxKind.ThisKeyword: - // case SyntaxKind.ThisType: TODO: GH#9267 + // case SyntaxKind.ThisType: TODO: GH#9267 id:478 gh:479 return true; case SyntaxKind.Identifier: // 'this' as a parameter diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index 168567eb80fac..39ea8b03a1973 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -13,7 +13,7 @@ import mod = require("./aliasUsedAsNameValue_0"); import b = require("./aliasUsedAsNameValue_1"); export var a = function () { - //var x = mod.id; // TODO needed hack that mod is loaded + //var x = mod.id; // TODO needed hack that mod is loaded id:390 gh:391 b.b(mod); } @@ -34,6 +34,6 @@ exports.__esModule = true; var mod = require("./aliasUsedAsNameValue_0"); var b = require("./aliasUsedAsNameValue_1"); exports.a = function () { - //var x = mod.id; // TODO needed hack that mod is loaded + //var x = mod.id; // TODO needed hack that mod is loaded id:389 gh:390 b.b(mod); }; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index aa9e1d9a62f8c..3f21576876c3c 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2553,7 +2553,7 @@ declare namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:741 gh:742 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -2571,7 +2571,7 @@ declare namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:396 gh:397 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; @@ -5032,7 +5032,7 @@ declare namespace ts.server.protocol { body?: TextInsertion; } /** - * A request to get TODO comments from the file + * A request to get TODO comments from the file id:482 gh:483 */ interface TodoCommentRequest extends FileRequest { command: CommandTypes.TodoComments; @@ -5043,7 +5043,7 @@ declare namespace ts.server.protocol { */ interface TodoCommentRequestArgs extends FileRequestArgs { /** - * Array of target TodoCommentDescriptors that describes TODO comments to be found + * Array of target TodoCommentDescriptors that describes TODO comments to be found id:392 gh:393 */ descriptors: TodoCommentDescriptor[]; } @@ -5904,7 +5904,7 @@ declare namespace ts.server.protocol { } /** * Request to obtain the list of files that should be regenerated if target file is recompiled. - * NOTE: this us query-only operation and does not generate any output on disk. + * NOTE: this us query-only operation and does not generate any output on disk. id:391 gh:392 */ interface CompileOnSaveAffectedFileListRequest extends FileRequest { command: CommandTypes.CompileOnSaveAffectedFileList; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 3ee55ce823da2..7e39966ff1af0 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2553,7 +2553,7 @@ declare namespace ts { * Hook used by transformers to substitute expressions just before they * are emitted by the pretty printer. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:742 gh:743 * before returning the `NodeTransformer` callback. */ onSubstituteNode: (hint: EmitHint, node: Node) => Node; @@ -2571,7 +2571,7 @@ declare namespace ts { * Hook used to allow transformers to capture state before or after * the printer emits a node. * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, + * NOTE: Transformation hooks should only be modified during `Transformer` initialization, id:399 gh:400 * before returning the `NodeTransformer` callback. */ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; diff --git a/tests/baselines/reference/arrayConcat3.js b/tests/baselines/reference/arrayConcat3.js index 90226797706e2..465d44cafa32e 100644 --- a/tests/baselines/reference/arrayConcat3.js +++ b/tests/baselines/reference/arrayConcat3.js @@ -1,5 +1,5 @@ //// [arrayConcat3.ts] -// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed +// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed id:484 gh:485 type Fn = (subj: U) => U function doStuff(a: Array>, b: Array>) { b.concat(a); diff --git a/tests/baselines/reference/commentInNamespaceDeclarationWithIdentifierPathName.js b/tests/baselines/reference/commentInNamespaceDeclarationWithIdentifierPathName.js index 6f99037a61d4b..0ffbcfb3be6fa 100644 --- a/tests/baselines/reference/commentInNamespaceDeclarationWithIdentifierPathName.js +++ b/tests/baselines/reference/commentInNamespaceDeclarationWithIdentifierPathName.js @@ -3,7 +3,7 @@ namespace hello.hi.world { function foo() {} - // TODO, blah + // TODO , blah id:395 gh:396 } //// [commentInNamespaceDeclarationWithIdentifierPathName.js] @@ -14,7 +14,7 @@ var hello; var world; (function (world) { function foo() { } - // TODO, blah + // TODO , blah id:394 gh:395 })(world = hi.world || (hi.world = {})); })(hi = hello.hi || (hello.hi = {})); })(hello || (hello = {})); diff --git a/tests/baselines/reference/contextualTypingOfOptionalMembers.js b/tests/baselines/reference/contextualTypingOfOptionalMembers.js index 289d64546e83d..b6169c4e93034 100644 --- a/tests/baselines/reference/contextualTypingOfOptionalMembers.js +++ b/tests/baselines/reference/contextualTypingOfOptionalMembers.js @@ -71,7 +71,7 @@ interface ActionsObjectOr { declare function App4>(props: Options["actions"] & { state: State }): JSX.Element; -const a = s} />; // TODO: should be number => number, but JSX resolution is missing an inferential pass +const a = s} />; // TODO: should be number => number, but JSX resolution is missing an inferential pass id:743 gh:744 //// [index.jsx] @@ -100,4 +100,4 @@ app3({ ], view: function (s, a) { return undefined; } }); -var a = ; // TODO: should be number => number, but JSX resolution is missing an inferential pass +var a = ; // TODO: should be number => number, but JSX resolution is missing an inferential pass id:402 gh:403 diff --git a/tests/baselines/reference/controlFlowPropertyDeclarations.js b/tests/baselines/reference/controlFlowPropertyDeclarations.js index d5f91ceb92fa9..63c6dd39dff21 100644 --- a/tests/baselines/reference/controlFlowPropertyDeclarations.js +++ b/tests/baselines/reference/controlFlowPropertyDeclarations.js @@ -6,7 +6,7 @@ declare var require:any; var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); // Populate property map with ReactJS's attribute and property mappings -// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr +// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr id:487 gh:488 for (var propname in HTMLDOMPropertyConfig.Properties) { if (!HTMLDOMPropertyConfig.Properties.hasOwnProperty(propname)) { continue; @@ -154,7 +154,7 @@ export class StyleParser { exports.__esModule = true; var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); // Populate property map with ReactJS's attribute and property mappings -// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr +// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr id:398 gh:399 for (var propname in HTMLDOMPropertyConfig.Properties) { if (!HTMLDOMPropertyConfig.Properties.hasOwnProperty(propname)) { continue; diff --git a/tests/baselines/reference/lambdaArgCrash.js b/tests/baselines/reference/lambdaArgCrash.js index 86e75c19fc16e..99577b2f6a35a 100644 --- a/tests/baselines/reference/lambdaArgCrash.js +++ b/tests/baselines/reference/lambdaArgCrash.js @@ -5,7 +5,7 @@ class Event { constructor () { - // TODO: remove + // TODO: remove id:397 gh:398 this._listeners = []; @@ -47,7 +47,7 @@ var __extends = (this && this.__extends) || (function () { })(); var Event = /** @class */ (function () { function Event() { - // TODO: remove + // TODO: remove id:744 gh:745 this._listeners = []; this._listeners = []; } diff --git a/tests/baselines/reference/literalsInComputedProperties1.js b/tests/baselines/reference/literalsInComputedProperties1.js index 4611925f2d416..db03f12a0d789 100644 --- a/tests/baselines/reference/literalsInComputedProperties1.js +++ b/tests/baselines/reference/literalsInComputedProperties1.js @@ -48,7 +48,7 @@ enum X { let a = X["foo"]; let a0 = X["bar"]; -// TODO: make sure that enum still disallow template literals as member names +// TODO: make sure that enum still disallow template literals as member names id:405 gh:406 //// [literalsInComputedProperties1.js] var x = (_a = { @@ -89,4 +89,4 @@ var X; var a = X["foo"]; var a0 = X["bar"]; var _a; -// TODO: make sure that enum still disallow template literals as member names +// TODO: make sure that enum still disallow template literals as member names id:489 gh:490 diff --git a/tests/baselines/reference/parser509534.js b/tests/baselines/reference/parser509534.js index 4562c7ef7a472..88b5fc08f862d 100644 --- a/tests/baselines/reference/parser509534.js +++ b/tests/baselines/reference/parser509534.js @@ -6,7 +6,7 @@ module.exports.route = function (server) { // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { - // TODO Should render login page that shows auth options + // TODO Should render login page that shows auth options id:401 gh:402 req.redirect("/auth/live"); }); } @@ -18,7 +18,7 @@ var config = require("../config"); module.exports.route = function (server) { // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { - // TODO Should render login page that shows auth options + // TODO Should render login page that shows auth options id:745 gh:746 req.redirect("/auth/live"); }); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 699566f28d112..e248214c06c2e 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -446,7 +446,7 @@ module TypeScript { } } - // TODO: new with length TokenID.LimFixed + // TODO: new with length TokenID.LimFixed id:407 gh:408 export var staticTokens = new Token[]; export function initializeStaticTokens() { for (var i = 0; i <= TokenID.LimFixed; i++) { @@ -930,7 +930,7 @@ var TypeScript; return RegularExpressionLiteralToken; }(Token)); TypeScript.RegularExpressionLiteralToken = RegularExpressionLiteralToken; - // TODO: new with length TokenID.LimFixed + // TODO: new with length TokenID.LimFixed id:492 gh:493 TypeScript.staticTokens = new Token[]; function initializeStaticTokens() { for (var i = 0; i <= TokenID.LimFixed; i++) { diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 361865816d76a..46f51cbe398fe 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -14,7 +14,7 @@ module TypeScript { public type: Type = null; public flags = ASTFlags.Writeable; - // REVIEW: for diagnostic purposes + // REVIEW: for diagnostic purposes id:403 gh:404 public passCreated: number = CompilerDiagnostics.analysisPass; public preComments: Comment[] = null; @@ -367,7 +367,7 @@ module TypeScript { public addToControlFlow(context: ControlFlowContext): void { super.addToControlFlow(context); - // TODO: add successor as catch block/finally block if present + // TODO: add successor as catch block/finally block if present id:404 gh:405 if (this.nodeType == NodeType.Throw) { context.returnStmt(); } @@ -426,7 +426,7 @@ module TypeScript { return this; case NodeType.Void: - // REVIEW - Although this is good to do for completeness's sake, + // REVIEW - Although this is good to do for completeness's sake, id:746 gh:747 // this shouldn't be strictly necessary from the void operator's // point of view this.operand = typeFlow.typeCheck(this.operand); @@ -837,7 +837,7 @@ module TypeScript { public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { var mod = this.alias.type; - // REVIEW: Only modules may be aliased for now, though there's no real + // REVIEW: Only modules may be aliased for now, though there's no real id:411 gh:412 // restriction on what the type symbol may be if (!this.isDynamicImport || (this.id.sym && !(this.id.sym).onlyReferencedAsTypeRef)) { var prevModAliasId = emitter.modAliasId; @@ -1500,7 +1500,7 @@ module TypeScript { } context.current = afterLoop; condBlock.addSuccessor(afterLoop); - // TODO: check for while (true) and then only continue if afterLoop has predecessors + // TODO: check for while (true) and then only continue if afterLoop has predecessors id:567 gh:568 context.noContinuation = false; context.walker.options.goChildren = false; } @@ -1553,7 +1553,7 @@ module TypeScript { var loopEnd = context.current; loopEnd.addSuccessor(loopStart); context.addContent(this.cond); - // TODO: check for while (true) + // TODO: check for while (true) id:406 gh:407 context.current = afterLoop; loopEnd.addSuccessor(afterLoop); } @@ -2038,12 +2038,12 @@ module TypeScript { return this; } - // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) + // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) id:408 gh:409 // for now, assume all cases are reachable, regardless of whether some cases fall through public addToControlFlow(context: ControlFlowContext) { var execBlock = new BasicBlock(); var sw = context.currentSwitch[context.currentSwitch.length - 1]; - // TODO: fall-through from previous (+ to end of switch) + // TODO: fall-through from previous (+ to end of switch) id:747 gh:748 if (this.expr) { var exprBlock = new BasicBlock(); context.current = exprBlock; @@ -2283,7 +2283,7 @@ module TypeScript { this.body = typeFlow.typeCheck(this.body); // if we're in provisional typecheck mode, clean up the symbol entry - // REVIEW: This is obviously bad form, since we're counting on the internal + // REVIEW: This is obviously bad form, since we're counting on the internal id:415 gh:416 // layout of the symbol table, but this is also the only place where we insert // symbols during typecheck if (typeFlow.checker.inProvisionalTypecheckMode()) { @@ -2395,7 +2395,7 @@ var TypeScript; _this.nodeType = nodeType; _this.type = null; _this.flags = ASTFlags.Writeable; - // REVIEW: for diagnostic purposes + // REVIEW: for diagnostic purposes id:568 gh:569 _this.passCreated = CompilerDiagnostics.analysisPass; _this.preComments = null; _this.postComments = null; @@ -2729,7 +2729,7 @@ var TypeScript; } UnaryExpression.prototype.addToControlFlow = function (context) { _super.prototype.addToControlFlow.call(this, context); - // TODO: add successor as catch block/finally block if present + // TODO: add successor as catch block/finally block if present id:409 gh:410 if (this.nodeType == NodeType.Throw) { context.returnStmt(); } @@ -2775,7 +2775,7 @@ var TypeScript; this.type = this.castTerm.type; return this; case NodeType.Void: - // REVIEW - Although this is good to do for completeness's sake, + // REVIEW - Although this is good to do for completeness's sake, id:410 gh:411 // this shouldn't be strictly necessary from the void operator's // point of view this.operand = typeFlow.typeCheck(this.operand); @@ -3186,7 +3186,7 @@ var TypeScript; ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { var mod = this.alias.type; - // REVIEW: Only modules may be aliased for now, though there's no real + // REVIEW: Only modules may be aliased for now, though there's no real id:748 gh:749 // restriction on what the type symbol may be if (!this.isDynamicImport || (this.id.sym && !this.id.sym.onlyReferencedAsTypeRef)) { var prevModAliasId = emitter.modAliasId; @@ -3814,7 +3814,7 @@ var TypeScript; } context.current = afterLoop; condBlock.addSuccessor(afterLoop); - // TODO: check for while (true) and then only continue if afterLoop has predecessors + // TODO: check for while (true) and then only continue if afterLoop has predecessors id:419 gh:420 context.noContinuation = false; context.walker.options.goChildren = false; }; @@ -3866,7 +3866,7 @@ var TypeScript; var loopEnd = context.current; loopEnd.addSuccessor(loopStart); context.addContent(this.cond); - // TODO: check for while (true) + // TODO: check for while (true) id:569 gh:570 context.current = afterLoop; loopEnd.addSuccessor(afterLoop); } @@ -4333,12 +4333,12 @@ var TypeScript; this.type = typeFlow.voidType; return this; }; - // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) + // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) id:412 gh:413 // for now, assume all cases are reachable, regardless of whether some cases fall through CaseStatement.prototype.addToControlFlow = function (context) { var execBlock = new BasicBlock(); var sw = context.currentSwitch[context.currentSwitch.length - 1]; - // TODO: fall-through from previous (+ to end of switch) + // TODO: fall-through from previous (+ to end of switch) id:414 gh:415 if (this.expr) { var exprBlock = new BasicBlock(); context.current = exprBlock; @@ -4576,7 +4576,7 @@ var TypeScript; typeFlow.scope.enter(exceptVar.symbol.container, this.param, exceptVar.symbol, typeFlow.checker.errorReporter, false, false, false); this.body = typeFlow.typeCheck(this.body); // if we're in provisional typecheck mode, clean up the symbol entry - // REVIEW: This is obviously bad form, since we're counting on the internal + // REVIEW: This is obviously bad form, since we're counting on the internal id:749 gh:750 // layout of the symbol table, but this is also the only place where we insert // symbols during typecheck if (typeFlow.checker.inProvisionalTypecheckMode()) { diff --git a/tests/baselines/reference/parserRealSource12.js b/tests/baselines/reference/parserRealSource12.js index 18cb042f36d3b..5a5d39e62f102 100644 --- a/tests/baselines/reference/parserRealSource12.js +++ b/tests/baselines/reference/parserRealSource12.js @@ -518,7 +518,7 @@ module TypeScript { } export function walkLabelChildren(preAst: Label, parent: AST, walker: IAstWalker): void { - //TODO: Walk "id"? + //TODO: Walk "id"? id:422 gh:423 } export function walkLabeledStatementChildren(preAst: LabeledStatement, parent: AST, walker: IAstWalker): void { @@ -1018,7 +1018,7 @@ var TypeScript; } ChildrenWalkers.walkWithStatementChildren = walkWithStatementChildren; function walkLabelChildren(preAst, parent, walker) { - //TODO: Walk "id"? + //TODO: Walk "id"? id:570 gh:571 } ChildrenWalkers.walkLabelChildren = walkLabelChildren; function walkLabeledStatementChildren(preAst, parent, walker) { diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index e72435c775b59..80ed7b20657c6 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -453,7 +453,7 @@ module TypeScript { // inside a comment, because the "class" AST node has a limChar corresponding to the position of // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. + //TODO: It would be nice to be able to get rid of this. id:417 gh:418 DontPruneSearchBasedOnPosition = 1 << 1, } @@ -495,7 +495,7 @@ module TypeScript { var limChar = cur.limChar + (inclusive ? 1 : 0) if (pos >= minChar && pos < limChar) { - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better id:418 gh:419 // than top of the stack. var previous = ctx.path.ast(); if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { @@ -967,7 +967,7 @@ var TypeScript; // inside a comment, because the "class" AST node has a limChar corresponding to the position of // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. + //TODO: It would be nice to be able to get rid of this. id:750 gh:751 GetAstPathOptions[GetAstPathOptions["DontPruneSearchBasedOnPosition"] = 2] = "DontPruneSearchBasedOnPosition"; })(GetAstPathOptions = TypeScript.GetAstPathOptions || (TypeScript.GetAstPathOptions = {})); /// @@ -1004,7 +1004,7 @@ var TypeScript; var minChar = cur.minChar; var limChar = cur.limChar + (inclusive ? 1 : 0); if (pos >= minChar && pos < limChar) { - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better id:425 gh:426 // than top of the stack. var previous = ctx.path.ast(); if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { diff --git a/tests/baselines/reference/parserRealSource2.js b/tests/baselines/reference/parserRealSource2.js index 2028cbd4efe35..80a15ad4a0deb 100644 --- a/tests/baselines/reference/parserRealSource2.js +++ b/tests/baselines/reference/parserRealSource2.js @@ -45,7 +45,7 @@ module TypeScript { Func = 1 << 28, // FUNCTION EOF = 1 << 29, // EOF - // REVIEW: Name this something clearer. + // REVIEW: Name this something clearer. id:571 gh:572 TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, @@ -89,7 +89,7 @@ module TypeScript { PossibleOptionalParameter = 1 << 8, ClassBaseConstructorCall = 1 << 9, OptionalName = 1 << 10, - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. id:420 gh:421 // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. // Once we have a better way to associate information with nodes, this flag should not be used. SkipNextRParen = 1 << 11, @@ -316,7 +316,7 @@ var TypeScript; ErrorRecoverySet[ErrorRecoverySet["RLit"] = 134217728] = "RLit"; ErrorRecoverySet[ErrorRecoverySet["Func"] = 268435456] = "Func"; ErrorRecoverySet[ErrorRecoverySet["EOF"] = 536870912] = "EOF"; - // REVIEW: Name this something clearer. + // REVIEW: Name this something clearer. id:421 gh:422 ErrorRecoverySet[ErrorRecoverySet["TypeScriptS"] = 1073741824] = "TypeScriptS"; ErrorRecoverySet[ErrorRecoverySet["ExprStart"] = 520158210] = "ExprStart"; ErrorRecoverySet[ErrorRecoverySet["StmtStart"] = 1608580098] = "StmtStart"; @@ -359,7 +359,7 @@ var TypeScript; ASTFlags[ASTFlags["PossibleOptionalParameter"] = 256] = "PossibleOptionalParameter"; ASTFlags[ASTFlags["ClassBaseConstructorCall"] = 512] = "ClassBaseConstructorCall"; ASTFlags[ASTFlags["OptionalName"] = 1024] = "OptionalName"; - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. id:751 gh:752 // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. // Once we have a better way to associate information with nodes, this flag should not be used. ASTFlags[ASTFlags["SkipNextRParen"] = 2048] = "SkipNextRParen"; diff --git a/tests/baselines/reference/parserRealSource4.js b/tests/baselines/reference/parserRealSource4.js index 0851b867c276c..7265aded118c1 100644 --- a/tests/baselines/reference/parserRealSource4.js +++ b/tests/baselines/reference/parserRealSource4.js @@ -113,7 +113,7 @@ module TypeScript { // The resident table is expected to reference the same table object, whereas the // transientTable may reference different objects over time - // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null + // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null id:427 gh:428 export class DualStringHashTable implements IHashTable { public insertPrimary = true; @@ -392,7 +392,7 @@ var TypeScript; TypeScript.StringHashTable = StringHashTable; // The resident table is expected to reference the same table object, whereas the // transientTable may reference different objects over time - // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null + // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null id:572 gh:573 var DualStringHashTable = /** @class */ (function () { function DualStringHashTable(primaryTable, secondaryTable) { this.primaryTable = primaryTable; diff --git a/tests/baselines/reference/parserRealSource5.js b/tests/baselines/reference/parserRealSource5.js index 834371a0dc8a0..56a1a4569f63b 100644 --- a/tests/baselines/reference/parserRealSource5.js +++ b/tests/baselines/reference/parserRealSource5.js @@ -5,7 +5,7 @@ /// module TypeScript { - // TODO: refactor indent logic for use in emit + // TODO: refactor indent logic for use in emit id:423 gh:424 export class PrintContext { public builder = ""; public indent1 = " "; @@ -72,7 +72,7 @@ module TypeScript { /// var TypeScript; (function (TypeScript) { - // TODO: refactor indent logic for use in emit + // TODO: refactor indent logic for use in emit id:424 gh:425 var PrintContext = /** @class */ (function () { function PrintContext(outfile, parser) { this.outfile = outfile; diff --git a/tests/baselines/reference/parserRealSource7.js b/tests/baselines/reference/parserRealSource7.js index c3938341017b8..e262b64ebbca4 100644 --- a/tests/baselines/reference/parserRealSource7.js +++ b/tests/baselines/reference/parserRealSource7.js @@ -155,7 +155,7 @@ module TypeScript { var importDecl = ast; var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported); - // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers + // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers id:752 gh:753 var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: context }); var isGlobal = context.scopeChain.container == context.checker.gloMod; @@ -267,7 +267,7 @@ module TypeScript { if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } - // REVIEW: If multiple disparate module decls for the same module don't agree + // REVIEW: If multiple disparate module decls for the same module don't agree id:429 gh:430 // in export privileges, how should we handle it? if (isExported) { typeSymbol.flags |= SymbolFlags.Exported; @@ -436,7 +436,7 @@ module TypeScript { context.checker.locationInfo.unitIndex, interfaceType); interfaceType.symbol = interfaceSymbol; - // REVIEW: Shouldn't allocate another table for interface privates + // REVIEW: Shouldn't allocate another table for interface privates id:573 gh:574 interfaceType.members = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceType.ambientMembers = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceSymbol.declAST = interfaceDecl; @@ -464,7 +464,7 @@ module TypeScript { if (!alreadyInScope) { context.scopeChain.scope.enter(context.scopeChain.container, ast, - interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient + interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient id:426 gh:427 } pushTypeCollectionScope(interfaceSymbol, interfaceType.members, interfaceType.ambientMembers, null, null, context, interfaceType, null, null); @@ -578,7 +578,7 @@ module TypeScript { export function preCollectFuncDeclTypes(ast: AST, parent: AST, context: TypeCollectionContext) { var scopeChain = context.scopeChain; - // REVIEW: This will have to change when we move to "export" + // REVIEW: This will have to change when we move to "export" id:428 gh:429 if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } @@ -627,7 +627,7 @@ module TypeScript { fgSym = containerSym.type.members.allMembers.lookup(nameText); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:753 gh:754 fgSym = containerScope.findLocal(nameText, false, false); // If we could not find the function symbol in the value context, look @@ -651,7 +651,7 @@ module TypeScript { } // a function with this symbol has not yet been declared in this scope - // REVIEW: In the code below, we need to ensure that only function overloads are considered + // REVIEW: In the code below, we need to ensure that only function overloads are considered id:432 gh:433 // (E.g., if a vardecl has the same id as a function or class, we may use the vardecl symbol // as the overload.) Defensively, however, the vardecl won't have a type yet, so it should // suffice to just check for a null type when considering the overload symbol in @@ -715,7 +715,7 @@ module TypeScript { } } - // REVIEW: Move this check into the typecheck phase? It's only being run over properties... + // REVIEW: Move this check into the typecheck phase? It's only being run over properties... id:574 gh:575 if (fgSym && !fgSym.isAccessor() && fgSym.type && @@ -739,7 +739,7 @@ module TypeScript { } funcDecl.type.symbol.declAST = ast; - if (funcDecl.isConstructor) { // REVIEW: Remove when classes completely replace oldclass + if (funcDecl.isConstructor) { // REVIEW: Remove when classes completely replace oldclass id:430 gh:431 go = true; }; } @@ -961,7 +961,7 @@ var TypeScript; var modType = null; var importDecl = ast; var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported); - // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers + // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers id:431 gh:432 var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: context }); var isGlobal = context.scopeChain.container == context.checker.gloMod; if (aliasedModSymbol) { @@ -1048,7 +1048,7 @@ var TypeScript; if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } - // REVIEW: If multiple disparate module decls for the same module don't agree + // REVIEW: If multiple disparate module decls for the same module don't agree id:754 gh:755 // in export privileges, how should we handle it? if (isExported) { typeSymbol.flags |= SymbolFlags.Exported; @@ -1179,7 +1179,7 @@ var TypeScript; interfaceType = new Type(); interfaceSymbol = new TypeSymbol(interfaceName, ast.minChar, context.checker.locationInfo.unitIndex, interfaceType); interfaceType.symbol = interfaceSymbol; - // REVIEW: Shouldn't allocate another table for interface privates + // REVIEW: Shouldn't allocate another table for interface privates id:435 gh:436 interfaceType.members = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceType.ambientMembers = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceSymbol.declAST = interfaceDecl; @@ -1201,7 +1201,7 @@ var TypeScript; interfaceSymbol.flags |= SymbolFlags.ModuleMember; } if (!alreadyInScope) { - context.scopeChain.scope.enter(context.scopeChain.container, ast, interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient + context.scopeChain.scope.enter(context.scopeChain.container, ast, interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient id:575 gh:576 } pushTypeCollectionScope(interfaceSymbol, interfaceType.members, interfaceType.ambientMembers, null, null, context, interfaceType, null, null); return true; @@ -1288,7 +1288,7 @@ var TypeScript; TypeScript.preCollectVarDeclTypes = preCollectVarDeclTypes; function preCollectFuncDeclTypes(ast, parent, context) { var scopeChain = context.scopeChain; - // REVIEW: This will have to change when we move to "export" + // REVIEW: This will have to change when we move to "export" id:434 gh:435 if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } @@ -1331,7 +1331,7 @@ var TypeScript; fgSym = containerSym.type.members.allMembers.lookup(nameText); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:433 gh:434 fgSym = containerScope.findLocal(nameText, false, false); // If we could not find the function symbol in the value context, look // in the type context. @@ -1351,7 +1351,7 @@ var TypeScript; } } // a function with this symbol has not yet been declared in this scope - // REVIEW: In the code below, we need to ensure that only function overloads are considered + // REVIEW: In the code below, we need to ensure that only function overloads are considered id:755 gh:756 // (E.g., if a vardecl has the same id as a function or class, we may use the vardecl symbol // as the overload.) Defensively, however, the vardecl won't have a type yet, so it should // suffice to just check for a null type when considering the overload symbol in @@ -1407,7 +1407,7 @@ var TypeScript; } } } - // REVIEW: Move this check into the typecheck phase? It's only being run over properties... + // REVIEW: Move this check into the typecheck phase? It's only being run over properties... id:438 gh:439 if (fgSym && !fgSym.isAccessor() && fgSym.type && diff --git a/tests/baselines/reference/parserRealSource8.js b/tests/baselines/reference/parserRealSource8.js index 95e8a421fc83c..f87a08e007389 100644 --- a/tests/baselines/reference/parserRealSource8.js +++ b/tests/baselines/reference/parserRealSource8.js @@ -190,7 +190,7 @@ module TypeScript { // if this is not a method, but enclosed by class, use constructor as // the enclosing scope - // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed + // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed id:576 gh:577 // - if it's a new class, always use the contained scope, since we initialize the constructor scope below if (context.scopeChain.thisType && (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { @@ -264,7 +264,7 @@ module TypeScript { } } - // REVIEW: We don't search for another sym for accessors to prevent us from + // REVIEW: We don't search for another sym for accessors to prevent us from id:436 gh:437 // accidentally coalescing function signatures with the same name (E.g., a function // 'f' the outer scope and a setter 'f' in an object literal within that scope) if (nameText && nameText != "__missing" && !funcDecl.isAccessor()) { @@ -272,7 +272,7 @@ module TypeScript { fgSym = funcScope.findLocal(nameText, false, false); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:437 gh:438 fgSym = funcScope.findLocal(nameText, false, false); } } @@ -316,7 +316,7 @@ module TypeScript { var ambientFuncStaticTable = new StringHashTable(); var ambientFuncStaticMembers = new ScopedMembers(new DualStringHashTable(ambientFuncStaticTable, new StringHashTable())); - // REVIEW: Is it a problem that this is being set twice for properties and constructors? + // REVIEW: Is it a problem that this is being set twice for properties and constructors? id:756 gh:757 funcDecl.unitIndex = context.typeFlow.checker.locationInfo.unitIndex; var locals = new SymbolScopeBuilder(funcMembers, ambientFuncMembers, null, null, parentScope, localContainer); @@ -379,7 +379,7 @@ module TypeScript { export function preAssignCatchScopes(ast: AST, context: AssignScopeContext) { var catchBlock = ast; if (catchBlock.param) { - var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? + var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? id:441 gh:442 var catchLocals = new SymbolScopeBuilder(catchTable, null, null, null, context.scopeChain.scope, context.scopeChain.scope.container); catchBlock.containedScope = catchLocals; @@ -630,7 +630,7 @@ var TypeScript; var parentScope = isInnerStatic ? context.scopeChain.fnc.type.memberScope : context.scopeChain.scope; // if this is not a method, but enclosed by class, use constructor as // the enclosing scope - // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed + // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed id:577 gh:578 // - if it's a new class, always use the contained scope, since we initialize the constructor scope below if (context.scopeChain.thisType && (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { @@ -697,7 +697,7 @@ var TypeScript; funcScope = context.scopeChain.scope; } } - // REVIEW: We don't search for another sym for accessors to prevent us from + // REVIEW: We don't search for another sym for accessors to prevent us from id:439 gh:440 // accidentally coalescing function signatures with the same name (E.g., a function // 'f' the outer scope and a setter 'f' in an object literal within that scope) if (nameText && nameText != "__missing" && !funcDecl.isAccessor()) { @@ -705,7 +705,7 @@ var TypeScript; fgSym = funcScope.findLocal(nameText, false, false); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:440 gh:441 fgSym = funcScope.findLocal(nameText, false, false); } } @@ -739,7 +739,7 @@ var TypeScript; var funcStaticMembers = new ScopedMembers(new DualStringHashTable(funcStaticTable, new StringHashTable())); var ambientFuncStaticTable = new StringHashTable(); var ambientFuncStaticMembers = new ScopedMembers(new DualStringHashTable(ambientFuncStaticTable, new StringHashTable())); - // REVIEW: Is it a problem that this is being set twice for properties and constructors? + // REVIEW: Is it a problem that this is being set twice for properties and constructors? id:757 gh:758 funcDecl.unitIndex = context.typeFlow.checker.locationInfo.unitIndex; var locals = new SymbolScopeBuilder(funcMembers, ambientFuncMembers, null, null, parentScope, localContainer); var statics = new SymbolScopeBuilder(funcStaticMembers, ambientFuncStaticMembers, null, null, parentScope, null); @@ -790,7 +790,7 @@ var TypeScript; function preAssignCatchScopes(ast, context) { var catchBlock = ast; if (catchBlock.param) { - var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? + var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? id:445 gh:446 var catchLocals = new SymbolScopeBuilder(catchTable, null, null, null, context.scopeChain.scope, context.scopeChain.scope.container); catchBlock.containedScope = catchLocals; pushAssignScope(catchLocals, context, context.scopeChain.thisType, context.scopeChain.classType, context.scopeChain.fnc); diff --git a/tests/baselines/reference/parserRealSource9.js b/tests/baselines/reference/parserRealSource9.js index 0a64f8153b928..451fc94be4a27 100644 --- a/tests/baselines/reference/parserRealSource9.js +++ b/tests/baselines/reference/parserRealSource9.js @@ -99,8 +99,8 @@ module TypeScript { if (type.hasMembers()) { var members = type.members; var ambientMembers = type.ambientMembers; - var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? - var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? + var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? id:578 gh:579 + var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? id:443 gh:444 var memberScope = new SymbolTableScope(members, ambientMembers, typeMembers, ambientTypeMembers, type.symbol); var agg = new SymbolAggregateScope(type.symbol); var prevCurrentModDecl = this.checker.currentModDecl; @@ -112,7 +112,7 @@ module TypeScript { this.checker.inBind = true; } if (members) { - this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? + this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? id:442 gh:443 } if (typeMembers) { this.bind(agg, typeMembers.allMembers); @@ -301,8 +301,8 @@ var TypeScript; if (type.hasMembers()) { var members = type.members; var ambientMembers = type.ambientMembers; - var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? - var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? + var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? id:758 gh:759 + var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? id:448 gh:449 var memberScope = new SymbolTableScope(members, ambientMembers, typeMembers, ambientTypeMembers, type.symbol); var agg = new SymbolAggregateScope(type.symbol); var prevCurrentModDecl = this.checker.currentModDecl; @@ -314,7 +314,7 @@ var TypeScript; this.checker.inBind = true; } if (members) { - this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? + this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? id:579 gh:580 } if (typeMembers) { this.bind(agg, typeMembers.allMembers); diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index 3d35062bfc21a..6061439d37d6c 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -16,7 +16,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS //CHECK#1 eval("\u00A0var x\u00A0= 1\u00A0"); if (x !== 1) { - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:446 gh:447 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } @@ -24,7 +24,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS //CHECK#2  var x = 1 ; if (x !== 1) { - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:444 gh:445 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.symbols b/tests/baselines/reference/parserS7.2_A1.5_T2.symbols index 563bd6c653499..703bf09e26caf 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.symbols +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.symbols @@ -16,7 +16,7 @@ eval("\u00A0var x\u00A0= 1\u00A0"); if (x !== 1) { >x : Symbol(x, Decl(parserS7.2_A1.5_T2.ts, 17, 4)) - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:759 gh:760 >x : Symbol(x, Decl(parserS7.2_A1.5_T2.ts, 17, 4)) } @@ -27,7 +27,7 @@ if (x !== 1) { if (x !== 1) { >x : Symbol(x, Decl(parserS7.2_A1.5_T2.ts, 17, 4)) - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:450 gh:451 >x : Symbol(x, Decl(parserS7.2_A1.5_T2.ts, 17, 4)) } diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.types b/tests/baselines/reference/parserS7.2_A1.5_T2.types index 765db23a0a89e..dbf69b1f6c7dd 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.types +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.types @@ -20,11 +20,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ->$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)) : any + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:581 gh:582 +>$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)) : any id:449 gh:450 >$ERROR : any ->'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x) : string ->'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' : "#1: eval(\"\\u00A0var x\\u00A0= 1\\u00A0\"); x === 1. Actual: " +>'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x) : string id:447 gh:448 +>'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' : "#1: eval(\"\\u00A0var x\\u00A0= 1\\u00A0\"); x === 1. Actual: " id:760 gh:761 >(x) : number >x : number } @@ -39,11 +39,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ->$ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)) : any + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:453 gh:454 +>$ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)) : any id:583 gh:584 >$ERROR : any ->'#2:  var x = 1 ; x === 1. Actual: ' + (x) : string ->'#2:  var x = 1 ; x === 1. Actual: ' : "#2:  var x = 1 ; x === 1. Actual: " +>'#2: var x = 1 ; x === 1. Actual: ' + (x) : string id:452 gh:453 +>'#2: var x = 1 ; x === 1. Actual: ' : "#2:  var x = 1 ; x === 1. Actual: " id:451 gh:452 >(x) : number >x : number } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index d4131cc799d69..9fa661cd33ce0 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -18,7 +18,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS = 1; if (x !== 1) { - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:761 gh:762 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.symbols b/tests/baselines/reference/parserS7.3_A1.1_T2.symbols index 60f0ecac13d05..508e7e9f46386 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.symbols +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.symbols @@ -19,7 +19,7 @@ x if (x !== 1) { >x : Symbol(x, Decl(parserS7.3_A1.1_T2.ts, 11, 3)) - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:456 gh:457 >x : Symbol(x, Decl(parserS7.3_A1.1_T2.ts, 11, 3)) } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.types b/tests/baselines/reference/parserS7.3_A1.1_T2.types index b11756feceecc..6b202058df0d4 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.types +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.types @@ -23,11 +23,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ->$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)) : any + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:585 gh:586 +>$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)) : any id:455 gh:456 >$ERROR : any ->'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x) : string ->'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' : "#1: var\\nx\\n=\\n1\\n; x === 1. Actual: " +>'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x) : string id:454 gh:455 +>'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' : "#1: var\\nx\\n=\\n1\\n; x === 1. Actual: " id:762 gh:763 >(x) : number >x : number } diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 6be17492731c8..dc51a8105973e 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -838,7 +838,7 @@ module Harness { return this.compilesOk(testCode); } - // TODO: Find an implementation of isIdenticalTo that works. + // TODO: Find an implementation of isIdenticalTo that works. id:459 gh:460 //public isIdenticalTo(other: Type) { // var testCode = 'module __test1__ {\n'; // testCode += ' ' + this.code + ';\n'; @@ -1081,7 +1081,7 @@ module Harness { name = !(ast).name ? "" : (ast).name.actualText; // name == null for lambdas break; default: - // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) + // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) id:587 gh:588 var a = ast; name = (a.id) ? (a.id.actualText) : (a.name) ? a.name.actualText : (a.text) ? a.text : ''; break; @@ -1265,7 +1265,7 @@ module Harness { } } if (!script) { - // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up + // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up id:458 gh:459 // but without it subsequent tests are treated as edits, making for somewhat useful stress testing // of persistent typecheck state //compiler.addUnit("", uName, isResident, references); // equivalent to compiler.deleteUnit(...) @@ -1359,7 +1359,7 @@ module Harness { var errors; if (usePull) { - // TODO: no emit support with pull yet + // TODO: no emit support with pull yet id:457 gh:458 errors = compiler.pullGetErrorsForFile(uName); emit(stdout, true); } @@ -1387,7 +1387,7 @@ module Harness { } else { var addedFiles = []; var precompile = () => { - // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? + // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? id:763 gh:764 // easy enough to do if so, prefer to avoid the recreate cost until it proves to be an issue dependencies.forEach(dep => { addUnit(dep.content, dep.name, false, Harness.Compiler.isDeclareFile(dep.name)); @@ -2797,7 +2797,7 @@ var Harness; testCode += '}\n'; return this.compilesOk(testCode); }; - // TODO: Find an implementation of isIdenticalTo that works. + // TODO: Find an implementation of isIdenticalTo that works. id:462 gh:463 //public isIdenticalTo(other: Type) { // var testCode = 'module __test1__ {\n'; // testCode += ' ' + this.code + ';\n'; @@ -3007,7 +3007,7 @@ var Harness; name = !ast.name ? "" : ast.name.actualText; // name == null for lambdas break; default: - // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) + // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) id:589 gh:590 var a = ast; name = (a.id) ? (a.id.actualText) : (a.name) ? a.name.actualText : (a.text) ? a.text : ''; break; @@ -3167,7 +3167,7 @@ var Harness; } } if (!script) { - // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up + // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up id:461 gh:462 // but without it subsequent tests are treated as edits, making for somewhat useful stress testing // of persistent typecheck state //compiler.addUnit("", uName, isResident, references); // equivalent to compiler.deleteUnit(...) @@ -3252,7 +3252,7 @@ var Harness; compile(code, uName); var errors; if (Harness.usePull) { - // TODO: no emit support with pull yet + // TODO: no emit support with pull yet id:460 gh:461 errors = compiler.pullGetErrorsForFile(uName); emit(stdout, true); } @@ -3279,7 +3279,7 @@ var Harness; else { var addedFiles = []; var precompile = function () { - // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? + // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? id:764 gh:765 // easy enough to do if so, prefer to avoid the recreate cost until it proves to be an issue dependencies.forEach(function (dep) { addUnit(dep.content, dep.name, false, Harness.Compiler.isDeclareFile(dep.name)); diff --git a/tests/baselines/reference/promiseType.symbols b/tests/baselines/reference/promiseType.symbols index 5eea680f9fb7c..e72522de76d00 100644 --- a/tests/baselines/reference/promiseType.symbols +++ b/tests/baselines/reference/promiseType.symbols @@ -157,9 +157,7 @@ async function I() { } } -// addresses github issue #4903: - -const p00 = p.catch(); +// addresses github issue #4903: const p00 = p.catch(); id:466 gh:468 >p00 : Symbol(p00, Decl(promiseType.ts, 84, 5)) >p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) diff --git a/tests/baselines/reference/promiseType.types b/tests/baselines/reference/promiseType.types index 3228d266319f5..e042adacda291 100644 --- a/tests/baselines/reference/promiseType.types +++ b/tests/baselines/reference/promiseType.types @@ -178,9 +178,7 @@ async function I() { } } -// addresses github issue #4903: - -const p00 = p.catch(); +// addresses github issue #4903: const p00 = p.catch(); id:591 gh:592 >p00 : Promise >p.catch() : Promise >p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise diff --git a/tests/baselines/reference/promiseTypeStrictNull.symbols b/tests/baselines/reference/promiseTypeStrictNull.symbols index 3fabb7f16b766..6f613a63f8f79 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.symbols +++ b/tests/baselines/reference/promiseTypeStrictNull.symbols @@ -157,9 +157,7 @@ async function I() { } } -// addresses github issue #4903: - -const p00 = p.catch(); +// addresses github issue #4903: const p00 = p.catch(); id:465 gh:466 >p00 : Symbol(p00, Decl(promiseTypeStrictNull.ts, 84, 5)) >p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) diff --git a/tests/baselines/reference/promiseTypeStrictNull.types b/tests/baselines/reference/promiseTypeStrictNull.types index 7bb75ec66f234..727f625764e3f 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.types +++ b/tests/baselines/reference/promiseTypeStrictNull.types @@ -178,9 +178,7 @@ async function I() { } } -// addresses github issue #4903: - -const p00 = p.catch(); +// addresses github issue #4903: const p00 = p.catch(); id:463 gh:464 >p00 : Promise >p.catch() : Promise >p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 97d580c9b4b0c..6cb8e585235ff 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -16,7 +16,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error //CHECK#1 eval("\u00A0var x\u00A0= 1\u00A0"); if (x !== 1) { - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:765 gh:766 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } @@ -24,7 +24,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error //CHECK#2  var x = 1 ; if (x !== 1) { - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:470 gh:471 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.symbols b/tests/baselines/reference/scannerS7.2_A1.5_T2.symbols index 3fed17b678185..5b53c128bac95 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.symbols +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.symbols @@ -16,7 +16,7 @@ eval("\u00A0var x\u00A0= 1\u00A0"); if (x !== 1) { >x : Symbol(x, Decl(scannerS7.2_A1.5_T2.ts, 17, 4)) - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:593 gh:594 >x : Symbol(x, Decl(scannerS7.2_A1.5_T2.ts, 17, 4)) } @@ -27,7 +27,7 @@ if (x !== 1) { if (x !== 1) { >x : Symbol(x, Decl(scannerS7.2_A1.5_T2.ts, 17, 4)) - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:469 gh:467 >x : Symbol(x, Decl(scannerS7.2_A1.5_T2.ts, 17, 4)) } diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.types b/tests/baselines/reference/scannerS7.2_A1.5_T2.types index c5e3a82240b16..5382e021f1a04 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.types +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.types @@ -20,11 +20,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ->$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)) : any + $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); id:467 gh:469 +>$ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)) : any id:766 gh:767 >$ERROR : any ->'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x) : string ->'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' : "#1: eval(\"\\u00A0var x\\u00A0= 1\\u00A0\"); x === 1. Actual: " +>'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x) : string id:473 gh:474 +>'#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' : "#1: eval(\"\\u00A0var x\\u00A0= 1\\u00A0\"); x === 1. Actual: " id:595 gh:596 >(x) : number >x : number } @@ -39,11 +39,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ->$ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)) : any + $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)); id:472 gh:473 +>$ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x)) : any id:471 gh:472 >$ERROR : any ->'#2:  var x = 1 ; x === 1. Actual: ' + (x) : string ->'#2:  var x = 1 ; x === 1. Actual: ' : "#2:  var x = 1 ; x === 1. Actual: " +>'#2: var x = 1 ; x === 1. Actual: ' + (x) : string id:767 gh:768 +>'#2: var x = 1 ; x === 1. Actual: ' : "#2:  var x = 1 ; x === 1. Actual: " id:477 gh:478 >(x) : number >x : number } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 186427f5de957..50b310fcc0bcf 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -18,7 +18,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error = 1; if (x !== 1) { - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:597 gh:598 ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.symbols b/tests/baselines/reference/scannerS7.3_A1.1_T2.symbols index f4ee039644b0e..b2b6e529e9b19 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.symbols +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.symbols @@ -19,7 +19,7 @@ x if (x !== 1) { >x : Symbol(x, Decl(scannerS7.3_A1.1_T2.ts, 11, 3)) - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:476 gh:477 >x : Symbol(x, Decl(scannerS7.3_A1.1_T2.ts, 11, 3)) } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.types b/tests/baselines/reference/scannerS7.3_A1.1_T2.types index 4963abbc1c529..49e4a9990385c 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.types +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.types @@ -23,11 +23,11 @@ if (x !== 1) { >x : number >1 : 1 - $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ->$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)) : any + $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); id:475 gh:476 +>$ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)) : any id:768 gh:769 >$ERROR : any ->'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x) : string ->'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' : "#1: var\\nx\\n=\\n1\\n; x === 1. Actual: " +>'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x) : string id:481 gh:482 +>'#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' : "#1: var\\nx\\n=\\n1\\n; x === 1. Actual: " id:599 gh:600 >(x) : number >x : number } diff --git a/tests/baselines/reference/thisTypeInFunctions.js b/tests/baselines/reference/thisTypeInFunctions.js index 36ce0574a5dd9..0226a64cb452d 100644 --- a/tests/baselines/reference/thisTypeInFunctions.js +++ b/tests/baselines/reference/thisTypeInFunctions.js @@ -120,7 +120,7 @@ c.explicitC = m => m + this.n; c.explicitThis = m => m + this.n; c.explicitProperty = m => m + this.n; -//NOTE: this=C here, I guess? +//NOTE: this=C here, I guess? id:479 gh:480 c.explicitThis = explicitCFunction; c.explicitThis = function(this: C, m: number) { return this.n + m }; @@ -316,7 +316,7 @@ c.explicitProperty = function (m) { return m; }; c.explicitC = function (m) { return m + _this.n; }; c.explicitThis = function (m) { return m + _this.n; }; c.explicitProperty = function (m) { return m + _this.n; }; -//NOTE: this=C here, I guess? +//NOTE: this=C here, I guess? id:480 gh:481 c.explicitThis = explicitCFunction; c.explicitThis = function (m) { return this.n + m; }; // this:any compatibility diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.js b/tests/baselines/reference/thisTypeInFunctionsNegative.js index 541bcd2ad3678..913eab5355a4a 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.js +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.js @@ -32,7 +32,7 @@ interface I { explicitVoid2(this: void): number; explicitStructural(this: {a: number}): number; explicitInterface(this: I): number; - explicitThis(this: this): number; // TODO: Allow `this` types for interfaces + explicitThis(this: this): number; // TODO: Allow `this` types for interfaces id:769 gh:770 } let impl: I = { a: 12, diff --git a/tests/baselines/reference/tsxElementResolution.js b/tests/baselines/reference/tsxElementResolution.js index 5140e1116ced3..d2b3d3b331f79 100644 --- a/tests/baselines/reference/tsxElementResolution.js +++ b/tests/baselines/reference/tsxElementResolution.js @@ -17,7 +17,7 @@ module Dotted { // Should find the intrinsic element, not the class element var a = ; var b = ; -// TODO: This should not be a parse error (should +// TODO: This should not be a parse error (should id:485 gh:486 // parse a property name here, not identifier) // var c = ; var d = ; @@ -47,7 +47,7 @@ var Dotted; // Should find the intrinsic element, not the class element var a = ; var b = ; -// TODO: This should not be a parse error (should +// TODO: This should not be a parse error (should id:601 gh:602 // parse a property name here, not identifier) // var c = ; var d = ; diff --git a/tests/baselines/reference/tsxTypeErrors.js b/tests/baselines/reference/tsxTypeErrors.js index 80ec56592674a..6176eb6288f5b 100644 --- a/tests/baselines/reference/tsxTypeErrors.js +++ b/tests/baselines/reference/tsxTypeErrors.js @@ -22,7 +22,7 @@ class MyClass { } // Let's use it -// TODO: Error on missing 'reqd' +// TODO: Error on missing 'reqd' id:483 gh:484 var b1 = ; // Mistyped attribute member @@ -50,7 +50,7 @@ var MyClass = /** @class */ (function () { return MyClass; }()); // Let's use it -// TODO: Error on missing 'reqd' +// TODO: Error on missing 'reqd' id:506 gh:507 var b1 = ; // Mistyped attribute member // sample.tsx(23,22): error TS2322: Type '{ x: number; y: string; }' is not assignable to type '{ x: number; y: number; }'. diff --git a/tests/cases/compiler/aliasUsedAsNameValue.ts b/tests/cases/compiler/aliasUsedAsNameValue.ts index 2426399252b39..8fe98c4761a7a 100644 --- a/tests/cases/compiler/aliasUsedAsNameValue.ts +++ b/tests/cases/compiler/aliasUsedAsNameValue.ts @@ -12,6 +12,6 @@ import mod = require("./aliasUsedAsNameValue_0"); import b = require("./aliasUsedAsNameValue_1"); export var a = function () { - //var x = mod.id; // TODO needed hack that mod is loaded + //var x = mod.id; // TODO needed hack that mod is loaded id:770 gh:771 b.b(mod); } diff --git a/tests/cases/compiler/arrayConcat3.ts b/tests/cases/compiler/arrayConcat3.ts index d66d488a20d64..5cca287ad495d 100644 --- a/tests/cases/compiler/arrayConcat3.ts +++ b/tests/cases/compiler/arrayConcat3.ts @@ -1,4 +1,4 @@ -// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed +// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed id:488 gh:489 type Fn = (subj: U) => U function doStuff(a: Array>, b: Array>) { b.concat(a); diff --git a/tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts b/tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts index a5a32e535028e..2f1463ad8facc 100644 --- a/tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts +++ b/tests/cases/compiler/commentInNamespaceDeclarationWithIdentifierPathName.ts @@ -2,5 +2,5 @@ { function foo() {} - // TODO, blah + // TODO , blah id:603 gh:604 } \ No newline at end of file diff --git a/tests/cases/compiler/controlFlowPropertyDeclarations.ts b/tests/cases/compiler/controlFlowPropertyDeclarations.ts index 5a5e9fb96bfa0..f7876a7f2d9aa 100644 --- a/tests/cases/compiler/controlFlowPropertyDeclarations.ts +++ b/tests/cases/compiler/controlFlowPropertyDeclarations.ts @@ -5,7 +5,7 @@ declare var require:any; var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); // Populate property map with ReactJS's attribute and property mappings -// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr +// TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr id:486 gh:487 for (var propname in HTMLDOMPropertyConfig.Properties) { if (!HTMLDOMPropertyConfig.Properties.hasOwnProperty(propname)) { continue; diff --git a/tests/cases/compiler/lambdaArgCrash.ts b/tests/cases/compiler/lambdaArgCrash.ts index c2e2bba411730..52b55656c8383 100644 --- a/tests/cases/compiler/lambdaArgCrash.ts +++ b/tests/cases/compiler/lambdaArgCrash.ts @@ -4,7 +4,7 @@ class Event { constructor () { - // TODO: remove + // TODO: remove id:509 gh:510 this._listeners = []; diff --git a/tests/cases/compiler/literalsInComputedProperties1.ts b/tests/cases/compiler/literalsInComputedProperties1.ts index e3fed5b80aab1..74fc8fa5aa6c3 100644 --- a/tests/cases/compiler/literalsInComputedProperties1.ts +++ b/tests/cases/compiler/literalsInComputedProperties1.ts @@ -49,4 +49,4 @@ enum X { let a = X["foo"]; let a0 = X["bar"]; -// TODO: make sure that enum still disallow template literals as member names \ No newline at end of file +// TODO: make sure that enum still disallow template literals as member names id:771 gh:772 \ No newline at end of file diff --git a/tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts b/tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts index c0e25784c1557..3da02dea455c2 100644 --- a/tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts +++ b/tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts @@ -1,5 +1,5 @@ // Symlinks are always resolved for type reference directives. -// NOTE: This test would still compile without errors even if they were not, +// NOTE: This test would still compile without errors even if they were not, id:491 gh:492 // because `processTypeReferenceDirective` also checks for textual equivalence of file contents. // But the `moduleResolutionWithSymlinks_referenceTypes.trace.json` shows the difference. diff --git a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts index 31753a8ac7215..674732a3facb8 100644 --- a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts +++ b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts @@ -837,7 +837,7 @@ module Harness { return this.compilesOk(testCode); } - // TODO: Find an implementation of isIdenticalTo that works. + // TODO: Find an implementation of isIdenticalTo that works. id:605 gh:607 //public isIdenticalTo(other: Type) { // var testCode = 'module __test1__ {\n'; // testCode += ' ' + this.code + ';\n'; @@ -1080,7 +1080,7 @@ module Harness { name = !(ast).name ? "" : (ast).name.actualText; // name == null for lambdas break; default: - // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) + // TODO: is there a reason to mess with all the special cases above and not just do this (ie take whatever property is there and works?) id:490 gh:491 var a = ast; name = (a.id) ? (a.id.actualText) : (a.name) ? a.name.actualText : (a.text) ? a.text : ''; break; @@ -1264,7 +1264,7 @@ module Harness { } } if (!script) { - // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up + // TODO: make this toggleable, shouldn't be necessary once typecheck bugs are cleaned up id:512 gh:513 // but without it subsequent tests are treated as edits, making for somewhat useful stress testing // of persistent typecheck state //compiler.addUnit("", uName, isResident, references); // equivalent to compiler.deleteUnit(...) @@ -1358,7 +1358,7 @@ module Harness { var errors; if (usePull) { - // TODO: no emit support with pull yet + // TODO: no emit support with pull yet id:772 gh:773 errors = compiler.pullGetErrorsForFile(uName); emit(stdout, true); } @@ -1386,7 +1386,7 @@ module Harness { } else { var addedFiles = []; var precompile = () => { - // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? + // REVIEW: if any dependency has a triple slash reference then does postCompile potentially have to do a recreate since we can't update references with updateUnit? id:494 gh:495 // easy enough to do if so, prefer to avoid the recreate cost until it proves to be an issue dependencies.forEach(dep => { addUnit(dep.content, dep.name, false, Harness.Compiler.isDeclareFile(dep.name)); diff --git a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts index 3183bebe93a43..bf704eb65c61e 100644 --- a/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts +++ b/tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts @@ -5,7 +5,7 @@ module.exports.route = function (server) { // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { - // TODO Should render login page that shows auth options + // TODO Should render login page that shows auth options id:607 gh:608 req.redirect("/auth/live"); }); } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts index 31f8e145d3567..aefd824b12e47 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts @@ -445,7 +445,7 @@ module TypeScript { } } - // TODO: new with length TokenID.LimFixed + // TODO: new with length TokenID.LimFixed id:493 gh:494 export var staticTokens = new Token[]; export function initializeStaticTokens() { for (var i = 0; i <= TokenID.LimFixed; i++) { diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts index be3de8f8738d4..d85307831dcf9 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts @@ -13,7 +13,7 @@ module TypeScript { public type: Type = null; public flags = ASTFlags.Writeable; - // REVIEW: for diagnostic purposes + // REVIEW: for diagnostic purposes id:514 gh:515 public passCreated: number = CompilerDiagnostics.analysisPass; public preComments: Comment[] = null; @@ -366,7 +366,7 @@ module TypeScript { public addToControlFlow(context: ControlFlowContext): void { super.addToControlFlow(context); - // TODO: add successor as catch block/finally block if present + // TODO: add successor as catch block/finally block if present id:773 gh:774 if (this.nodeType == NodeType.Throw) { context.returnStmt(); } @@ -425,7 +425,7 @@ module TypeScript { return this; case NodeType.Void: - // REVIEW - Although this is good to do for completeness's sake, + // REVIEW - Although this is good to do for completeness's sake, id:496 gh:497 // this shouldn't be strictly necessary from the void operator's // point of view this.operand = typeFlow.typeCheck(this.operand); @@ -836,7 +836,7 @@ module TypeScript { public emit(emitter: Emitter, tokenId: TokenID, startLine: boolean) { var mod = this.alias.type; - // REVIEW: Only modules may be aliased for now, though there's no real + // REVIEW: Only modules may be aliased for now, though there's no real id:609 gh:610 // restriction on what the type symbol may be if (!this.isDynamicImport || (this.id.sym && !(this.id.sym).onlyReferencedAsTypeRef)) { var prevModAliasId = emitter.modAliasId; @@ -1499,7 +1499,7 @@ module TypeScript { } context.current = afterLoop; condBlock.addSuccessor(afterLoop); - // TODO: check for while (true) and then only continue if afterLoop has predecessors + // TODO: check for while (true) and then only continue if afterLoop has predecessors id:495 gh:496 context.noContinuation = false; context.walker.options.goChildren = false; } @@ -1552,7 +1552,7 @@ module TypeScript { var loopEnd = context.current; loopEnd.addSuccessor(loopStart); context.addContent(this.cond); - // TODO: check for while (true) + // TODO: check for while (true) id:516 gh:517 context.current = afterLoop; loopEnd.addSuccessor(afterLoop); } @@ -2037,12 +2037,12 @@ module TypeScript { return this; } - // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) + // TODO: more reasoning about unreachable cases (such as duplicate literals as case expressions) id:774 gh:775 // for now, assume all cases are reachable, regardless of whether some cases fall through public addToControlFlow(context: ControlFlowContext) { var execBlock = new BasicBlock(); var sw = context.currentSwitch[context.currentSwitch.length - 1]; - // TODO: fall-through from previous (+ to end of switch) + // TODO: fall-through from previous (+ to end of switch) id:498 gh:499 if (this.expr) { var exprBlock = new BasicBlock(); context.current = exprBlock; @@ -2282,7 +2282,7 @@ module TypeScript { this.body = typeFlow.typeCheck(this.body); // if we're in provisional typecheck mode, clean up the symbol entry - // REVIEW: This is obviously bad form, since we're counting on the internal + // REVIEW: This is obviously bad form, since we're counting on the internal id:611 gh:612 // layout of the symbol table, but this is also the only place where we insert // symbols during typecheck if (typeFlow.checker.inProvisionalTypecheckMode()) { diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts index d288dcbc80d82..740761c24e2f9 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts @@ -517,7 +517,7 @@ module TypeScript { } export function walkLabelChildren(preAst: Label, parent: AST, walker: IAstWalker): void { - //TODO: Walk "id"? + //TODO: Walk "id"? id:497 gh:498 } export function walkLabeledStatementChildren(preAst: LabeledStatement, parent: AST, walker: IAstWalker): void { diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts index 451bd9754d5e6..4a6dcfa4bd668 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts @@ -452,7 +452,7 @@ module TypeScript { // inside a comment, because the "class" AST node has a limChar corresponding to the position of // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. + //TODO: It would be nice to be able to get rid of this. id:518 gh:519 DontPruneSearchBasedOnPosition = 1 << 1, } @@ -494,7 +494,7 @@ module TypeScript { var limChar = cur.limChar + (inclusive ? 1 : 0) if (pos >= minChar && pos < limChar) { - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better id:775 gh:776 // than top of the stack. var previous = ctx.path.ast(); if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts index 8d19dee8c7221..5128b1c6bf89e 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts @@ -44,7 +44,7 @@ module TypeScript { Func = 1 << 28, // FUNCTION EOF = 1 << 29, // EOF - // REVIEW: Name this something clearer. + // REVIEW: Name this something clearer. id:500 gh:501 TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, @@ -88,7 +88,7 @@ module TypeScript { PossibleOptionalParameter = 1 << 8, ClassBaseConstructorCall = 1 << 9, OptionalName = 1 << 10, - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. id:613 gh:614 // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. // Once we have a better way to associate information with nodes, this flag should not be used. SkipNextRParen = 1 << 11, diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts index 5c9327a7d2704..e973471e57e9f 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts @@ -112,7 +112,7 @@ module TypeScript { // The resident table is expected to reference the same table object, whereas the // transientTable may reference different objects over time - // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null + // REVIEW: WARNING: For performance reasons, neither the primary nor secondary table may be null id:499 gh:500 export class DualStringHashTable implements IHashTable { public insertPrimary = true; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts index 32b29e574d289..557f0b07e4a8e 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts @@ -4,7 +4,7 @@ /// module TypeScript { - // TODO: refactor indent logic for use in emit + // TODO: refactor indent logic for use in emit id:520 gh:521 export class PrintContext { public builder = ""; public indent1 = " "; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts index de8b0ff4cb41a..21df584e2a4e6 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts @@ -154,7 +154,7 @@ module TypeScript { var importDecl = ast; var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported); - // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers + // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers id:776 gh:777 var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: context }); var isGlobal = context.scopeChain.container == context.checker.gloMod; @@ -266,7 +266,7 @@ module TypeScript { if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } - // REVIEW: If multiple disparate module decls for the same module don't agree + // REVIEW: If multiple disparate module decls for the same module don't agree id:503 gh:504 // in export privileges, how should we handle it? if (isExported) { typeSymbol.flags |= SymbolFlags.Exported; @@ -435,7 +435,7 @@ module TypeScript { context.checker.locationInfo.unitIndex, interfaceType); interfaceType.symbol = interfaceSymbol; - // REVIEW: Shouldn't allocate another table for interface privates + // REVIEW: Shouldn't allocate another table for interface privates id:615 gh:616 interfaceType.members = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceType.ambientMembers = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); interfaceSymbol.declAST = interfaceDecl; @@ -463,7 +463,7 @@ module TypeScript { if (!alreadyInScope) { context.scopeChain.scope.enter(context.scopeChain.container, ast, - interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient + interfaceSymbol, context.checker.errorReporter, isGlobal || isExported, true, false); // REVIEW: Technically, interfaces should be ambient id:501 gh:502 } pushTypeCollectionScope(interfaceSymbol, interfaceType.members, interfaceType.ambientMembers, null, null, context, interfaceType, null, null); @@ -577,7 +577,7 @@ module TypeScript { export function preCollectFuncDeclTypes(ast: AST, parent: AST, context: TypeCollectionContext) { var scopeChain = context.scopeChain; - // REVIEW: This will have to change when we move to "export" + // REVIEW: This will have to change when we move to "export" id:535 gh:536 if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } @@ -626,7 +626,7 @@ module TypeScript { fgSym = containerSym.type.members.allMembers.lookup(nameText); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:777 gh:778 fgSym = containerScope.findLocal(nameText, false, false); // If we could not find the function symbol in the value context, look @@ -650,7 +650,7 @@ module TypeScript { } // a function with this symbol has not yet been declared in this scope - // REVIEW: In the code below, we need to ensure that only function overloads are considered + // REVIEW: In the code below, we need to ensure that only function overloads are considered id:505 gh:506 // (E.g., if a vardecl has the same id as a function or class, we may use the vardecl symbol // as the overload.) Defensively, however, the vardecl won't have a type yet, so it should // suffice to just check for a null type when considering the overload symbol in @@ -714,7 +714,7 @@ module TypeScript { } } - // REVIEW: Move this check into the typecheck phase? It's only being run over properties... + // REVIEW: Move this check into the typecheck phase? It's only being run over properties... id:617 gh:618 if (fgSym && !fgSym.isAccessor() && fgSym.type && @@ -738,7 +738,7 @@ module TypeScript { } funcDecl.type.symbol.declAST = ast; - if (funcDecl.isConstructor) { // REVIEW: Remove when classes completely replace oldclass + if (funcDecl.isConstructor) { // REVIEW: Remove when classes completely replace oldclass id:502 gh:503 go = true; }; } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts index 17e855656aca8..3674328988739 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts @@ -189,7 +189,7 @@ module TypeScript { // if this is not a method, but enclosed by class, use constructor as // the enclosing scope - // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed + // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed id:537 gh:538 // - if it's a new class, always use the contained scope, since we initialize the constructor scope below if (context.scopeChain.thisType && (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { @@ -263,7 +263,7 @@ module TypeScript { } } - // REVIEW: We don't search for another sym for accessors to prevent us from + // REVIEW: We don't search for another sym for accessors to prevent us from id:778 gh:779 // accidentally coalescing function signatures with the same name (E.g., a function // 'f' the outer scope and a setter 'f' in an object literal within that scope) if (nameText && nameText != "__missing" && !funcDecl.isAccessor()) { @@ -271,7 +271,7 @@ module TypeScript { fgSym = funcScope.findLocal(nameText, false, false); } else { - // REVIEW: This logic should be symmetric with preCollectClassTypes + // REVIEW: This logic should be symmetric with preCollectClassTypes id:508 gh:509 fgSym = funcScope.findLocal(nameText, false, false); } } @@ -315,7 +315,7 @@ module TypeScript { var ambientFuncStaticTable = new StringHashTable(); var ambientFuncStaticMembers = new ScopedMembers(new DualStringHashTable(ambientFuncStaticTable, new StringHashTable())); - // REVIEW: Is it a problem that this is being set twice for properties and constructors? + // REVIEW: Is it a problem that this is being set twice for properties and constructors? id:619 gh:620 funcDecl.unitIndex = context.typeFlow.checker.locationInfo.unitIndex; var locals = new SymbolScopeBuilder(funcMembers, ambientFuncMembers, null, null, parentScope, localContainer); @@ -378,7 +378,7 @@ module TypeScript { export function preAssignCatchScopes(ast: AST, context: AssignScopeContext) { var catchBlock = ast; if (catchBlock.param) { - var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? + var catchTable = new ScopedMembers(new DualStringHashTable(new StringHashTable(), new StringHashTable())); // REVIEW: Should we be allocating a public table instead of a private one? id:504 gh:505 var catchLocals = new SymbolScopeBuilder(catchTable, null, null, null, context.scopeChain.scope, context.scopeChain.scope.container); catchBlock.containedScope = catchLocals; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts index 781a4db90ebc0..50236332225f5 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts @@ -98,8 +98,8 @@ module TypeScript { if (type.hasMembers()) { var members = type.members; var ambientMembers = type.ambientMembers; - var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? - var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? + var typeMembers = type.getAllEnclosedTypes(); // REVIEW: Should only be getting exported types? id:539 gh:540 + var ambientTypeMembers = type.getAllAmbientEnclosedTypes(); // REVIEW: Should only be getting exported types? id:779 gh:780 var memberScope = new SymbolTableScope(members, ambientMembers, typeMembers, ambientTypeMembers, type.symbol); var agg = new SymbolAggregateScope(type.symbol); var prevCurrentModDecl = this.checker.currentModDecl; @@ -111,7 +111,7 @@ module TypeScript { this.checker.inBind = true; } if (members) { - this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? + this.bind(agg, type.members.allMembers); // REVIEW: Should only be getting exported types? id:511 gh:512 } if (typeMembers) { this.bind(agg, typeMembers.allMembers); diff --git a/tests/cases/conformance/types/thisType/thisTypeInFunctions.ts b/tests/cases/conformance/types/thisType/thisTypeInFunctions.ts index 481e1630092b5..21880f34c3d0e 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInFunctions.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInFunctions.ts @@ -119,7 +119,7 @@ c.explicitC = m => m + this.n; c.explicitThis = m => m + this.n; c.explicitProperty = m => m + this.n; -//NOTE: this=C here, I guess? +//NOTE: this=C here, I guess? id:620 gh:621 c.explicitThis = explicitCFunction; c.explicitThis = function(this: C, m: number) { return this.n + m }; diff --git a/tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts b/tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts index aa2a48d5f4758..f94327e29a0c4 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts @@ -31,7 +31,7 @@ interface I { explicitVoid2(this: void): number; explicitStructural(this: {a: number}): number; explicitInterface(this: I): number; - explicitThis(this: this): number; // TODO: Allow `this` types for interfaces + explicitThis(this: this): number; // TODO: Allow `this` types for interfaces id:507 gh:508 } let impl: I = { a: 12, diff --git a/tests/cases/fourslash/ambientShorthandFindAllRefs.ts b/tests/cases/fourslash/ambientShorthandFindAllRefs.ts index 3f325a546c278..60dc8d0d3f3d4 100644 --- a/tests/cases/fourslash/ambientShorthandFindAllRefs.ts +++ b/tests/cases/fourslash/ambientShorthandFindAllRefs.ts @@ -11,6 +11,6 @@ const ranges = test.ranges(); const [r0, r1] = ranges; -// TODO: Want these to be in the same group, but that would require creating a symbol for `x`. +// TODO: Want these to be in the same group, but that would require creating a symbol for `x`. id:541 gh:542 verify.singleReferenceGroup("import x", [r0]); verify.singleReferenceGroup("import x", [r1]); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixAddMissingMember.ts b/tests/cases/fourslash/codeFixAddMissingMember.ts index 563cc29f4ea1f..109ed0ba0d656 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Declare property 'foo'", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:780 gh:781 newFileContent: `class C { foo: number;\r method() { diff --git a/tests/cases/fourslash/codeFixAddMissingMember2.ts b/tests/cases/fourslash/codeFixAddMissingMember2.ts index 06e111e63c70f..a4abfa04bf9ba 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember2.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember2.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Add index signature for property 'foo'", index: 1, - // TODO: GH#18445 + // TODO: GH#18445 id:513 gh:514 newFileContent: `class C { [x: string]: number;\r method() { diff --git a/tests/cases/fourslash/codeFixAddMissingMember3.ts b/tests/cases/fourslash/codeFixAddMissingMember3.ts index adc099eff743b..9fec2c4e10e5c 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember3.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember3.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Declare static property 'foo'", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:621 gh:622 newFileContent: `class C { static foo: number;\r static method() { diff --git a/tests/cases/fourslash/codeFixAddMissingMember4.ts b/tests/cases/fourslash/codeFixAddMissingMember4.ts index 97a17959d269b..5ce67f4f30a1b 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember4.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember4.ts @@ -15,7 +15,7 @@ verify.codeFix({ description: "Initialize property 'foo' in the constructor", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:510 gh:511 newFileContent: `class C { constructor() {\r this.foo = undefined;\r diff --git a/tests/cases/fourslash/codeFixAddMissingMember5.ts b/tests/cases/fourslash/codeFixAddMissingMember5.ts index a15b564c7862e..682679b2b9a97 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember5.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember5.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Initialize static property 'foo'", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:543 gh:544 newFileContent: `class C { static method() { ()=>{ this.foo === 10 }; diff --git a/tests/cases/fourslash/codeFixAddMissingMember6.ts b/tests/cases/fourslash/codeFixAddMissingMember6.ts index a04a14c9ce5cd..b748d6f6bd321 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember6.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember6.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Initialize property 'foo' in the constructor", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:781 gh:782 newFileContent: `class C { constructor() {\r this.foo = undefined;\r diff --git a/tests/cases/fourslash/codeFixAddMissingMember7.ts b/tests/cases/fourslash/codeFixAddMissingMember7.ts index 0655898218b87..e5d0079988679 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember7.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember7.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Initialize static property 'foo'", index: 2, - // TODO: GH#18445 + // TODO: GH#18445 id:515 gh:516 newFileContent: `class C { static p = ()=>{ this.foo === 10 }; }\r diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all.ts b/tests/cases/fourslash/codeFixAddMissingMember_all.ts index e7edad472272f..6164afefdb8aa 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all.ts @@ -11,7 +11,7 @@ verify.codeFixAll({ fixId: "addMissingMember", newFileContent: - // TODO: GH#18445 + // TODO: GH#18445 id:622 gh:623 `class C { x: number;\r y(): any {\r diff --git a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts index 1bc0d03c2117c..f1fa4c89cda15 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember_all_js.ts @@ -16,7 +16,7 @@ verify.codeFixAll({ fixId: "addMissingMember", newFileContent: - // TODO: GH#18445 + // TODO: GH#18445 id:524 gh:525 `class C { y() {\r throw new Error("Method not implemented.");\r diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts index 0a7ae3e0e6887..4e956e0be9144 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsAbstractModifier.ts @@ -7,6 +7,6 @@ verify.codeFix({ description: "Change 'extends' to 'implements'", - // TODO: GH#18794 + // TODO: GH#18794 id:545 gh:546 newRangeContent: "abstract class A implements I1, I2", }); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts index e183677a31ffe..a536fc28facb2 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts @@ -12,6 +12,6 @@ //// [|class A extends I1 implements I2 { }|] verify.codeFix({ description: "Change 'extends' to 'implements'", - // TODO: GH#18794 + // TODO: GH#18794 id:782 gh:783 newRangeContent: "class A implements I1, I2 { }", }); diff --git a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithTrivia.ts b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithTrivia.ts index ed7fa4c3b1db5..5af43a9d62385 100644 --- a/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithTrivia.ts +++ b/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithTrivia.ts @@ -12,7 +12,7 @@ verify.codeFix({ description: "Change 'extends' to 'implements'", - // TODO: GH#18794 + // TODO: GH#18794 id:517 gh:518 newRangeContent: `class MyClass /*A !*/ //B ! /*C !*/ implements /*D !*/ I1, /*E !*/ //F ! /*G !*/ /*H !*/ I2 /*I !*/, /*J !*/ I3 /*K !*/ //L !`, diff --git a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts index 68743288c71de..8077cb020d353 100644 --- a/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassExprClassImplementClassFunctionVoidInferred.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18795 + // TODO: GH#18795 id:623 gh:624 newFileContent: `class A { f() {} diff --git a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts index 76117f05090c7..f43f09a29a66f 100644 --- a/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExprExtendsAbstractExpressionWithTypeArgs.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:580 gh:581 newFileContent: `function foo(a: T) { abstract class C { diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts index b7557419de0de..70c253cdfa4db 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractExpressionWithTypeArgs.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:547 gh:548 newFileContent: `function foo(a: T) { abstract class C { diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts index 4949ddbf7c5ba..e4d276a236356 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractGetterSetter.ts @@ -22,7 +22,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:783 gh:784 newFileContent: `abstract class A { private _a: string; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts index 462dd1e18eaf3..7802d546e8b90 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod.ts @@ -12,7 +12,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:519 gh:520 newFileContent: `abstract class A { abstract f(a: number, b: string): boolean; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts index 7fa5b76278766..a5b92f0624d1e 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodThis.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:624 gh:625 newFileContent: `abstract class A { abstract f(): this; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts index 01411fb34cb84..68aa107d23943 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:582 gh:583 newFileContent: `abstract class A { abstract f(x: T): T; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts index aff612ac95d7e..d208253023499 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateU.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:548 gh:549 newFileContent: `abstract class A { abstract f(x: T): T; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts index ba6afb9ac7a77..19a76c34f1f14 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractMethod_all.ts @@ -8,7 +8,7 @@ verify.codeFixAll({ fixId: "fixClassDoesntImplementInheritedAbstractMember", - // TODO: GH#18445 + // TODO: GH#18445 id:784 gh:785 newFileContent: `abstract class A { abstract m(): void; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts index 6fd77e90385f3..941e24761e448 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProperty.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18795 + // TODO: GH#18795 id:521 gh:522 newFileContent: `abstract class A { abstract x: number; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts b/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts index 9531c3b7533a1..04d3d5f061e93 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractPropertyThis.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18445 + // TODO: GH#18445 id:625 gh:626 newFileContent: `abstract class A { abstract x: this; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts index 63a3ed99f672b..7103140e8052f 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractProtectedProperty.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18445 + // TODO: GH#18445 id:584 gh:585 newFileContent: `abstract class A { protected abstract x: number; diff --git a/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts b/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts index c8696b1ad6cf3..ff9e2149bdd01 100644 --- a/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts +++ b/tests/cases/fourslash/codeFixClassExtendAbstractPublicProperty.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement inherited abstract class", - // TODO: GH#18445 + // TODO: GH#18445 id:549 gh:550 newFileContent: `abstract class A { public abstract x: number; diff --git a/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts b/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts index f6fac956c5b48..3628406a42b56 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassAbstractGettersAndSetters.ts @@ -15,7 +15,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:785 gh:786 newFileContent: `abstract class A { private _a: string; diff --git a/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts b/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts index dbc0689644f07..81be8d1e0d97e 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassFunctionVoidInferred.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:522 gh:523 newFileContent: `class A { f() {} diff --git a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts index 8c563d4dbb79e..214bc3f80745f 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures1.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:626 gh:627 newFileContent: `class A { method(a: number, b: string): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts index de2bfab561e99..a17cb417e30f3 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassMultipleSignatures2.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:586 gh:587 newFileContent: `class A { method(a: any, b: string): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts b/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts index f3aa6bc6c6caa..bd75aa4fcc79d 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassPropertyModifiers.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:550 gh:551 newFileContent: `abstract class A { abstract x: number; diff --git a/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts b/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts index 0981db995bb47..8fe4adfdc1a84 100644 --- a/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts +++ b/tests/cases/fourslash/codeFixClassImplementClassPropertyTypeQuery.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'A'", - // TODO: GH#18445 + // TODO: GH#18445 id:786 gh:787 newFileContent: `class A { A: typeof A; diff --git a/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts b/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts index ae187b93572e6..bc684c90e3206 100644 --- a/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts +++ b/tests/cases/fourslash/codeFixClassImplementDeepInheritance.ts @@ -50,7 +50,7 @@ verify.codeFix({ description: "Implement interface 'I6'", - // TODO: GH#18445 + // TODO: GH#18445 id:523 gh:524 newFileContent: `// Referenced throughout the inheritance chain. interface I0 { a: number } diff --git a/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts b/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts index 53fb9378591a9..fd303bc7f44e5 100644 --- a/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts +++ b/tests/cases/fourslash/codeFixClassImplementDefaultClass.ts @@ -5,7 +5,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:627 gh:628 newFileContent: `interface I { x: number; } export default class implements I {\r diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts index b121fe54ac735..83173ab616d11 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceArrayTuple.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:588 gh:589 newFileContent: `interface I { x: number[]; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts index 8b811a98d2556..d08087f02649e 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceClassExpression.ts @@ -6,7 +6,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:551 gh:552 newFileContent: `interface I { x: number; } new class implements I {\r diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts index 98a00d43f4cf2..13416e49fd1b2 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComments.ts @@ -20,7 +20,7 @@ verify.codeFix({ description: "Implement interface 'N.I'", - // TODO: GH#18445 + // TODO: GH#18445 id:787 gh:788 newFileContent: `namespace N { /**enum prefix */ diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts index 6bbe5f4efd1d6..6a7e147cff302 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyLiterals.ts @@ -11,7 +11,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:525 gh:526 newFileContent: `interface I { ["foo"](o: any): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts index ab8b7ddfebbae..686829c944ddc 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceComputedPropertyNameWellKnownSymbols.ts @@ -21,7 +21,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:628 gh:629 newFileContent: `interface I { [Symbol.hasInstance](o: any): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts index 9e01e080af60b..a9b4876913a0f 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceInNamespace.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Implement interface 'N1.I1'", - // TODO: GH#18445 + // TODO: GH#18445 id:590 gh:591 newFileContent: `namespace N1 { export interface I1 { diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts index 2becd28aa4ff1..9428ecb498666 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesBoth.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:552 gh:553 newFileContent: `interface I { [x: number]: I; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts index ebd0904e88a3c..ff9790a499989 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesNumber.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:788 gh:789 newFileContent: `interface I { [x: number]: I; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts index 4cd6cd0c9a3b9..4d922f520b7b3 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexSignaturesString.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:526 gh:527 newFileContent: `interface I { [Ƚ: string]: X; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts index 7e93871c55202..a0661eca8e11a 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceIndexType.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:629 gh:630 newFileContent: `interface I { x: keyof X; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts index 83a2c131d9766..d5b04504da654 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceInheritsAbstractMethod.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Implement interface 'I1'", - // TODO: GH#18445 + // TODO: GH#18445 id:592 gh:593 newFileContent: `abstract class C1 { } abstract class C2 { diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts index b787d0c271e7e..5d884260185d6 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMappedType.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:553 gh:554 newFileContent: `interface I { x: { readonly [K in keyof X]: X[K] }; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts index fc1217f155668..a7792baa572a9 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberNestedTypeAlias.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:789 gh:790 newFileContent: `type Either = { val: T } | Error; interface I { diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts index 4bb20142df34e..acbd742f99f7f 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberOrdering.ts @@ -33,7 +33,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:527 gh:528 newFileContent: `/** asdf */ interface I { diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts index 23f1c79054e3c..dc6482c1b4b07 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMemberTypeAlias.ts @@ -6,7 +6,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:630 gh:631 newFileContent: `type MyType = [string, number]; interface I { x: MyType; test(a: MyType): void; } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts index 41c8f2254db55..7eab6b5fc6514 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodThisAndSelfReference.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:594 gh:595 newFileContent: `interface I { f(x: number, y: this): I diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts index ce1dfead0f3e4..acc5962c27a4b 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts @@ -9,7 +9,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:554 gh:555 newFileContent: `interface I { f(i: any): i is I; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts index afad257a699b7..96247c4fd095a 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleMembersAndPunctuation.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Implement interface 'I1'", - // TODO: GH#18445 + // TODO: GH#18445 id:790 gh:791 newFileContent: `interface I1 { x: number, diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts index b8167ccf35b2d..9dc0b72e92098 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignatures.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:528 gh:529 newFileContent: `interface I { method(a: number, b: string): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts index ee64c1be6bb33..05b479439454a 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest1.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:631 gh:632 newFileContent: `interface I { method(a: number, ...b: string[]): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts index 9b4e471a5d8bd..792d9b09a968c 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceMultipleSignaturesRest2.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:596 gh:597 newFileContent: `interface I { method(a: number, ...b: string[]): boolean; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts index ee9808603cf57..b6c196f35b9af 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceNamespaceConflict.ts @@ -10,7 +10,7 @@ verify.codeFix({ description: "Implement interface 'N1.I1'", - // TODO: GH#18445 + // TODO: GH#18445 id:555 gh:556 newFileContent: `namespace N1 { export interface I1 { x: number; } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts index ea4f5dbdd91db..352c5b10952ec 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'IPerson'", - // TODO: GH#18445 + // TODO: GH#18445 id:791 gh:792 newFileContent: `interface IPerson { name: string; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts index f8fb576800fc9..1958ce7263620 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:529 gh:530 newFileContent: `enum E { a,b,c } interface I { diff --git a/tests/cases/fourslash/codeFixClassImplementInterfacePropertyFromParentConstructorFunction.ts b/tests/cases/fourslash/codeFixClassImplementInterfacePropertyFromParentConstructorFunction.ts index acda59513ad62..e6a65ee7da1b8 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfacePropertyFromParentConstructorFunction.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfacePropertyFromParentConstructorFunction.ts @@ -8,7 +8,7 @@ verify.not.codeFixAvailable(); -// TODO: (arozga) Get this working. +// TODO: (arozga) Get this working. id:632 gh:633 /* verify.rangeAfterCodeFix(` public x: number; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts b/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts index 98a0f374ae774..864dec278d573 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfacePropertySignatures.ts @@ -21,7 +21,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:598 gh:599 newFileContent: `interface I { a0: {}; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts index c8e88bced9fe9..25186d18c79be 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceQualifiedName.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'N.I'", - // TODO: GH#18445 + // TODO: GH#18445 id:556 gh:558 newFileContent: `namespace N { export interface I { y: I; } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts index 4b50cf2e69bdf..efeb1e1a9dbad 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateDeeply.ts @@ -7,7 +7,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:792 gh:793 newFileContent: `interface I { x: { y: T, z: T[] }; diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateError.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateError.ts index f4e433e9c0d9b..5415ff9b3d7ae 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateError.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateError.ts @@ -8,6 +8,6 @@ verify.codeFixAvailable(); -// TODO: (arozga) Don't know how to instantiate in codeFix +// TODO: (arozga) Don't know how to instantiate in codeFix id:530 gh:531 // if instantiation is invalid. // verify.not.codeFixAvailable(); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts index 6df183d3e445b..d0288185e725a 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateNumber.ts @@ -5,7 +5,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:633 gh:634 newFileContent: `interface I { x: T; } class C implements I {\r diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts index 7be7d21f1e4aa..7607c6446af0c 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateT.ts @@ -5,7 +5,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:600 gh:601 newFileContent: `interface I { x: T; } class C implements I {\r diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts index ac4cad8022039..a7edbd7dee059 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamInstantiateU.ts @@ -5,7 +5,7 @@ verify.codeFix({ description: "Implement interface 'I'", - // TODO: GH#18445 + // TODO: GH#18445 id:557 gh:557 newFileContent: `interface I { x: T; } class C implements I {\r diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts index 6a93c84ecf06a..c696826cb61e2 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceTypeParamMethod.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Implement interface 'I'", newFileContent: - // TODO: GH#18445 + // TODO: GH#18445 id:793 gh:794 `interface I { f(x: T); } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceUndeclaredSymbol.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceUndeclaredSymbol.ts index 0acf60645c9c4..b02c36833c445 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterfaceUndeclaredSymbol.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceUndeclaredSymbol.ts @@ -15,5 +15,5 @@ // Since we can't guess the programmer's intent here, we do nothing. verify.codeFixAvailable(); -// TODO: (aozgaa) Acknowledge other errors on class/implemented interface/extended abstract class. +// TODO: (aozgaa) Acknowledge other errors on class/implemented interface/extended abstract class. id:531 gh:532 // verify.not.codeFixAvailable(); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixClassImplementInterface_all.ts b/tests/cases/fourslash/codeFixClassImplementInterface_all.ts index fb3672a794952..57b4c43527fab 100644 --- a/tests/cases/fourslash/codeFixClassImplementInterface_all.ts +++ b/tests/cases/fourslash/codeFixClassImplementInterface_all.ts @@ -7,7 +7,7 @@ verify.codeFixAll({ fixId: "fixClassIncorrectlyImplementsInterface", - // TODO: GH#20073 GH#18445 + // TODO: GH#20073 GH#18445 id:634 gh:635 newFileContent: `interface I { i(): void; } interface J { j(): void; } diff --git a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts index a4db2c909fdcc..ca3f444e95fac 100644 --- a/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts +++ b/tests/cases/fourslash/codeFixClassSuperMustPrecedeThisAccess.ts @@ -9,7 +9,7 @@ //// super(); //// |]} ////} -// TODO: GH#18445 +// TODO: GH#18445 id:602 gh:603 verify.rangeAfterCodeFix(` super();\r this.a = 12; diff --git a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts index 402d419636064..e2560e0f1243b 100644 --- a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts +++ b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall.ts @@ -8,7 +8,7 @@ verify.codeFix({ description: "Add missing 'super()' call", - // TODO: GH#18445 + // TODO: GH#18445 id:558 gh:559 newFileContent: `class Base{ } diff --git a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts index 8aa0e2c6adeea..dd4666be877ba 100644 --- a/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts +++ b/tests/cases/fourslash/codeFixConstructorForDerivedNeedSuperCall_all.ts @@ -9,7 +9,7 @@ verify.codeFixAll({ fixId: "constructorForDerivedNeedSuperCall", - // TODO: GH#18445 + // TODO: GH#18445 id:794 gh:795 newFileContent: `class C extends Object { constructor() {\r super();\r diff --git a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts index b1fac4e0f1270..714f83e65edf7 100644 --- a/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts @@ -12,7 +12,7 @@ verify.codeFix({ description: "Declare static method 'm1'", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:532 gh:533 newRangeContent: ` static m1(arg0: any, arg1: any, arg2: any): any {\r throw new Error("Method not implemented.");\r diff --git a/tests/cases/fourslash/codeFixUndeclaredMethod.ts b/tests/cases/fourslash/codeFixUndeclaredMethod.ts index 2f291490b14f4..cb604956a9848 100644 --- a/tests/cases/fourslash/codeFixUndeclaredMethod.ts +++ b/tests/cases/fourslash/codeFixUndeclaredMethod.ts @@ -13,7 +13,7 @@ verify.codeFix({ description: "Declare method 'foo1'", index: 0, - // TODO: GH#18445 + // TODO: GH#18445 id:635 gh:636 newRangeContent: ` foo1(arg0: any, arg1: any, arg2: any): any {\r throw new Error("Method not implemented.");\r diff --git a/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature02.ts b/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature02.ts index 0472a9c04fa8c..72a1167c8a3e2 100644 --- a/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature02.ts +++ b/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature02.ts @@ -11,7 +11,7 @@ goTo.marker("1"); verify.completionListContains("I"); verify.completionListContains("TString"); -verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? +verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? id:604 gh:605 // Ideally the following shouldn't show up since they're not types. verify.not.completionListContains("foo"); diff --git a/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature03.ts b/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature03.ts index 1dc34dcffd454..5b852798ab452 100644 --- a/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature03.ts +++ b/tests/cases/fourslash/completionListInClosedObjectTypeLiteralInSignature03.ts @@ -11,7 +11,7 @@ goTo.marker("1"); verify.completionListContains("I"); verify.completionListContains("TString"); -verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? +verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? id:559 gh:560 // Ideally the following shouldn't show up since they're not types. verify.not.completionListContains("foo"); diff --git a/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature02.ts b/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature02.ts index 5d4fa07082fe4..0ab3c010c9da3 100644 --- a/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature02.ts +++ b/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature02.ts @@ -11,7 +11,7 @@ goTo.marker("1"); verify.completionListContains("I"); verify.completionListContains("TString"); -verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? +verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? id:795 gh:796 // Ideally the following shouldn't show up since they're not types. verify.not.completionListContains("foo"); diff --git a/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature03.ts b/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature03.ts index 61fa09120070c..32350ad67e994 100644 --- a/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature03.ts +++ b/tests/cases/fourslash/completionListInUnclosedObjectTypeLiteralInSignature03.ts @@ -11,7 +11,7 @@ goTo.marker("1"); verify.completionListContains("I"); verify.completionListContains("TString"); -verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? +verify.completionListContains("TNumber"); // REVIEW: Is this intended behavior? id:533 gh:534 // Ideally the following shouldn't show up since they're not types. verify.not.completionListContains("foo"); diff --git a/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts b/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts index 09c0e74002b56..2f7fcb7cc79ec 100644 --- a/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts +++ b/tests/cases/fourslash/completionsImport_default_alreadyExistedWithRename.ts @@ -17,7 +17,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:636 gh:637 newFileContent: `import f_o_o from "./a"; import foo from "./a";\r f;`, diff --git a/tests/cases/fourslash/completionsImport_default_anonymous.ts b/tests/cases/fourslash/completionsImport_default_anonymous.ts index 35489c1110bf9..f323dc45631fc 100644 --- a/tests/cases/fourslash/completionsImport_default_anonymous.ts +++ b/tests/cases/fourslash/completionsImport_default_anonymous.ts @@ -22,7 +22,7 @@ verify.applyCodeActionFromCompletion("1", { name: "fooBar", source: "/src/foo-bar", description: `Import 'fooBar' from module "./foo-bar"`, - // TODO: GH#18445 + // TODO: GH#18445 id:606 gh:606 newFileContent: `import fooBar from "./foo-bar";\r \r def diff --git a/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts b/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts index 558be4bee03a3..10fbce77a7dfe 100644 --- a/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts +++ b/tests/cases/fourslash/completionsImport_default_didNotExistBefore.ts @@ -18,7 +18,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:560 gh:561 newFileContent: `import foo from "./a";\r \r f;`, diff --git a/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts b/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts index 042da2fee393a..f319ae1806c8e 100644 --- a/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts +++ b/tests/cases/fourslash/completionsImport_default_exportDefaultIdentifier.ts @@ -19,7 +19,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:796 gh:797 newFileContent: `import foo from "./a";\r \r f;`, diff --git a/tests/cases/fourslash/completionsImport_fromAmbientModule.ts b/tests/cases/fourslash/completionsImport_fromAmbientModule.ts index db9b586eb423b..7c083f96db4f1 100644 --- a/tests/cases/fourslash/completionsImport_fromAmbientModule.ts +++ b/tests/cases/fourslash/completionsImport_fromAmbientModule.ts @@ -12,7 +12,7 @@ verify.applyCodeActionFromCompletion("", { name: "x", source: "m", description: `Import 'x' from module "m"`, - // TODO: GH#18445 + // TODO: GH#18445 id:534 gh:535 newFileContent: `import { x } from "m";\r \r `, diff --git a/tests/cases/fourslash/completionsImport_multipleWithSameName.ts b/tests/cases/fourslash/completionsImport_multipleWithSameName.ts index d85c04ce9f89d..dde9c265eab07 100644 --- a/tests/cases/fourslash/completionsImport_multipleWithSameName.ts +++ b/tests/cases/fourslash/completionsImport_multipleWithSameName.ts @@ -23,7 +23,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/b", description: `Import 'foo' from module "./b"`, - // TODO: GH#18445 + // TODO: GH#18445 id:637 gh:638 newFileContent: `import { foo } from "./b";\r \r fo`, diff --git a/tests/cases/fourslash/completionsImport_named_namespaceImportExists.ts b/tests/cases/fourslash/completionsImport_named_namespaceImportExists.ts index 112cecba74a05..8c7faa19d137e 100644 --- a/tests/cases/fourslash/completionsImport_named_namespaceImportExists.ts +++ b/tests/cases/fourslash/completionsImport_named_namespaceImportExists.ts @@ -17,7 +17,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/a", description: `Change 'foo' to 'a.foo'`, - // TODO: GH#18445 + // TODO: GH#18445 id:608 gh:609 newFileContent: `import * as a from "./a"; a.f;`, }); diff --git a/tests/cases/fourslash/completionsImport_ofAlias.ts b/tests/cases/fourslash/completionsImport_ofAlias.ts index a693065b93c97..d0bc651ebba98 100644 --- a/tests/cases/fourslash/completionsImport_ofAlias.ts +++ b/tests/cases/fourslash/completionsImport_ofAlias.ts @@ -19,8 +19,8 @@ goTo.marker(""); const options = { includeExternalModuleExports: true, sourceDisplay: "./a" }; -// TODO: https://github.com/Microsoft/TypeScript/issues/14003 -//TODO: verify that there's only one! +// TODO: https://github.com/Microsoft/TypeScript/issues/14003 id:561 gh:562 +//TODO: verify that there's only one! id:797 gh:798 verify.completionListContains({ name: "foo", source: "/a" }, "import foo", "", "alias", /*spanIndex*/ undefined, /*hasAction*/ true, options); verify.not.completionListContains({ name: "foo", source: "/a_reexport" }, undefined, undefined, undefined, undefined, undefined, options); verify.not.completionListContains({ name: "foo", source: "/a_reexport_2" }, undefined, undefined, undefined, undefined, undefined, options); @@ -29,7 +29,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:536 gh:537 newFileContent: `import { foo } from "./a";\r \r fo`, diff --git a/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts b/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts index b837b759b530e..8f9328add35fe 100644 --- a/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts +++ b/tests/cases/fourslash/completionsImport_ofAlias_preferShortPath.ts @@ -24,7 +24,7 @@ verify.applyCodeActionFromCompletion("", { name: "foo", source: "/foo/lib/foo", description: `Import 'foo' from module "./foo"`, - // TODO: GH#18445 + // TODO: GH#18445 id:638 gh:639 newFileContent: `import { foo } from "./foo";\r \r fo`, diff --git a/tests/cases/fourslash/completionsImport_require.ts b/tests/cases/fourslash/completionsImport_require.ts index 2355cd06c3315..730236cb81dc8 100644 --- a/tests/cases/fourslash/completionsImport_require.ts +++ b/tests/cases/fourslash/completionsImport_require.ts @@ -23,7 +23,7 @@ verify.applyCodeActionFromCompletion("b", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:610 gh:611 newFileContent: `import { foo } from "./a";\r \r const a = require("./a"); @@ -40,7 +40,7 @@ verify.applyCodeActionFromCompletion("c", { name: "foo", source: "/a", description: `Import 'foo' from module "./a"`, - // TODO: GH#18445 + // TODO: GH#18445 id:562 gh:563 newFileContent: `import { foo } from "./a";\r \r const a = import("./a"); diff --git a/tests/cases/fourslash/findAllRefsForModule.ts b/tests/cases/fourslash/findAllRefsForModule.ts index ae6b216463ff2..bec03f1b2774f 100644 --- a/tests/cases/fourslash/findAllRefsForModule.ts +++ b/tests/cases/fourslash/findAllRefsForModule.ts @@ -19,5 +19,5 @@ verify.noErrors(); const ranges = test.ranges(); const [r0, r1, r2] = ranges; verify.referenceGroups([r0, r1], [{ definition: 'module "/a"', ranges: [r0, r2, r1] }]); -// TODO:GH#15736 +// TODO: GH#15736 id:798 gh:799 verify.referenceGroups(r2, undefined); diff --git a/tests/cases/fourslash/findAllRefsForModuleGlobal.ts b/tests/cases/fourslash/findAllRefsForModuleGlobal.ts index 4c1b39cdb0f53..866cbf3a69be7 100644 --- a/tests/cases/fourslash/findAllRefsForModuleGlobal.ts +++ b/tests/cases/fourslash/findAllRefsForModuleGlobal.ts @@ -13,5 +13,5 @@ verify.noErrors(); const ranges = test.ranges(); const [r0, r1, r2] = ranges; verify.referenceGroups([r1, r2], [{ definition: 'module "/node_modules/foo/index"', ranges: [r0, r1, r2] }]); -// TODO:GH#15736 +// TODO: GH#15736 id:538 gh:539 verify.referenceGroups(r0, undefined); diff --git a/tests/cases/fourslash/findAllRefsJsDocTemplateTag_class_js.ts b/tests/cases/fourslash/findAllRefsJsDocTemplateTag_class_js.ts index 6577cfce15d3f..78f970541ed35 100644 --- a/tests/cases/fourslash/findAllRefsJsDocTemplateTag_class_js.ts +++ b/tests/cases/fourslash/findAllRefsJsDocTemplateTag_class_js.ts @@ -3,7 +3,7 @@ // @allowJs: true // @Filename: /a.js -// TODO: https://github.com/Microsoft/TypeScript/issues/16411 +// TODO: https://github.com/Microsoft/TypeScript/issues/16411 id:639 gh:640 // Both uses of T should be referenced. /////** @template [|{| "isWriteAccess": true, "isDefinition": true |}T|] */ diff --git a/tests/cases/fourslash/findAllRefsJsDocTemplateTag_function_js.ts b/tests/cases/fourslash/findAllRefsJsDocTemplateTag_function_js.ts index 0eb20cc32d63d..3858ff5878bc6 100644 --- a/tests/cases/fourslash/findAllRefsJsDocTemplateTag_function_js.ts +++ b/tests/cases/fourslash/findAllRefsJsDocTemplateTag_function_js.ts @@ -9,4 +9,4 @@ //// */ ////function f() {} -verify.singleReferenceGroup("(type parameter) T"); // TODO:GH#??? should be "(type parameter) T in f(): void" +verify.singleReferenceGroup("(type parameter) T"); // TODO: GH#??? should be "(type parameter) T in f(): void" id:612 gh:613 diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 933e7a88f94e3..0814037f6dd47 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -40,7 +40,7 @@ // src/harness/fourslash.ts API's (or the rest of the compiler) because they are unstable and complicate the // fourslash testing DSL. Finally, in this case, runtime reflection is (much) faster. // -// TODO: figure out a better solution to the API exposure problem. +// TODO: figure out a better solution to the API exposure problem. id:563 gh:564 declare module ts { export type MapKey = string | number; @@ -192,10 +192,10 @@ declare namespace FourSlashInterface { markerName: string, completions: { excludes?: ReadonlyArray, - //TODO: better type + //TODO: better type id:799 gh:800 entries: ReadonlyArray<{ entry: any, details: any }>, }, - ): void; //TODO: better type + ): void; //TODO: better type id:540 gh:541 applyCodeActionFromCompletion(markerName: string, options: { name: string, source?: string, diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFile3.ts b/tests/cases/fourslash/importNameCodeFixNewImportFile3.ts index af7901e03e61c..ec029c38ecb35 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportFile3.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportFile3.ts @@ -3,7 +3,7 @@ //// [|let t: XXX/*0*/.I;|] // @Filename: ./module.ts -//// export module XXX { +//// export module XXX { id:614 gh:615 //// export interface I { //// } //// } diff --git a/tests/cases/fourslash/importNameCodeFixReExport.ts b/tests/cases/fourslash/importNameCodeFixReExport.ts index eb1c1a9134343..388e7ec241ef7 100644 --- a/tests/cases/fourslash/importNameCodeFixReExport.ts +++ b/tests/cases/fourslash/importNameCodeFixReExport.ts @@ -10,7 +10,7 @@ ////x;|] goTo.file("/b.ts"); -// TODO:GH#18445 +// TODO: GH#18445 id:564 gh:565 verify.rangeAfterCodeFix(`import { x } from "./a";\r \r export { x } from "./a"; diff --git a/tests/cases/fourslash/javaScriptModulesError1.ts b/tests/cases/fourslash/javaScriptModulesError1.ts index f13b25a182efb..ec38146ae846d 100644 --- a/tests/cases/fourslash/javaScriptModulesError1.ts +++ b/tests/cases/fourslash/javaScriptModulesError1.ts @@ -8,5 +8,5 @@ //// //// }); -// TODO: what should happen? +// TODO: what should happen? id:800 gh:801 goTo.marker(); \ No newline at end of file diff --git a/tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion.ts b/tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion.ts index d6c3ca4f91468..b1a77d4f36028 100644 --- a/tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion.ts +++ b/tests/cases/fourslash/jsFileJsdocTypedefTagTypeExpressionCompletion.ts @@ -27,7 +27,7 @@ function verifyCompletionsInJsDocType(marker: string, { verifyType, verifyValue, verifyType("T", "module"); - // TODO: May be filter keywords based on context + // TODO: May be filter keywords based on context id:542 gh:543 //verifyType("string", "keyword"); //verifyType("number", "keyword"); diff --git a/tests/cases/fourslash/server/convertFunctionToEs6Class-server.ts b/tests/cases/fourslash/server/convertFunctionToEs6Class-server.ts index e7da28a2770a1..635182226aa1a 100644 --- a/tests/cases/fourslash/server/convertFunctionToEs6Class-server.ts +++ b/tests/cases/fourslash/server/convertFunctionToEs6Class-server.ts @@ -12,9 +12,9 @@ //// } verify.applicableRefactorAvailableAtMarker('1'); -// NOTE: '// Comment' should be included, but due to incorrect handling of trivia, +// NOTE: '// Comment' should be included, but due to incorrect handling of trivia, id:641 gh:642 // it's omitted right now. -// TODO: GH#18445 +// TODO: GH#18445 id:616 gh:617 verify.fileAfterApplyingRefactorAtMarker('1', `class fn {\r constructor() {\r diff --git a/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts b/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts index e10ef704c2c9e..b0dd986d4cf44 100644 --- a/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts +++ b/tests/cases/fourslash/smartIndentObjectBindingPattern01.ts @@ -8,7 +8,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): voi verify.indentationIs(indentation); } -// TODO (arozga): fix this. +// TODO (arozga): fix this. id:565 gh:566 // verifyIndentationAfterNewLine("1", 4); verifyIndentationAfterNewLine("1", 0); verifyIndentationAfterNewLine("2", 8); diff --git a/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts b/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts index 9247f5f467b3c..628ff0a045d03 100644 --- a/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts +++ b/tests/cases/fourslash/smartIndentObjectBindingPattern02.ts @@ -8,7 +8,7 @@ function verifyIndentationAfterNewLine(marker: string, indentation: number): voi verify.indentationIs(indentation); } -// TODO(arozga): fix this +// TODO (arozga): fix this id:801 gh:802 // verifyIndentationAfterNewLine("1", 4); verifyIndentationAfterNewLine("1", 0); verifyIndentationAfterNewLine("2", 8); diff --git a/tests/cases/fourslash/todoComments13.ts b/tests/cases/fourslash/todoComments13.ts index 82304e2ab8f61..4cbe8c370f6c5 100644 --- a/tests/cases/fourslash/todoComments13.ts +++ b/tests/cases/fourslash/todoComments13.ts @@ -1,3 +1,3 @@ -//// TODO +//// TODO id:544 gh:545 verify.todoCommentsInCurrentFile(["TODO"]); \ No newline at end of file diff --git a/tests/cases/fourslash/todoComments15.ts b/tests/cases/fourslash/todoComments15.ts index 6bb327ecdfba1..99ec75421af58 100644 --- a/tests/cases/fourslash/todoComments15.ts +++ b/tests/cases/fourslash/todoComments15.ts @@ -1,3 +1,3 @@ -//// "// HACK 1"; +//// "// HACK 1"; id:642 gh:643 verify.todoCommentsInCurrentFile(["TODO(jason)", "HACK"]); \ No newline at end of file diff --git a/tests/cases/fourslash/todoComments19.ts b/tests/cases/fourslash/todoComments19.ts index 2f14ba69a5726..b0d5d652a2fbc 100644 --- a/tests/cases/fourslash/todoComments19.ts +++ b/tests/cases/fourslash/todoComments19.ts @@ -6,6 +6,6 @@ //// import * as foo1 from "fake-module"; // @Filename: node_modules/fake-module/ts.ts -//// // TODO +//// // TODO id:618 gh:619 verify.todoCommentsInCurrentFile(["TODO"]); diff --git a/tests/cases/fourslash/todoComments2.ts b/tests/cases/fourslash/todoComments2.ts index ddf8520c486b2..5018e07ea4b1f 100644 --- a/tests/cases/fourslash/todoComments2.ts +++ b/tests/cases/fourslash/todoComments2.ts @@ -1,3 +1,3 @@ -//// // not TODO +//// // not TODO id:566 gh:567 verify.todoCommentsInCurrentFile(["TODO"]); \ No newline at end of file diff --git a/tests/cases/fourslash/todoComments20.ts b/tests/cases/fourslash/todoComments20.ts index 2284236714dab..a1070ebe7f06a 100644 --- a/tests/cases/fourslash/todoComments20.ts +++ b/tests/cases/fourslash/todoComments20.ts @@ -1,6 +1,6 @@ /// // @Filename: dir1/node_modules/todoTest0.ts -//// // TODO +//// // TODO id:802 gh:803 verify.todoCommentsInCurrentFile(["TODO"]); diff --git a/tests/cases/fourslash/todoComments4.ts b/tests/cases/fourslash/todoComments4.ts index 86d6ce240795d..63380afe7419f 100644 --- a/tests/cases/fourslash/todoComments4.ts +++ b/tests/cases/fourslash/todoComments4.ts @@ -1,3 +1,3 @@ -//// // TODOnomatch +//// // TODO nomatch id:546 gh:547 verify.todoCommentsInCurrentFile(["TODO"]); \ No newline at end of file diff --git a/tests/cases/fourslash/unclosedCommentsInConstructor.ts b/tests/cases/fourslash/unclosedCommentsInConstructor.ts index a81bfb1fbf2aa..bf1c18bf3e9e1 100644 --- a/tests/cases/fourslash/unclosedCommentsInConstructor.ts +++ b/tests/cases/fourslash/unclosedCommentsInConstructor.ts @@ -5,4 +5,4 @@ ////} goTo.marker(); -// verify.completionListIsEmpty(); // TODO: difference between LS and FourSlash \ No newline at end of file +// verify.completionListIsEmpty(); // TODO: difference between LS and FourSlash id:643 gh:644 \ No newline at end of file