From 508e52d13a3927806ce1464c2b2d912bd7bb668c Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Mon, 16 Oct 2023 16:08:13 -0700 Subject: [PATCH] During fourslash server test baseline tsserver log file so that project updates and watches can be baselined and reasoned about (#56132) --- src/harness/fourslashImpl.ts | 550 +- src/harness/fourslashInterfaceImpl.ts | 60 +- src/harness/harnessIO.ts | 2 +- src/harness/harnessLanguageService.ts | 107 +- src/harness/tsserverLogger.ts | 150 + src/harness/watchUtils.ts | 147 + src/testRunner/fourslashRunner.ts | 13 +- src/testRunner/unittests/helpers/tsserver.ts | 136 +- .../unittests/helpers/typingsInstaller.ts | 12 +- .../helpers/virtualFileSystemWithWatch.ts | 101 +- .../tsserver/applyChangesToOpenFiles.ts | 4 +- .../unittests/tsserver/autoImportProvider.ts | 4 +- .../unittests/tsserver/auxiliaryProject.ts | 4 +- .../tsserver/cachingFileSystemInformation.ts | 6 +- .../unittests/tsserver/cancellationToken.ts | 4 +- .../unittests/tsserver/compileOnSave.ts | 6 +- .../unittests/tsserver/completions.ts | 4 +- .../tsserver/completionsIncomplete.ts | 4 +- .../unittests/tsserver/configFileSearch.ts | 4 +- .../unittests/tsserver/configuredProjects.ts | 4 +- .../unittests/tsserver/declarationFileMaps.ts | 4 +- .../unittests/tsserver/documentRegistry.ts | 4 +- .../unittests/tsserver/duplicatePackages.ts | 4 +- .../unittests/tsserver/dynamicFiles.ts | 4 +- .../tsserver/events/largeFileReferenced.ts | 4 +- .../events/projectLanguageServiceState.ts | 4 +- .../tsserver/events/projectLoading.ts | 4 +- .../events/projectUpdatedInBackground.ts | 4 +- .../unittests/tsserver/events/watchEvents.ts | 54 +- .../unittests/tsserver/exportMapCache.ts | 4 +- src/testRunner/unittests/tsserver/extends.ts | 4 +- .../unittests/tsserver/externalProjects.ts | 4 +- .../unittests/tsserver/findAllReferences.ts | 4 +- .../forceConsistentCasingInFileNames.ts | 4 +- .../unittests/tsserver/formatSettings.ts | 4 +- .../tsserver/getApplicableRefactors.ts | 4 +- .../tsserver/getEditsForFileRename.ts | 4 +- .../unittests/tsserver/getExportReferences.ts | 4 +- .../unittests/tsserver/getFileReferences.ts | 4 +- .../getMoveToRefactoringFileSuggestions.ts | 4 +- .../unittests/tsserver/goToDefinition.ts | 4 +- .../unittests/tsserver/importHelpers.ts | 4 +- .../tsserver/inconsistentErrorInEditor.ts | 4 +- .../unittests/tsserver/inferredProjects.ts | 4 +- .../unittests/tsserver/inlayHints.ts | 4 +- src/testRunner/unittests/tsserver/jsdocTag.ts | 4 +- .../unittests/tsserver/languageService.ts | 4 +- .../unittests/tsserver/libraryResolution.ts | 4 +- .../tsserver/maxNodeModuleJsDepth.ts | 4 +- .../unittests/tsserver/metadataInResponse.ts | 4 +- .../unittests/tsserver/moduleResolution.ts | 4 +- .../tsserver/moduleSpecifierCache.ts | 4 +- src/testRunner/unittests/tsserver/navTo.ts | 4 +- .../unittests/tsserver/occurences.ts | 4 +- src/testRunner/unittests/tsserver/openFile.ts | 4 +- .../unittests/tsserver/packageJsonInfo.ts | 4 +- .../tsserver/partialSemanticServer.ts | 4 +- src/testRunner/unittests/tsserver/plugins.ts | 4 +- .../unittests/tsserver/pluginsAsync.ts | 4 +- .../unittests/tsserver/projectErrors.ts | 4 +- .../tsserver/projectReferenceCompileOnSave.ts | 4 +- .../unittests/tsserver/projectReferences.ts | 4 +- .../tsserver/projectReferencesSourcemap.ts | 4 +- src/testRunner/unittests/tsserver/projects.ts | 4 +- .../tsserver/projectsWithReferences.ts | 4 +- .../unittests/tsserver/refactors.ts | 4 +- src/testRunner/unittests/tsserver/reload.ts | 4 +- .../unittests/tsserver/reloadProjects.ts | 4 +- src/testRunner/unittests/tsserver/rename.ts | 4 +- .../unittests/tsserver/resolutionCache.ts | 4 +- src/testRunner/unittests/tsserver/session.ts | 6 +- .../unittests/tsserver/skipLibCheck.ts | 4 +- .../unittests/tsserver/smartSelection.ts | 4 +- src/testRunner/unittests/tsserver/symLinks.ts | 4 +- .../unittests/tsserver/symlinkCache.ts | 4 +- .../unittests/tsserver/syntacticServer.ts | 4 +- .../unittests/tsserver/syntaxOperations.ts | 4 +- .../unittests/tsserver/telemetry.ts | 4 +- .../unittests/tsserver/textStorage.ts | 4 +- .../unittests/tsserver/typeAquisition.ts | 4 +- .../tsserver/typeOnlyImportChains.ts | 4 +- .../tsserver/typeReferenceDirectives.ts | 4 +- .../unittests/tsserver/typingsInstaller.ts | 6 +- .../unittests/tsserver/watchEnvironment.ts | 6 +- .../autoImportAllowTsExtensions1.baseline.md | 1 + .../autoImportAllowTsExtensions2.baseline.md | 1 + .../autoImportAllowTsExtensions3.baseline.md | 1 + .../autoImportAllowTsExtensions4.baseline.md | 1 + .../autoImportVerbatimCJS1.baseline.md | 1 + .../bpSpan_arrayLiteralExpressions.baseline | 1 + .../bpSpan_binaryExpressions.baseline | 1 + .../reference/bpSpan_breakOrContinue.baseline | 1 + .../baselines/reference/bpSpan_class.baseline | 1 + .../reference/bpSpan_classAmbient.baseline | 1 + .../reference/bpSpan_classes.baseline | 1 + .../bpSpan_conditionalExpressions.baseline | 1 + .../baselines/reference/bpSpan_const.baseline | 1 + .../reference/bpSpan_debugger.baseline | 1 + .../reference/bpSpan_decorators.baseline | 1 + tests/baselines/reference/bpSpan_do.baseline | 1 + .../baselines/reference/bpSpan_enums.baseline | 1 + .../bpSpan_exportAssignment.baseline | 1 + .../reference/bpSpan_exports.baseline | 1 + tests/baselines/reference/bpSpan_for.baseline | 1 + .../baselines/reference/bpSpan_forIn.baseline | 1 + .../bpSpan_functionExpressions.baseline | 1 + .../reference/bpSpan_functions.baseline | 1 + .../reference/bpSpan_ifElse.baseline | 1 + .../reference/bpSpan_import.baseline | 1 + .../reference/bpSpan_imports.baseline | 1 + .../reference/bpSpan_inBlankLine.baseline | 1 + .../reference/bpSpan_inComments.baseline | 1 + .../reference/bpSpan_interface.baseline | 1 + .../reference/bpSpan_labeled.baseline | 1 + tests/baselines/reference/bpSpan_let.baseline | 1 + .../reference/bpSpan_module.baseline | 1 + .../reference/bpSpan_moduleAmbient.baseline | 1 + .../reference/bpSpan_moduleEmpty.baseline | 1 + .../bpSpan_objectLiteralExpressions.baseline | 1 + .../bpSpan_parenCallOrNewExpressions.baseline | 1 + .../baselines/reference/bpSpan_stmts.baseline | 1 + .../reference/bpSpan_switch.baseline | 1 + .../reference/bpSpan_tryCatchFinally.baseline | 1 + .../bpSpan_typeAssertionExpressions.baseline | 1 + .../reference/bpSpan_typealias.baseline | 1 + .../bpSpan_unaryExpressions.baseline | 1 + .../reference/bpSpan_variables.baseline | 1 + .../baselines/reference/bpSpan_while.baseline | 1 + .../baselines/reference/bpSpan_with.baseline | 1 + ...AssignmentForArrayBindingPattern.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...ssignmentForObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...signmentForOfArrayBindingPattern.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...ignmentForOfObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...mentStatementArrayBindingPattern.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...tructuringForArrayBindingPattern.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...ructuringForObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...ucturingForOfArrayBindingPattern.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...cturingForOfObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...ringParameterArrayBindingPattern.baseline} | 1 + ...ingParameterArrayBindingPattern2.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...rrayBindingPatternDefaultValues2.baseline} | 1 + ...ameterNestedObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...ingParameterObjectBindingPattern.baseline} | 1 + ...bjectBindingPatternDefaultValues.baseline} | 1 + ...onDestructuringVariableStatement.baseline} | 1 + ...nDestructuringVariableStatement1.baseline} | 1 + ...ableStatementArrayBindingPattern.baseline} | 1 + ...bleStatementArrayBindingPattern2.baseline} | 1 + ...ArrayBindingPatternDefaultValues.baseline} | 1 + ...rrayBindingPatternDefaultValues2.baseline} | 1 + ...ngVariableStatementDefaultValues.baseline} | 1 + ...tementNestedObjectBindingPattern.baseline} | 1 + ...tBindingPatternWithDefaultValues.baseline} | 1 + .../callHierarchyAccessor.callHierarchy.txt | 1 + ...tNamedFunctionExpression.callHierarchy.txt | 1 + .../callHierarchyClass.callHierarchy.txt | 1 + ...ierarchyClassStaticBlock.callHierarchy.txt | 1 + ...erarchyClassStaticBlock2.callHierarchy.txt | 1 + ...yConstNamedArrowFunction.callHierarchy.txt | 1 + ...onstNamedClassExpression.callHierarchy.txt | 1 + ...tNamedFunctionExpression.callHierarchy.txt | 1 + ...llHierarchyContainerName.callHierarchy.txt | 1 + ...archyContainerNameServer.callHierarchy.txt | 1 + .../callHierarchyCrossFile.callHierarchy.txt | 1 + .../callHierarchyDecorator.callHierarchy.txt | 1 + ...rarchyExportDefaultClass.callHierarchy.txt | 1 + ...chyExportDefaultFunction.callHierarchy.txt | 1 + ...rchyExportEqualsFunction.callHierarchy.txt | 1 + .../callHierarchyFile.callHierarchy.txt | 1 + .../callHierarchyFunction.callHierarchy.txt | 1 + ...archyFunctionAmbiguity.1.callHierarchy.txt | 1 + ...archyFunctionAmbiguity.2.callHierarchy.txt | 1 + ...archyFunctionAmbiguity.3.callHierarchy.txt | 1 + ...archyFunctionAmbiguity.4.callHierarchy.txt | 1 + ...archyFunctionAmbiguity.5.callHierarchy.txt | 1 + ...HierarchyInterfaceMethod.callHierarchy.txt | 1 + .../callHierarchyJsxElement.callHierarchy.txt | 1 + ...lHierarchyTaggedTemplate.callHierarchy.txt | 1 + ...nfindingAllRefsOnDefinition.baseline.jsonc | 5 - ...sWhenEmitBlockingErrorOnOtherFile.baseline | 1 + ...fContextSensitiveParameterNoCrash.baseline | 1 + .../completionEntryForUnionMethod.baseline | 1 + ...completionForStringLiteralImport3.baseline | 1 + .../completionImportAttributes.baseline | 1 + .../completionImportCallAssertion.baseline | 1 + .../completionNoParentLocation.baseline | 1 + .../completionPropertyFromConstraint.baseline | 1 + ...mpletionsAfterPropertyNameInClass.baseline | 1 + .../completionsClassMembers1.baseline | 1 + .../completionsClassMembers2.baseline | 1 + .../completionsClassMembers3.baseline | 1 + .../completionsClassMembers4.baseline | 1 + .../completionsClassMembers5.baseline | 1 + .../completionsCommentsClass.baseline | 1 + .../completionsCommentsClassMembers.baseline | 1 + ...completionsCommentsCommentParsing.baseline | 1 + ...etionsCommentsFunctionDeclaration.baseline | 1 + ...letionsCommentsFunctionExpression.baseline | 1 + .../completionsImportWithKeyword.baseline | 1 + .../reference/completionsJSDocTags.baseline | 1 + .../completionsOverridingMethod15.baseline | 1 + .../completionsOverridingMethod16.baseline | 1 + ...hodsOnAssignedFunctionExpressions.baseline | 1 + .../completionsStringMethods.baseline | 1 + .../completionsUniqueSymbol2.baseline | 1 + .../deprecatedInheritedJSDocOverload.baseline | 1 + .../exhaustiveCaseCompletions9.baseline | 1 + .../findReferencesAfterEdit.baseline.jsonc | 5 - ...etEmitOutputDeclarationMultiFiles.baseline | 1 + ...etEmitOutputDeclarationSingleFile.baseline | 1 + .../getEmitOutputExternalModule.baseline | 1 + .../getEmitOutputExternalModule2.baseline | 1 + .../reference/getEmitOutputMapRoots.baseline | 1 + .../reference/getEmitOutputNoErrors.baseline | 1 + .../getEmitOutputOnlyOneFile.baseline | 1 + .../reference/getEmitOutputOut.baseline | 1 + .../reference/getEmitOutputOutFile.baseline | 1 + .../getEmitOutputSingleFile.baseline | 1 + .../getEmitOutputSingleFile2.baseline | 1 + .../reference/getEmitOutputSourceMap.baseline | 1 + .../getEmitOutputSourceMap2.baseline | 1 + .../getEmitOutputSourceRoot.baseline | 1 + ...getEmitOutputSourceRootMultiFiles.baseline | 1 + .../getEmitOutputTsxFile_Preserve.baseline | 1 + .../getEmitOutputTsxFile_React.baseline | 1 + .../getEmitOutputWithDeclarationFile.baseline | 1 + ...getEmitOutputWithDeclarationFile2.baseline | 1 + ...getEmitOutputWithDeclarationFile3.baseline | 1 + ...mitOutputWithEarlySyntacticErrors.baseline | 1 + .../getEmitOutputWithEmitterErrors.baseline | 1 + .../getEmitOutputWithEmitterErrors2.baseline | 1 + .../getEmitOutputWithSemanticErrors.baseline | 1 + .../getEmitOutputWithSemanticErrors2.baseline | 1 + ...ithSemanticErrorsForMultipleFiles.baseline | 1 + ...thSemanticErrorsForMultipleFiles2.baseline | 1 + ...thSyntacticErrorsForMultipleFiles.baseline | 1 + ...hSyntacticErrorsForMultipleFiles2.baseline | 1 + .../getEmitOutputWithSyntaxErrors.baseline | 1 + ...tJavaScriptSyntacticDiagnostics01.baseline | 1 + ...tJavaScriptSyntacticDiagnostics02.baseline | 1 + ...etJavaScriptSyntacticDiagnostics1.baseline | 1 + ...tJavaScriptSyntacticDiagnostics10.baseline | 1 + ...tJavaScriptSyntacticDiagnostics11.baseline | 1 + ...tJavaScriptSyntacticDiagnostics12.baseline | 1 + ...tJavaScriptSyntacticDiagnostics13.baseline | 1 + ...tJavaScriptSyntacticDiagnostics14.baseline | 1 + ...tJavaScriptSyntacticDiagnostics15.baseline | 1 + ...tJavaScriptSyntacticDiagnostics16.baseline | 1 + ...tJavaScriptSyntacticDiagnostics17.baseline | 1 + ...tJavaScriptSyntacticDiagnostics18.baseline | 1 + ...tJavaScriptSyntacticDiagnostics19.baseline | 1 + ...etJavaScriptSyntacticDiagnostics2.baseline | 1 + ...etJavaScriptSyntacticDiagnostics3.baseline | 1 + ...etJavaScriptSyntacticDiagnostics4.baseline | 1 + ...etJavaScriptSyntacticDiagnostics5.baseline | 1 + ...etJavaScriptSyntacticDiagnostics6.baseline | 1 + ...etJavaScriptSyntacticDiagnostics7.baseline | 1 + ...etJavaScriptSyntacticDiagnostics8.baseline | 1 + ...etJavaScriptSyntacticDiagnostics9.baseline | 1 + .../getOccurrencesAfterEdit.baseline.jsonc | 5 - .../importStatementCompletions3.baseline | 1 + .../reference/inlayHintsCrash1.baseline | 1 + .../inlayHintsEnumMemberValue.baseline | 1 + ...inlayHintsFunctionParameterTypes1.baseline | 1 + ...inlayHintsFunctionParameterTypes2.baseline | 1 + ...inlayHintsFunctionParameterTypes3.baseline | 1 + ...inlayHintsFunctionParameterTypes4.baseline | 1 + .../reference/inlayHintsImportType1.baseline | 1 + .../reference/inlayHintsImportType2.baseline | 1 + ...nlayHintsInteractiveAnyParameter1.baseline | 1 + ...nlayHintsInteractiveAnyParameter2.baseline | 1 + ...nteractiveFunctionParameterTypes1.baseline | 1 + ...nteractiveFunctionParameterTypes2.baseline | 1 + ...nteractiveFunctionParameterTypes3.baseline | 1 + ...nteractiveFunctionParameterTypes4.baseline | 1 + ...nteractiveFunctionParameterTypes5.baseline | 1 + .../inlayHintsInteractiveImportType1.baseline | 1 + .../inlayHintsInteractiveImportType2.baseline | 1 + ...ntsInteractiveJsDocParameterNames.baseline | 1 + .../inlayHintsInteractiveMultifile1.baseline | 1 + ...InteractiveMultifileFunctionCalls.baseline | 1 + ...inlayHintsInteractiveOverloadCall.baseline | 1 + ...layHintsInteractiveParameterNames.baseline | 1 + ...sInteractiveParameterNamesInSpan1.baseline | 1 + ...sInteractiveParameterNamesInSpan2.baseline | 1 + ...ractiveParameterNamesWithComments.baseline | 1 + ...ayHintsInteractiveRestParameters1.baseline | 1 + ...ayHintsInteractiveRestParameters2.baseline | 1 + .../inlayHintsInteractiveReturnType.baseline | 1 + ...layHintsInteractiveVariableTypes1.baseline | 1 + ...layHintsInteractiveVariableTypes2.baseline | 1 + ...inlayHintsInteractiveWithClosures.baseline | 1 + .../inlayHintsJsDocParameterNames.baseline | 1 + .../reference/inlayHintsMultifile1.baseline | 1 + ...intsNoHintWhenArgumentMatchesName.baseline | 1 + .../inlayHintsNoParameterHints.baseline | 1 + .../inlayHintsNoVariableTypeHints.baseline | 1 + .../reference/inlayHintsOverloadCall.baseline | 1 + .../inlayHintsParameterNames.baseline | 1 + .../inlayHintsParameterNamesInSpan1.baseline | 1 + .../inlayHintsParameterNamesInSpan2.baseline | 1 + .../inlayHintsPropertyDeclarations.baseline | 1 + .../inlayHintsQuotePreference1.baseline | 1 + .../inlayHintsQuotePreference2.baseline | 1 + .../inlayHintsRestParameters1.baseline | 1 + .../inlayHintsRestParameters2.baseline | 1 + .../reference/inlayHintsReturnType.baseline | 1 + .../inlayHintsTypeMatchesName.baseline | 1 + .../inlayHintsVariableTypes1.baseline | 1 + .../inlayHintsVariableTypes2.baseline | 1 + .../reference/inlayHintsWithClosures.baseline | 1 + .../reference/jsDocAliasQuickInfo.baseline | 1 + .../jsDocDontBreakWithNamespaces.baseline | 1 + .../jsDocFunctionSignatures5.baseline | 1 + .../jsDocFunctionSignatures6.baseline | 1 + .../reference/jsDocSignature-43394.baseline | 1 + .../reference/jsDocTypeTagQuickInfo1.baseline | 1 + .../reference/jsDocTypeTagQuickInfo2.baseline | 1 + .../reference/jsDocTypedefQuickInfo1.baseline | 1 + ...pedefTagTypeExpressionCompletion4.baseline | 1 + tests/baselines/reference/jsdocLink1.baseline | 1 + tests/baselines/reference/jsdocLink2.baseline | 1 + tests/baselines/reference/jsdocLink3.baseline | 1 + tests/baselines/reference/jsdocLink4.baseline | 1 + tests/baselines/reference/jsdocLink5.baseline | 1 + .../jsdocOnInheritedMembers1.baseline | 1 + .../jsdocOnInheritedMembers2.baseline | 1 + ...docParameterTagSnippetCompletion1.baseline | 1 + ...docParameterTagSnippetCompletion2.baseline | 1 + ...docParameterTagSnippetCompletion3.baseline | 1 + .../reference/jsdocReturnsTag.baseline | 1 + .../linkedEditingJsxTag10.linkedEditing.txt | 1 + .../linkedEditingJsxTag11.linkedEditing.txt | 1 + .../moduleNodeNextImportFix.baseline | 1 + .../nameOrDottedSpan_classes.baseline | 1 + .../reference/nameOrDottedSpan_stmts.baseline | 1 + .../nodeNextPathCompletions.baseline | 1 + ...nJsDeclarationFilePathCompletions.baseline | 1 + .../reference/quickInfoAlias.baseline | 1 + ...oAtPropWithAmbientDeclarationInJs.baseline | 1 + ...foCircularInstantiationExpression.baseline | 1 + .../reference/quickInfoCommentsClass.baseline | 1 + .../quickInfoCommentsClassMembers.baseline | 1 + .../quickInfoCommentsCommentParsing.baseline | 1 + ...ckInfoCommentsFunctionDeclaration.baseline | 1 + ...ickInfoCommentsFunctionExpression.baseline | 1 + ...splayPartsArrowFunctionExpression.baseline | 1 + .../quickInfoDisplayPartsClass.baseline | 1 + ...ickInfoDisplayPartsClassAccessors.baseline | 1 + ...nfoDisplayPartsClassAutoAccessors.baseline | 1 + ...kInfoDisplayPartsClassConstructor.baseline | 1 + ...DisplayPartsClassDefaultAnonymous.baseline | 1 + ...InfoDisplayPartsClassDefaultNamed.baseline | 1 + ...ckInfoDisplayPartsClassIncomplete.baseline | 1 + .../quickInfoDisplayPartsClassMethod.baseline | 1 + ...uickInfoDisplayPartsClassProperty.baseline | 1 + .../quickInfoDisplayPartsConst.baseline | 1 + .../quickInfoDisplayPartsEnum1.baseline | 1 + .../quickInfoDisplayPartsEnum2.baseline | 1 + .../quickInfoDisplayPartsEnum3.baseline | 1 + .../quickInfoDisplayPartsEnum4.baseline | 1 + ...foDisplayPartsExternalModuleAlias.baseline | 1 + ...ckInfoDisplayPartsExternalModules.baseline | 1 + .../quickInfoDisplayPartsFunction.baseline | 1 + ...nfoDisplayPartsFunctionExpression.baseline | 1 + ...nfoDisplayPartsFunctionIncomplete.baseline | 1 + .../quickInfoDisplayPartsInterface.baseline | 1 + ...kInfoDisplayPartsInterfaceMembers.baseline | 1 + ...foDisplayPartsInternalModuleAlias.baseline | 1 + .../quickInfoDisplayPartsLet.baseline | 1 + ...nfoDisplayPartsLiteralLikeNames01.baseline | 1 + ...uickInfoDisplayPartsLocalFunction.baseline | 1 + .../quickInfoDisplayPartsModules.baseline | 1 + .../quickInfoDisplayPartsParameters.baseline | 1 + .../quickInfoDisplayPartsTypeAlias.baseline | 1 + ...oDisplayPartsTypeParameterInClass.baseline | 1 + ...splayPartsTypeParameterInFunction.baseline | 1 + ...arameterInFunctionLikeInTypeAlias.baseline | 1 + ...playPartsTypeParameterInInterface.baseline | 1 + ...playPartsTypeParameterInTypeAlias.baseline | 1 + .../quickInfoDisplayPartsUsing.baseline | 1 + .../quickInfoDisplayPartsVar.baseline | 1 + ...oDisplayPartsVarWithStringTypes01.baseline | 1 + ...ForArgumentsPropertyNameInJsMode1.baseline | 1 + ...ForArgumentsPropertyNameInJsMode2.baseline | 1 + .../quickInfoForConstAssertions.baseline | 1 + .../quickInfoForJSDocCodefence.baseline | 1 + .../quickInfoForJSDocUnknownTag.baseline | 1 + .../quickInfoForJSDocWithHttpLinks.baseline | 1 + ...foForJSDocWithUnresolvedHttpLinks.baseline | 1 + ...InfoForObjectBindingElementName03.baseline | 1 + ...InfoForObjectBindingElementName04.baseline | 1 + ...InfoForObjectBindingElementName05.baseline | 1 + ...InfoForObjectBindingElementName06.baseline | 1 + .../reference/quickInfoImportMeta.baseline | 1 + .../reference/quickInfoInheritDoc.baseline | 1 + .../reference/quickInfoInheritDoc2.baseline | 1 + .../reference/quickInfoInheritDoc3.baseline | 1 + .../reference/quickInfoInheritDoc4.baseline | 1 + .../reference/quickInfoInheritDoc5.baseline | 1 + .../reference/quickInfoInheritDoc6.baseline | 1 + .../quickInfoInheritedLinkTag.baseline | 1 + .../quickInfoJSDocAtBeforeSpace.baseline | 1 + .../reference/quickInfoJSDocTags.baseline | 1 + .../reference/quickInfoJsDoc.baseline | 1 + .../reference/quickInfoJsDocAlias.baseline | 1 + .../quickInfoJsDocGetterSetter.baseline | 1 + .../quickInfoJsDocInheritage.baseline | 1 + .../reference/quickInfoJsDocTags1.baseline | 1 + .../reference/quickInfoJsDocTags10.baseline | 1 + .../reference/quickInfoJsDocTags11.baseline | 1 + .../reference/quickInfoJsDocTags12.baseline | 1 + .../reference/quickInfoJsDocTags3.baseline | 1 + .../reference/quickInfoJsDocTags4.baseline | 1 + .../reference/quickInfoJsDocTags5.baseline | 1 + .../reference/quickInfoJsDocTags6.baseline | 1 + .../reference/quickInfoJsDocTags7.baseline | 1 + .../reference/quickInfoJsDocTags8.baseline | 1 + .../reference/quickInfoJsDocTags9.baseline | 1 + .../quickInfoJsDocTagsCallback.baseline | 1 + ...ckInfoJsDocTagsFunctionOverload01.baseline | 1 + ...ckInfoJsDocTagsFunctionOverload03.baseline | 1 + ...ckInfoJsDocTagsFunctionOverload05.baseline | 1 + .../quickInfoJsDocTagsTypedef.baseline | 1 + .../quickInfoJsDocTextFormatting1.baseline | 1 + .../reference/quickInfoJsDocThisTag.baseline | 1 + .../reference/quickInfoLink10.baseline | 1 + .../reference/quickInfoLink2.baseline | 1 + .../reference/quickInfoLink3.baseline | 1 + .../reference/quickInfoLink4.baseline | 1 + .../reference/quickInfoLink5.baseline | 1 + .../reference/quickInfoLink6.baseline | 1 + .../reference/quickInfoLink7.baseline | 1 + .../reference/quickInfoLink8.baseline | 1 + .../reference/quickInfoLink9.baseline | 1 + .../reference/quickInfoLinkCodePlain.baseline | 1 + ...nfoNestedExportEqualExportDefault.baseline | 1 + ...laredUsingCatchCallIndexSignature.baseline | 1 + ...singTemplateLiteralTypeSignatures.baseline | 1 + .../quickInfoOnJsxNamespacedName.baseline | 1 + .../quickInfoOnParameterProperties.baseline | 1 + .../reference/quickInfoOnThis5.baseline | 1 + ...rtiesWithIdenticalJSDocComments01.baseline | 1 + ...hodsOnAssignedFunctionExpressions.baseline | 1 + .../reference/quickInfoSatisfiesTag.baseline | 1 + .../reference/quickInfoThrowsTag.baseline | 1 + .../reference/quickInfoTypedefTag.baseline | 1 + .../signatureHelpAfterParameter.baseline | 1 + .../signatureHelpCommentsClass.baseline | 1 + ...signatureHelpCommentsClassMembers.baseline | 1 + ...gnatureHelpCommentsCommentParsing.baseline | 1 + ...reHelpCommentsFunctionDeclaration.baseline | 1 + ...ureHelpCommentsFunctionExpression.baseline | 1 + ...elpConstructorCallParamProperties.baseline | 1 + .../signatureHelpJSDocCallbackTag.baseline | 1 + .../reference/signatureHelpJSDocTags.baseline | 1 + ...natureHelpJSMissingPropertyAccess.baseline | 1 + .../signatureHelpTypeArguments2.baseline | 1 + .../signatureHelpWithUnknown.baseline | 1 + .../signatureHelp_unionType.baseline | 1 + .../reference/smartSelection_JSDoc.baseline | 1 + .../smartSelection_JSDocTags1.baseline | 1 + .../smartSelection_JSDocTags10.baseline | 1 + .../smartSelection_JSDocTags11.baseline | 1 + .../smartSelection_JSDocTags12.baseline | 1 + .../smartSelection_JSDocTags13.baseline | 1 + .../smartSelection_JSDocTags2.baseline | 1 + .../smartSelection_JSDocTags3.baseline | 1 + .../smartSelection_JSDocTags4.baseline | 1 + .../smartSelection_JSDocTags5.baseline | 1 + .../smartSelection_JSDocTags6.baseline | 1 + .../smartSelection_JSDocTags7.baseline | 1 + .../smartSelection_JSDocTags8.baseline | 1 + .../smartSelection_JSDocTags9.baseline | 1 + .../smartSelection_behindCaret.baseline | 1 + .../smartSelection_bindingPatterns.baseline | 1 + .../smartSelection_comment1.baseline | 1 + .../smartSelection_comment2.baseline | 1 + .../reference/smartSelection_complex.baseline | 1 + .../smartSelection_emptyRanges.baseline | 1 + .../smartSelection_function1.baseline | 1 + .../smartSelection_function2.baseline | 1 + .../smartSelection_function3.baseline | 1 + .../smartSelection_functionParams1.baseline | 1 + .../smartSelection_functionParams2.baseline | 1 + .../reference/smartSelection_imports.baseline | 1 + .../smartSelection_lastBlankLine.baseline | 1 + ...Selection_loneVariableDeclaration.baseline | 1 + .../smartSelection_mappedTypes.baseline | 1 + .../smartSelection_objectTypes.baseline | 1 + ...martSelection_punctuationPriority.baseline | 1 + .../reference/smartSelection_simple1.baseline | 1 + .../reference/smartSelection_simple2.baseline | 1 + .../smartSelection_stringLiteral.baseline | 1 + .../smartSelection_templateStrings.baseline | 1 + .../smartSelection_templateStrings2.baseline | 1 + .../trailingCommaSignatureHelp.baseline | 1 + .../events/watchEvents/canUseWatchEvents.js | 8 +- .../autoImportCrossPackage_pathsAndSymlink.js | 432 ++ .../autoImportCrossProject_baseUrl_toDist.js | 474 ++ ...toImportCrossProject_paths_sharedOutDir.js | 446 ++ .../autoImportCrossProject_paths_stripSrc.js | 817 +++ .../autoImportCrossProject_paths_toDist.js | 817 +++ .../autoImportCrossProject_paths_toDist2.js | 481 ++ .../autoImportCrossProject_paths_toSrc.js | 817 +++ ...utoImportCrossProject_symlinks_stripSrc.js | 588 ++ .../autoImportCrossProject_symlinks_toDist.js | 588 ++ .../autoImportCrossProject_symlinks_toSrc.js | 579 ++ .../autoImportFileExcludePatterns1.js | 995 ++++ .../autoImportNodeModuleSymlinkRenamed.js | 451 ++ .../fourslashServer/autoImportProvider1.js | 446 ++ .../fourslashServer/autoImportProvider2.js | 375 ++ .../fourslashServer/autoImportProvider3.js | 776 +++ .../fourslashServer/autoImportProvider4.js | 590 ++ .../fourslashServer/autoImportProvider5.js | 410 ++ .../fourslashServer/autoImportProvider6.js | 1434 +++++ .../fourslashServer/autoImportProvider7.js | 1273 ++++ .../fourslashServer/autoImportProvider8.js | 1273 ++++ .../autoImportProvider_exportMap1.js | 1043 ++++ .../autoImportProvider_exportMap2.js | 1034 ++++ .../autoImportProvider_exportMap3.js | 1038 ++++ .../autoImportProvider_exportMap4.js | 1010 ++++ .../autoImportProvider_exportMap5.js | 1077 ++++ .../autoImportProvider_exportMap6.js | 1084 ++++ .../autoImportProvider_exportMap7.js | 1066 ++++ .../autoImportProvider_exportMap8.js | 1883 ++++++ .../autoImportProvider_exportMap9.js | 1024 ++++ .../autoImportProvider_globalTypingsCache.js | 951 +++ ...rtProvider_namespaceSameNameAsIntrinsic.js | 1183 ++++ .../autoImportProvider_pnpm.js | 439 ++ .../autoImportProvider_referencesCrash.js | 602 ++ .../autoImportProvider_wildcardExports1.js | 1130 ++++ .../autoImportProvider_wildcardExports2.js | 986 ++++ .../autoImportReExportFromAmbientModule.js | 1140 ++++ ...autoImportRelativePathToMonorepoPackage.js | 417 ++ .../autoImportSymlinkedJsPackages.js | 811 +++ .../tsserver/fourslashServer/brace01.js | 1518 +++++ .../callHierarchyContainerNameServer.js | 580 ++ .../completionEntryDetailAcrossFiles01.js | 1146 ++++ .../completionEntryDetailAcrossFiles02.js | 1152 ++++ .../tsserver/fourslashServer/completions01.js | 712 +++ .../tsserver/fourslashServer/completions02.js | 682 +++ .../tsserver/fourslashServer/completions03.js | 155 + ...mport_addToNamedWithDifferentCacheValue.js | 3135 ++++++++++ .../completionsImport_computedSymbolName.js | 1742 ++++++ ...nsImport_defaultAndNamedConflict_server.js | 1013 ++++ ...letionsImport_jsModuleExportsAssignment.js | 1975 +++++++ .../completionsImport_mergedReExport.js | 1864 ++++++ ...mpletionsImport_sortingModuleSpecifiers.js | 1029 ++++ .../completionsOverridingMethodCrash2.js | 629 ++ .../fourslashServer/configurePlugin.js | 334 ++ .../convertFunctionToEs6Class-server1.js | 244 + .../convertFunctionToEs6Class-server2.js | 246 + .../declarationMapGoToDefinition.js | 305 + .../declarationMapsEnableMapping_NoInline.js | 552 ++ ...rationMapsEnableMapping_NoInlineSources.js | 554 ++ ...clarationMapsGeneratedMapsEnableMapping.js | 550 ++ ...larationMapsGeneratedMapsEnableMapping2.js | 562 ++ ...larationMapsGeneratedMapsEnableMapping3.js | 582 ++ ...ionMapsGoToDefinitionRelativeSourceRoot.js | 301 + ...oToDefinitionSameNameDifferentDirectory.js | 484 ++ .../declarationMapsOutOfDateMapping.js | 225 + .../tsserver/fourslashServer/definition01.js | 143 + .../fourslashServer/documentHighlights01.js | 479 ++ .../fourslashServer/documentHighlights02.js | 505 ++ ...ghlightsTypeParameterInHeritageClause01.js | 324 ++ .../fixExtractToInnerFunctionDuplicaton.js | 629 ++ .../tsserver/fourslashServer/format01.js | 312 + .../formatBracketInSwitchCase.js | 139 + .../tsserver/fourslashServer/formatOnEnter.js | 215 + ...formatSpaceBetweenFunctionAndArrayIndex.js | 143 + .../tsserver/fourslashServer/formatonkey01.js | 169 + .../getFileReferences_deduplicate.js | 433 ++ .../getFileReferences_server1.js | 284 + .../getFileReferences_server2.js | 503 ++ .../getJavaScriptSyntacticDiagnostics01.js | 158 + .../getJavaScriptSyntacticDiagnostics02.js | 206 + .../getOutliningSpansForComments.js | 171 + .../getOutliningSpansForRegions.js | 379 ++ ...tliningSpansForRegionsNoSingleLineFolds.js | 272 + .../goToDefinitionScriptImportServer.js | 271 + .../goToImplementation_inDifferentFiles.js | 177 + .../goToSource10_mapFromAtTypes3.js | 291 + .../goToSource11_propertyOfAlias.js | 188 + .../goToSource12_callbackParam.js | 249 + .../fourslashServer/goToSource13_nodenext.js | 287 + ...Source14_unresolvedRequireDestructuring.js | 99 + .../fourslashServer/goToSource15_bundler.js | 324 ++ ...goToSource16_callbackParamDifferentFile.js | 275 + .../goToSource17_AddsFileToProject.js | 289 + .../goToSource18_reusedFromDifferentFolder.js | 291 + .../goToSource1_localJsBesideDts.js | 220 + .../goToSource2_nodeModulesWithTypes.js | 204 + .../goToSource3_nodeModulesAtTypes.js | 223 + .../goToSource5_sameAsGoToDef1.js | 229 + .../goToSource6_sameAsGoToDef2.js | 250 + .../goToSource7_conditionallyMinified.js | 233 + .../goToSource8_mapFromAtTypes.js | 315 + .../goToSource9_mapFromAtTypes2.js | 354 ++ .../fourslashServer/implementation01.js | 130 + .../fourslashServer/impliedNodeFormat.js | 444 ++ ...importNameCodeFix_externalNonRelateive2.js | 995 ++++ .../importNameCodeFix_externalNonRelative1.js | 858 +++ .../importNameCodeFix_pnpm1.js | 390 ++ .../importStatementCompletions_pnpm1.js | 329 ++ ...portStatementCompletions_pnpmTransitive.js | 293 + .../importSuggestionsCache_ambient.js | 5144 +++++++++++++++++ .../importSuggestionsCache_coreNodeModules.js | 3278 +++++++++++ .../importSuggestionsCache_exportUndefined.js | 1653 ++++++ ...portSuggestionsCache_invalidPackageJson.js | 839 +++ ...portSuggestionsCache_moduleAugmentation.js | 4349 ++++++++++++++ .../isDefinitionAcrossGlobalProjects.js | 1741 ++++++ .../isDefinitionAcrossModuleProjects.js | 2817 +++++++++ .../fourslashServer/jsdocCallbackTag.js | 256 + .../jsdocCallbackTagNavigateTo.js | 190 + .../jsdocCallbackTagRename01.js | 208 + .../jsdocParamTagSpecialKeywords.js | 282 + .../fourslashServer/jsdocTypedefTag.js | 3021 ++++++++++ .../fourslashServer/jsdocTypedefTag1.js | 305 + .../fourslashServer/jsdocTypedefTag2.js | 427 ++ .../jsdocTypedefTagGoToDefinition.js | 207 + .../jsdocTypedefTagNamespace.js | 843 +++ .../jsdocTypedefTagNavigateTo.js | 392 ++ .../jsdocTypedefTagRename01.js | 462 ++ .../jsdocTypedefTagRename02.js | 317 + .../jsdocTypedefTagRename03.js | 338 ++ .../jsdocTypedefTagRename04.js | 311 + .../moveToFile_emptyTargetFile.js | 386 ++ .../tsserver/fourslashServer/navbar01.js | 1260 ++++ .../tsserver/fourslashServer/navto01.js | 289 + .../fourslashServer/navto_serverExcludeLib.js | 258 + .../tsserver/fourslashServer/ngProxy1.js | 278 + .../tsserver/fourslashServer/ngProxy2.js | 278 + .../tsserver/fourslashServer/ngProxy3.js | 277 + .../tsserver/fourslashServer/ngProxy4.js | 297 + .../nodeNextModuleKindCaching1.js | 384 ++ .../nodeNextPathCompletions.js | 980 ++++ .../nonJsDeclarationFilePathCompletions.js | 300 + .../tsserver/fourslashServer/occurrences01.js | 763 +++ .../tsserver/fourslashServer/occurrences02.js | 479 ++ .../tsserver/fourslashServer/openFile.js | 300 + .../fourslashServer/openFileWithSyntaxKind.js | 268 + .../tsserver/fourslashServer/projectInfo01.js | 544 ++ .../tsserver/fourslashServer/projectInfo02.js | 184 + .../projectWithNonExistentFiles.js | 212 + .../tsserver/fourslashServer/quickinfo01.js | 204 + .../fourslashServer/quickinfoWrongComment.js | 135 + .../fourslashServer/referenceToEmptyObject.js | 110 + .../tsserver/fourslashServer/references01.js | 208 + .../referencesInConfiguredProject.js | 233 + .../fourslashServer/referencesInEmptyFile.js | 110 + ...ferencesInEmptyFileWithMultipleProjects.js | 343 ++ ...nStringLiteralValueWithMultipleProjects.js | 364 ++ ...eferencesToNonPropertyNameStringLiteral.js | 131 + .../referencesToStringLiteralValue.js | 131 + .../tsserver/fourslashServer/rename01.js | 218 + .../renameInConfiguredProject.js | 372 ++ .../fourslashServer/renameNamedImport.js | 425 ++ .../fourslashServer/renameNamespaceImport.js | 424 ++ .../semanticClassificationJs1.js | 126 + .../fourslashServer/signatureHelp01.js | 199 + .../signatureHelpJSDocCallbackTag.js | 677 +++ .../tripleSlashReferenceResolutionMode.js | 304 + .../tsconfigComputedPropertyError.js | 227 + .../fourslashServer/tsxIncrementalServer.js | 726 +++ .../fourslashServer/typeReferenceOnServer.js | 177 + .../fourslashServer/typedefinition01.js | 139 + ...terStringCompletionsInNestedCall2.baseline | 1 + ...cellationWhenfindingAllRefsOnDefinition.ts | 20 +- .../fourslash/duplicatePackageServices.ts | 6 +- .../findAllReferencesDynamicImport2.ts | 6 +- .../findAllReferencesDynamicImport3.ts | 6 +- .../findAllRefsClassWithStaticThisAccess.ts | 6 +- ...indAllRefsDefaultImportThroughNamespace.ts | 10 +- .../fourslash/findAllRefsForDefaultExport.ts | 6 +- .../findAllRefsForDefaultExportAnonymous.ts | 6 +- tests/cases/fourslash/findAllRefsForModule.ts | 6 +- .../findAllRefsImportStarOfExportEquals.ts | 10 +- .../fourslash/findAllRefsOnImportAliases2.ts | 6 +- .../findAllRefsPrefixSuffixPreference.ts | 12 +- tests/cases/fourslash/findAllRefsPrimitive.ts | 7 +- .../fourslash/findAllRefsReExportLocal.ts | 14 +- ...findAllRefsReExportRightNameWrongSymbol.ts | 14 +- tests/cases/fourslash/findAllRefsReExports.ts | 26 +- .../findAllRefsReExportsUseInImportType.ts | 15 +- .../findAllRefsRenameImportWithSameName.ts | 6 +- .../findAllRefs_importType_exportEquals.ts | 6 +- .../fourslash/findReferencesAfterEdit.ts | 16 +- .../fourslash/findReferencesJSXTagName3.ts | 23 +- tests/cases/fourslash/fourslash.ts | 22 - .../fourslash/getOccurrencesAbstract02.ts | 6 +- .../fourslash/getOccurrencesAfterEdit.ts | 16 +- .../cases/fourslash/getOccurrencesConst01.ts | 6 +- .../cases/fourslash/getOccurrencesConst02.ts | 6 +- .../cases/fourslash/getOccurrencesConst03.ts | 6 +- .../fourslash/getOccurrencesIfElseBroken.ts | 6 +- .../fourslash/getOccurrencesReadonly3.ts | 6 +- .../fourslash/getOccurrencesReturnBroken.ts | 6 +- .../getOccurrencesSwitchCaseDefault4.ts | 6 +- tests/cases/fourslash/goToTypeDefinition4.ts | 6 +- tests/cases/fourslash/hoverOverComment.ts | 6 +- tests/cases/fourslash/jsDocServices.ts | 12 +- .../fourslash/jsdocTypedefTagServices.ts | 10 +- tests/cases/fourslash/jsxSpreadReference.ts | 6 +- ...-declaration-with-variable-entity-names.ts | 6 +- .../fourslash/quickInfoUntypedModuleImport.ts | 7 +- tests/cases/fourslash/renameDefaultImport.ts | 8 +- .../renameDefaultImportDifferentName.ts | 10 +- .../renameImportAndExportInDiffFiles.ts | 6 +- .../fourslash/renameImportOfExportEquals.ts | 14 +- .../fourslash/renameImportOfExportEquals2.ts | 6 +- .../cases/fourslash/renameImportOfReExport.ts | 10 +- .../fourslash/renameImportOfReExport2.ts | 10 +- tests/cases/fourslash/renameJsExports01.ts | 6 +- .../declarationMapsEnableMapping_NoInline.ts | 10 +- ...rationMapsEnableMapping_NoInlineSources.ts | 10 +- ...clarationMapsGeneratedMapsEnableMapping.ts | 10 +- ...larationMapsGeneratedMapsEnableMapping2.ts | 10 +- ...larationMapsGeneratedMapsEnableMapping3.ts | 10 +- .../server/goToSource5_sameAsGoToDef1.ts | 6 +- .../server/goToSource6_sameAsGoToDef2.ts | 6 +- .../fourslash/transitiveExportImports.ts | 10 +- .../fourslash/transitiveExportImports2.ts | 10 +- .../fourslash/transitiveExportImports3.ts | 12 +- 735 files changed, 110586 insertions(+), 1046 deletions(-) create mode 100644 src/harness/tsserverLogger.ts create mode 100644 src/harness/watchUtils.ts rename tests/baselines/reference/{bpSpanDestructuringAssignmentForArrayBindingPattern.baseline => breakpointValidationDestructuringAssignmentForArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForObjectBindingPattern.baseline => breakpointValidationDestructuringAssignmentForObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline => breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline => breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline => breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForArrayBindingPattern.baseline => breakpointValidationDestructuringForArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringForArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForObjectBindingPattern.baseline => breakpointValidationDestructuringForObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringForObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForOfArrayBindingPattern.baseline => breakpointValidationDestructuringForOfArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForOfObjectBindingPattern.baseline => breakpointValidationDestructuringForOfObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterArrayBindingPattern.baseline => breakpointValidationDestructuringParameterArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterArrayBindingPattern2.baseline => breakpointValidationDestructuringParameterArrayBindingPattern2.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline => breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterNestedObjectBindingPattern.baseline => breakpointValidationDestructuringParameterNestedObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterObjectBindingPattern.baseline => breakpointValidationDestructuringParameterObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline => breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatement.baseline => breakpointValidationDestructuringVariableStatement.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatement1.baseline => breakpointValidationDestructuringVariableStatement1.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementArrayBindingPattern.baseline => breakpointValidationDestructuringVariableStatementArrayBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline => breakpointValidationDestructuringVariableStatementArrayBindingPattern2.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline => breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline => breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementDefaultValues.baseline => breakpointValidationDestructuringVariableStatementDefaultValues.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline => breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.baseline} (99%) rename tests/baselines/reference/{bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline => breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline} (99%) create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossPackage_pathsAndSymlink.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_sharedOutDir.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportFileExcludePatterns1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportNodeModuleSymlinkRenamed.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider3.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider5.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_globalTypingsCache.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/brace01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/callHierarchyContainerNameServer.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completions01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completions02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completions03.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapGoToDefinition.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionRelativeSourceRoot.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionSameNameDifferentDirectory.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/declarationMapsOutOfDateMapping.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/definition01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/documentHighlights01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/documentHighlights02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/documentHighlightsTypeParameterInHeritageClause01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/fixExtractToInnerFunctionDuplicaton.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/format01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/formatBracketInSwitchCase.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/formatOnEnter.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/formatSpaceBetweenFunctionAndArrayIndex.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/formatonkey01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForComments.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegions.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegionsNoSingleLineFolds.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToDefinitionScriptImportServer.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToImplementation_inDifferentFiles.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource10_mapFromAtTypes3.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource11_propertyOfAlias.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource12_callbackParam.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource13_nodenext.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource14_unresolvedRequireDestructuring.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource16_callbackParamDifferentFile.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource17_AddsFileToProject.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource18_reusedFromDifferentFolder.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource2_nodeModulesWithTypes.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource3_nodeModulesAtTypes.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource5_sameAsGoToDef1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource6_sameAsGoToDef2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource7_conditionallyMinified.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource8_mapFromAtTypes.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/goToSource9_mapFromAtTypes2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/implementation01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelative1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossGlobalProjects.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossModuleProjects.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTag.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagNavigateTo.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagRename01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocParamTagSpecialKeywords.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagGoToDefinition.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNamespace.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNavigateTo.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename03.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename04.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/moveToFile_emptyTargetFile.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/navbar01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/navto01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/navto_serverExcludeLib.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/nodeNextPathCompletions.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/nonJsDeclarationFilePathCompletions.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/occurrences01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/occurrences02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/openFile.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/openFileWithSyntaxKind.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/projectInfo01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/projectInfo02.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/projectWithNonExistentFiles.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/quickinfo01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/quickinfoWrongComment.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referenceToEmptyObject.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/references01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesInConfiguredProject.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFile.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesToNonPropertyNameStringLiteral.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/referencesToStringLiteralValue.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/rename01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/renameInConfiguredProject.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/semanticClassificationJs1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/signatureHelp01.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/signatureHelpJSDocCallbackTag.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/tsxIncrementalServer.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/typeReferenceOnServer.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/typedefinition01.js diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index d1ef154ffe4..946134e0309 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -5,6 +5,9 @@ import * as ts from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; +import { + Logger, +} from "./tsserverLogger"; import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; @@ -226,6 +229,12 @@ function realizeDiagnostic(diagnostic: ts.Diagnostic, newLine: string): Realized }; } +interface BaselineTest { + command: string; + actual: string; + ext: string | undefined; +} + export class TestState { // Language service instance private languageServiceAdapterHost: Harness.LanguageService.LanguageServiceAdapterHost; @@ -250,6 +259,8 @@ export class TestState { private inputFiles = new Map(); // Map between inputFile's fileName and its content for easily looking up when resolving references + private logger: Logger | undefined; + private static getDisplayPartsJson(displayParts: ts.SymbolDisplayPart[] | undefined) { let result = ""; ts.forEach(displayParts, part => { @@ -358,6 +369,7 @@ export class TestState { } const languageServiceAdapter = this.getLanguageServiceAdapter(testType, this.cancellationToken, compilationOptions); + this.logger = languageServiceAdapter.getLogger(); this.languageServiceAdapterHost = languageServiceAdapter.getHost(); this.languageService = memoWrap(languageServiceAdapter.getLanguageService(), this); // Wrap the LS to cache some expensive operations certain tests call repeatedly if (this.testType === FourSlashTestType.Server) { @@ -445,6 +457,11 @@ export class TestState { this.formatCodeSettings = ts.testFormatSettings; + if (this.logger?.loggingEnabled()) { + const patch = this.languageServiceAdapterHost.vfs.diff(); + this.logger.log(vfs.formatPatch(patch) || ""); + } + // Open the first file by default this.openFile(0); @@ -482,6 +499,31 @@ export class TestState { } } + private baselineFromTest: BaselineTest[] | undefined; + + private baseline(command: string, actual: string, ext?: string) { + if (!this.baselineFromTest) this.baselineFromTest = [{ command, actual, ext }]; + else this.baselineFromTest.push({ command, actual, ext }); + } + + baselineTest() { + if (this.baselineFromTest) { + Harness.Baseline.runBaseline( + this.getBaselineFileNameForContainingTestFile(this.baselineFromTest[0].ext), + this.baselineFromTest.map(({ command, actual }) => `// === ${command} ===\n${actual}`).join("\n\n\n\n"), + ); + } + } + + baselineTsserverLog() { + if (this.logger) { + Harness.Baseline.runBaseline( + `tsserver/fourslashServer/${ts.getBaseFileName(this.originalInputFileName).replace(".ts", ".js")}`, + this.logger.logs!.join("\n"), + ); + } + } + private getFileContent(fileName: string): string { return ts.Debug.checkDefined(this.tryGetFileContent(fileName)); } @@ -827,6 +869,71 @@ export class TestState { return baseline; } + public baselineGoToDefinition( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + this.baselineEachMarkerOrRange("goToDefinition", markerOrRange, rangeText, markerOrRange => + this.baselineGoToDefs( + "/*GOTO DEF*/", + markerOrRange, + () => this.getGoToDefinitionAndBoundSpan(), + )); + } + + public baselineGetDefinitionAtPosition( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + this.baselineEachMarkerOrRange("getDefinitionAtPosition", markerOrRange, rangeText, markerOrRange => + this.baselineGoToDefs( + "/*GOTO DEF POS*/", + markerOrRange, + () => this.getGoToDefinition(), + )); + } + + public baselineGoToSourceDefinition( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + if (this.testType !== FourSlashTestType.Server) { + this.raiseError("goToSourceDefinition may only be used in fourslash/server tests."); + } + this.baselineEachMarkerOrRange("goToSourceDefinition", markerOrRange, rangeText, markerOrRange => + this.baselineGoToDefs( + "/*GOTO SOURCE DEF*/", + markerOrRange, + () => + (this.languageService as ts.server.SessionClient) + .getSourceDefinitionAndBoundSpan(this.activeFile.fileName, this.currentCaretPosition), + )); + } + + public baselineGoToType( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + this.baselineEachMarkerOrRange("goToType", markerOrRange, rangeText, markerOrRange => + this.baselineGoToDefs( + "/*GOTO TYPE*/", + markerOrRange, + () => this.languageService.getTypeDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition), + )); + } + + public baselineGoToImplementation( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + this.baselineEachMarkerOrRange("goToImplementation", markerOrRange, rangeText, markerOrRange => + this.baselineGoToDefs( + "/*GOTO IMPL*/", + markerOrRange, + () => this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition), + )); + } + public verifyGetEmitOutputForCurrentFile(expected: string): void { const emit = this.languageService.getEmitOutput(this.activeFile.fileName); if (emit.outputFiles.length !== 1) { @@ -855,7 +962,6 @@ export class TestState { return a.position - b.position; }; - const baselineFile = this.getBaselineFileNameForContainingTestFile(); const fileName = this.activeFile.fileName; const hints = this.languageService.provideInlayHints(fileName, span, preferences); const annotations = ts.map(hints.sort(sortHints), hint => { @@ -880,7 +986,7 @@ export class TestState { annotations.push("=== No inlay hints ==="); } - Harness.Baseline.runBaseline(baselineFile, annotations.join("\n\n")); + this.baseline("Inlay Hints", annotations.join("\n\n")); } public verifyCompletions(options: FourSlashInterface.VerifyCompletionsOptions) { @@ -1220,184 +1326,106 @@ export class TestState { } } - public verifyBaselineCommands(...commands: FourSlashInterface.BaselineCommand[]) { - let baselineContent = ""; - const baselineEachMarkerOrRange = ( - command: FourSlashInterface.BaselineCommandWithMarkerOrRange, - worker: (markerORange: MarkerOrNameOrRange) => string, - ) => { - let done = false; - if (command.markerOrRange !== undefined) { - done = baselineArrayOrSingle(command, command.markerOrRange, worker); - } - if (command.rangeText !== undefined) { - toArray(command.rangeText).forEach(text => done = baselineArrayOrSingle(command, this.rangesByText().get(text)!, worker) || done); - } - if (!done) { - baselineArrayOrSingle(command, this.getRanges(), worker); - } - }; - commands.forEach(command => { - switch (command.type) { - case "findAllReferences": - return baselineEachMarkerOrRange( - command, - markerOrRange => this.baselineFindAllReferencesWorker(markerOrRange), - ); - case "getFileReferences": - return baselineArrayOrSingle( - command, - command.fileName, - fileName => this.baselineGetFileReferences(fileName), - ); - case "findRenameLocations": - return baselineEachMarkerOrRange( - command, - markerOrRange => this.baselineRenameWorker(markerOrRange, command.options), - ); - case "goToDefinition": - return baselineEachMarkerOrRange( - command, - markerOrRange => - this.baselineGoToDefs( - "/*GOTO DEF*/", - markerOrRange, - () => this.getGoToDefinitionAndBoundSpan(), - ), - ); - case "getDefinitionAtPosition": - return baselineEachMarkerOrRange( - command, - markerOrRange => - this.baselineGoToDefs( - "/*GOTO DEF POS*/", - markerOrRange, - () => this.getGoToDefinition(), - ), - ); - case "goToSourceDefinition": - if (this.testType !== FourSlashTestType.Server) { - this.raiseError("goToSourceDefinition may only be used in fourslash/server tests."); + private baselineEachMarkerOrRangeArrayOrSingle( + command: string, + markerOrRange: ArrayOrSingle | undefined, + rangeText: ArrayOrSingle | undefined, + worker: (markerORange: MarkerOrNameOrRange) => string, + ) { + return this.baselineEachMarkerOrRange( + command, + markerOrRange !== undefined ? toArray(markerOrRange) : undefined, + rangeText !== undefined ? toArray(rangeText) : undefined, + worker, + ); + } + + private baselineEachMarkerOrRange( + command: string, + markerOrRange: readonly MarkerOrNameOrRange[] | undefined, + rangeText: readonly string[] | undefined, + worker: (markerORange: MarkerOrNameOrRange) => string, + ) { + let done = false; + if (markerOrRange !== undefined) { + done = this.baselineArray(command, markerOrRange, worker); + } + if (rangeText !== undefined) { + toArray(rangeText).forEach(text => done = this.baselineArray(command, this.rangesByText().get(text)!, worker) || done); + } + if (!done) this.baselineArray(command, this.getRanges(), worker); + } + + private baselineArray( + command: string, + array: readonly T[], + worker: (single: T) => string, + ) { + array.forEach(single => this.baseline(command, worker(single), ".baseline.jsonc")); + return !!array.length; + } + + public baselineFindAllReferences( + markerOrRange: MarkerOrNameOrRange[] | undefined, + rangeText: string[] | undefined, + ) { + this.baselineEachMarkerOrRange("findAllReferences", markerOrRange, rangeText, markerOrRange => { + this.goToMarkerOrNameOrRange(markerOrRange); + const references = this.findReferencesAtCaret(); + const defIdMap = new Map(); + const markerInfo = { markerOrRange, markerName: "/*FIND ALL REFS*/" }; + let baseline = this.getBaselineForDocumentSpansWithFileContents( + ts.flatMap(references, (r, def) => { + if (references!.length > 1) { + defIdMap.set(r.definition, def); + r.references.forEach(r => defIdMap.set(r, def)); } - return baselineEachMarkerOrRange( - command, - markerOrRange => - this.baselineGoToDefs( - "/*GOTO SOURCE DEF*/", - markerOrRange, - () => - (this.languageService as ts.server.SessionClient) - .getSourceDefinitionAndBoundSpan(this.activeFile.fileName, this.currentCaretPosition), - ), - ); - case "goToType": - return baselineEachMarkerOrRange( - command, - markerOrRange => - this.baselineGoToDefs( - "/*GOTO TYPE*/", - markerOrRange, - () => this.languageService.getTypeDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition), - ), - ); - case "goToImplementation": - return baselineEachMarkerOrRange( - command, - markerOrRange => - this.baselineGoToDefs( - "/*GOTO IMPL*/", - markerOrRange, - () => this.languageService.getImplementationAtPosition(this.activeFile.fileName, this.currentCaretPosition), - ), - ); - case "documentHighlights": - return baselineEachMarkerOrRange( - command, - markerOrRange => this.baselineGetDocumentHighlights(markerOrRange, command.options), - ); - case "customWork": - return addToBaseline(command, readableJsoncBaseline(command.work() || "")); - default: - ts.Debug.assertNever(command); - } - }); - Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(".baseline.jsonc"), baselineContent); - - function baselineArrayOrSingle( - command: FourSlashInterface.BaselineCommand, - arrayOrSingle: ArrayOrSingle, - worker: (single: T) => string, - ) { - if (ts.isArray(arrayOrSingle)) { - arrayOrSingle.forEach(single => addToBaseline(command, worker(single))); - return !!arrayOrSingle.length; - } - else { - addToBaseline(command, worker(arrayOrSingle)); - return true; - } - } - - function addToBaseline(command: FourSlashInterface.BaselineCommand, text: string) { - if (baselineContent) baselineContent += "\n\n\n\n"; - baselineContent += `// === ${command.type} ===\n` + text; - } - } - - private baselineFindAllReferencesWorker(markerOrRange: MarkerOrNameOrRange) { - this.goToMarkerOrNameOrRange(markerOrRange); - const references = this.findReferencesAtCaret(); - const defIdMap = new Map(); - const markerInfo = { markerOrRange, markerName: "/*FIND ALL REFS*/" }; - let baseline = this.getBaselineForDocumentSpansWithFileContents( - ts.flatMap(references, (r, def) => { - if (references!.length > 1) { - defIdMap.set(r.definition, def); - r.references.forEach(r => defIdMap.set(r, def)); - } - return r.references; - }), - { - markerInfo, - documentSpanId: defIdMap.size ? ref => `defId: ${defIdMap.get(ref)}` : undefined, - }, - ); - if (references?.length) { - baseline += "\n\n"; - baseline += indentJsonBaseline( - "// === Definitions ===\n" + - this.getBaselineForDocumentSpansWithFileContents( - references.map(r => r.definition), - { - markerInfo, - documentSpanId: defIdMap.size ? def => `defId: ${defIdMap.get(def)}` : undefined, - skipDocumentSpanDetails: true, - skipDocumentContainingOnlyMarker: true, - }, - ) + - "\n\n// === Details ===\n" + - JSON.stringify( - references.map(r => ({ - defId: defIdMap.get(r.definition), - ...r.definition, - fileName: undefined, - textSpan: undefined, - contextSpan: undefined, - })), - undefined, - " ", - ), + return r.references; + }), + { + markerInfo, + documentSpanId: defIdMap.size ? ref => `defId: ${defIdMap.get(ref)}` : undefined, + }, ); - } - return baseline; + if (references?.length) { + baseline += "\n\n"; + baseline += indentJsonBaseline( + "// === Definitions ===\n" + + this.getBaselineForDocumentSpansWithFileContents( + references.map(r => r.definition), + { + markerInfo, + documentSpanId: defIdMap.size ? def => `defId: ${defIdMap.get(def)}` : undefined, + skipDocumentSpanDetails: true, + skipDocumentContainingOnlyMarker: true, + }, + ) + + "\n\n// === Details ===\n" + + JSON.stringify( + references.map(r => ({ + defId: defIdMap.get(r.definition), + ...r.definition, + fileName: undefined, + textSpan: undefined, + contextSpan: undefined, + })), + undefined, + " ", + ), + ); + } + return baseline; + }); } - private baselineGetFileReferences(fileName: string) { - const references = this.languageService.getFileReferences(fileName); - return `// fileName: ${fileName}\n\n` + this.getBaselineForDocumentSpansWithFileContents( - references, - { markerInfo: undefined }, - ); + public baselineGetFileReferences(fileNames: string[]) { + this.baselineArray("getFileReferences", fileNames, fileName => { + const references = this.languageService.getFileReferences(fileName); + return `// fileName: ${fileName}\n\n` + this.getBaselineForDocumentSpansWithFileContents( + references, + { markerInfo: undefined }, + ); + }); } private getBaselineForDocumentSpansWithFileContents( @@ -1869,47 +1897,53 @@ export class TestState { } } - private baselineRenameWorker(markerOrRange: MarkerOrNameOrRange, options?: FourSlashInterface.RenameOptions) { - const { fileName, position } = ts.isString(markerOrRange) ? - this.getMarkerByName(markerOrRange) : - isMarker(markerOrRange) ? - markerOrRange : - { fileName: markerOrRange.fileName, position: markerOrRange.pos }; - const { - findInStrings = false, - findInComments = false, - providePrefixAndSuffixTextForRename = true, - quotePreference = "double", - } = options || {}; - const locations = this.languageService.findRenameLocations( - fileName, - position, - findInStrings, - findInComments, - { providePrefixAndSuffixTextForRename, quotePreference }, - ); + public baselineRename( + markerOrRange: ArrayOrSingle | undefined, + rangeText: ArrayOrSingle | undefined, + options: FourSlashInterface.RenameOptions | undefined, + ) { + this.baselineEachMarkerOrRangeArrayOrSingle("findRenameLocations", markerOrRange, rangeText, markerOrRange => { + const { fileName, position } = ts.isString(markerOrRange) ? + this.getMarkerByName(markerOrRange) : + isMarker(markerOrRange) ? + markerOrRange : + { fileName: markerOrRange.fileName, position: markerOrRange.pos }; + const { + findInStrings = false, + findInComments = false, + providePrefixAndSuffixTextForRename = true, + quotePreference = "double", + } = options || {}; + const locations = this.languageService.findRenameLocations( + fileName, + position, + findInStrings, + findInComments, + { providePrefixAndSuffixTextForRename, quotePreference }, + ); - if (!locations) { - this.raiseError(`baselineRename failed. Could not rename at the provided position.`); - } + if (!locations) { + this.raiseError(`baselineRename failed. Could not rename at the provided position.`); + } - const renameOptions = options ? - (options.findInStrings !== undefined ? `// @findInStrings: ${findInStrings}\n` : "") + - (options.findInComments !== undefined ? `// @findInComments: ${findInComments}\n` : "") + - (options.providePrefixAndSuffixTextForRename !== undefined ? `// @providePrefixAndSuffixTextForRename: ${providePrefixAndSuffixTextForRename}\n` : "") + - (options.quotePreference !== undefined ? `// @quotePreference: ${quotePreference}\n` : "") : - ""; + const renameOptions = options ? + (options.findInStrings !== undefined ? `// @findInStrings: ${findInStrings}\n` : "") + + (options.findInComments !== undefined ? `// @findInComments: ${findInComments}\n` : "") + + (options.providePrefixAndSuffixTextForRename !== undefined ? `// @providePrefixAndSuffixTextForRename: ${providePrefixAndSuffixTextForRename}\n` : "") + + (options.quotePreference !== undefined ? `// @quotePreference: ${quotePreference}\n` : "") : + ""; - return renameOptions + (renameOptions ? "\n" : "") + this.getBaselineForDocumentSpansWithFileContents( - locations, - { - markerInfo: { markerOrRange, markerName: "/*RENAME*/" }, - endMarker: "RENAME|]", - startMarkerPrefix: span => span.prefixText ? `/*START PREFIX*/${span.prefixText}` : "", - endMarkerSuffix: span => span.suffixText ? `${span.suffixText}/*END SUFFIX*/` : "", - ignoredDocumentSpanProperties: ["prefixText", "suffixText"], - }, - ); + return renameOptions + (renameOptions ? "\n" : "") + this.getBaselineForDocumentSpansWithFileContents( + locations, + { + markerInfo: { markerOrRange, markerName: "/*RENAME*/" }, + endMarker: "RENAME|]", + startMarkerPrefix: span => span.prefixText ? `/*START PREFIX*/${span.prefixText}` : "", + endMarkerSuffix: span => span.suffixText ? `${span.suffixText}/*END SUFFIX*/` : "", + ignoredDocumentSpanProperties: ["prefixText", "suffixText"], + }, + ); + }); } public verifyQuickInfoExists(negative: boolean) { @@ -2228,8 +2262,7 @@ export class TestState { } public baselineCurrentFileBreakpointLocations() { - const baselineFile = this.getBaselineFileNameForInternalFourslashFile().replace("breakpointValidation", "bpSpan"); - Harness.Baseline.runBaseline(baselineFile, this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos)!)); + this.baseline("breakpoints", this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos)!)); } private getEmitFiles(): readonly FourSlashFile[] { @@ -2293,7 +2326,7 @@ export class TestState { resultString += Harness.IO.newLine(); } - Harness.Baseline.runBaseline(ts.Debug.checkDefined(this.testData.globalOptions[MetadataOptionNames.baselineFile]), resultString); + this.baseline("EmitOutput", resultString); } private flattenChainedMessage(diag: ts.DiagnosticMessageChain, indent = " ") { @@ -2310,7 +2343,7 @@ export class TestState { public baselineSyntacticDiagnostics() { const files = this.getCompilerTestFiles(); const result = this.getSyntacticDiagnosticBaselineText(files); - Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(), result); + this.baseline("Syntax Diagnostics", result); } private getCompilerTestFiles() { @@ -2326,7 +2359,7 @@ export class TestState { + Harness.IO.newLine() + Harness.IO.newLine() + this.getSemanticDiagnosticBaselineText(files); - Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(), result); + this.baseline("Syntax and Semantic Diagnostics", result); } private getSyntacticDiagnosticBaselineText(files: Harness.Compiler.TestFile[]) { @@ -2346,7 +2379,6 @@ export class TestState { } public baselineQuickInfo() { - const baselineFile = this.getBaselineFileNameForContainingTestFile(); const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ marker: { ...marker, name }, item: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position), @@ -2361,11 +2393,10 @@ export class TestState { ...(tags?.length ? tags.map(p => `@${p.name} ${p.text?.map(dp => dp.text).join("") ?? ""}`).join("\n").split("\n") : []), ], ); - Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); + this.baseline("QuickInfo", annotations + "\n\n" + stringify(result)); } public baselineSignatureHelp() { - const baselineFile = this.getBaselineFileNameForContainingTestFile(); const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ marker: { ...marker, name }, item: this.languageService.getSignatureHelpItems(marker.fileName, marker.position, /*options*/ undefined), @@ -2396,11 +2427,10 @@ export class TestState { return tooltip; }, ); - Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); + this.baseline("SignatureHelp", annotations + "\n\n" + stringify(result)); } public baselineCompletions(preferences?: ts.UserPreferences) { - const baselineFile = this.getBaselineFileNameForContainingTestFile(); const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => { this.goToMarker(marker); const completions = this.getCompletionListAtCaret(preferences); @@ -2443,8 +2473,8 @@ export class TestState { } } } - Harness.Baseline.runBaseline( - baselineFile, + this.baseline( + "Completions", annotations + "\n\n" + stringify(result, (key, value) => { return key === "exportMapKey" ? value.replace(/ \d+ /g, " * ") @@ -2503,7 +2533,6 @@ export class TestState { public baselineSmartSelection() { const n = "\n"; - const baselineFile = this.getBaselineFileNameForContainingTestFile(); const markers = this.getMarkers(); const fileContent = this.activeFile.content; const text = markers.map(marker => { @@ -2531,7 +2560,7 @@ export class TestState { return baselineContent.join(fileContent.includes("\n") ? n + n : n); }).join(n.repeat(2) + "=".repeat(80) + n.repeat(2)); - Harness.Baseline.runBaseline(baselineFile, text); + this.baseline("Smart Selection", text); } public printBreakpointLocation(pos: number) { @@ -2589,11 +2618,6 @@ export class TestState { Harness.IO.log(stringify(help.items[help.selectedItemIndex])); } - private getBaselineFileNameForInternalFourslashFile(ext = ".baseline") { - return this.testData.globalOptions[MetadataOptionNames.baselineFile] || - ts.getBaseFileName(this.activeFile.fileName).replace(ts.Extension.Ts, ext); - } - private getBaselineFileNameForContainingTestFile(ext = ".baseline") { return this.testData.globalOptions[MetadataOptionNames.baselineFile] || ts.getBaseFileName(this.originalInputFileName).replace(ts.Extension.Ts, ext); @@ -3006,8 +3030,8 @@ export class TestState { } public baselineCurrentFileNameOrDottedNameSpans() { - Harness.Baseline.runBaseline( - this.testData.globalOptions[MetadataOptionNames.baselineFile], + this.baseline( + "NameOrDottedNameSpans", this.baselineCurrentFileLocations(pos => this.getNameOrDottedNameSpan(pos)!), ); } @@ -3583,7 +3607,6 @@ export class TestState { public baselineAutoImports(markerName: string, fullNamesForCodeFix?: string[], preferences?: ts.UserPreferences) { const marker = this.getMarkerByName(markerName); - const baselineFile = this.getBaselineFileNameForContainingTestFile(`.baseline.md`); const completionPreferences = { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true, @@ -3651,7 +3674,7 @@ export class TestState { } } - Harness.Baseline.runBaseline(baselineFile, baselineText); + this.baseline("Auto Imports", baselineText, `.baseline.md`); } public verifyJsxClosingTag(map: { [markerName: string]: ts.JsxClosingTagInfo | undefined; }): void { @@ -3671,7 +3694,6 @@ export class TestState { } public baselineLinkedEditing(): void { - const baselineFile = this.getBaselineFileNameForContainingTestFile(".linkedEditing.txt"); const files = this.testData.files; let baselineContent = ""; @@ -3682,7 +3704,7 @@ export class TestState { offset = result.offset; } - Harness.Baseline.runBaseline(baselineFile, baselineContent); + this.baseline("Linked Editing", baselineContent, ".linkedEditing.txt"); function getLinkedEditingBaselineWorker(activeFile: FourSlashFile, offset: number, languageService: ts.LanguageService) { const fileName = activeFile.fileName; @@ -3858,19 +3880,30 @@ export class TestState { return this.languageService.getDocumentHighlights(this.activeFile.fileName, this.currentCaretPosition, filesToSearch); } - private baselineGetDocumentHighlights(markerOrRange: MarkerOrNameOrRange, options: FourSlashInterface.VerifyDocumentHighlightsOptions | undefined) { - this.goToMarkerOrNameOrRange(markerOrRange); - const highlights = this.getDocumentHighlightsAtCurrentPosition(ts.map(options?.filesToSearch, ts.normalizePath) || [this.activeFile.fileName]); + public baselineDocumentHighlights( + markerOrRange: ArrayOrSingle | undefined, + rangeText: ArrayOrSingle | undefined, + options: FourSlashInterface.VerifyDocumentHighlightsOptions | undefined, + ) { + this.baselineEachMarkerOrRangeArrayOrSingle( + "documentHighlights", + markerOrRange, + rangeText, + markerOrRange => { + this.goToMarkerOrNameOrRange(markerOrRange); + const highlights = this.getDocumentHighlightsAtCurrentPosition(ts.map(options?.filesToSearch, ts.normalizePath) || [this.activeFile.fileName]); - // Write input files - const filesToSearch = options ? "// filesToSearch:\n" + - options.filesToSearch.map(f => "// " + f).join("\n") + "\n\n" : - ""; - const baselineContent = this.getBaselineForGroupedDocumentSpansWithFileContents( - highlights?.map(h => h.highlightSpans.map(s => s.fileName ? s as ts.DocumentSpan : { ...s, fileName: h.fileName })) || ts.emptyArray, - { markerInfo: { markerOrRange, markerName: "/*HIGHLIGHTS*/" } }, + // Write input files + const filesToSearch = options ? "// filesToSearch:\n" + + options.filesToSearch.map(f => "// " + f).join("\n") + "\n\n" : + ""; + const baselineContent = this.getBaselineForGroupedDocumentSpansWithFileContents( + highlights?.map(h => h.highlightSpans.map(s => s.fileName ? s as ts.DocumentSpan : { ...s, fileName: h.fileName })) || ts.emptyArray, + { markerInfo: { markerOrRange, markerName: "/*HIGHLIGHTS*/" } }, + ); + return filesToSearch + baselineContent; + }, ); - return filesToSearch + baselineContent; } public verifyCodeFixAvailable(negative: boolean, expected: FourSlashInterface.VerifyCodeFixAvailableOptions[] | string | undefined): void { @@ -4275,10 +4308,9 @@ export class TestState { } public baselineCallHierarchy() { - const baselineFile = this.getBaselineFileNameForContainingTestFile(".callHierarchy.txt"); const callHierarchyItem = this.languageService.prepareCallHierarchy(this.activeFile.fileName, this.currentCaretPosition); const text = callHierarchyItem ? ts.mapOneOrMany(callHierarchyItem, item => this.formatCallHierarchy(item), result => result.join("")) : "none"; - Harness.Baseline.runBaseline(baselineFile, text); + this.baseline("Call Hierarchy", text, ".callHierarchy.txt"); } private getLineContent(index: number) { @@ -4503,12 +4535,16 @@ function renameKeys(obj: { readonly [key: string]: T; }, renameKey: (key: str return res; } -export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string) { - const content = Harness.IO.readFile(fileName)!; - runFourSlashTestContent(basePath, testType, content, fileName); +export interface FourSlashServerLogBaseliner { + baseline?: () => void; } -export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): void { +export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string, serverLogBaseliner?: FourSlashServerLogBaseliner) { + const content = Harness.IO.readFile(fileName)!; + runFourSlashTestContent(basePath, testType, content, fileName, serverLogBaseliner); +} + +export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string, serverLogBaseliner?: FourSlashServerLogBaseliner): void { // Give file paths an absolute path for the virtual file system const absoluteBasePath = ts.combinePaths(Harness.virtualFileSystemRoot, basePath); const absoluteFileName = ts.combinePaths(Harness.virtualFileSystemRoot, fileName); @@ -4516,12 +4552,14 @@ export function runFourSlashTestContent(basePath: string, testType: FourSlashTes // Parse out the files and their metadata const testData = parseTestData(absoluteBasePath, content, absoluteFileName); const state = new TestState(absoluteFileName, absoluteBasePath, testType, testData); + if (serverLogBaseliner) serverLogBaseliner.baseline = () => state.baselineTsserverLog(); const actualFileName = Harness.IO.resolvePath(fileName) || absoluteFileName; const output = ts.transpileModule(content, { reportDiagnostics: true, fileName: actualFileName, compilerOptions: { target: ts.ScriptTarget.ES2015, inlineSourceMap: true, inlineSources: true } }); if (output.diagnostics!.length > 0) { throw new Error(`Syntax error in ${absoluteBasePath}: ${output.diagnostics![0].messageText}`); } runCode(output.outputText, state, actualFileName); + state.baselineTest(); } function runCode(code: string, state: TestState, fileName: string): void { diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index e9f9dd0b402..d5918956a7e 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -333,68 +333,64 @@ export class Verify extends VerifyNegatable { this.state.verifyTypeAtLocation(range, expected); } - public baselineCommands(...commands: BaselineCommand[]) { - this.state.verifyBaselineCommands(...commands); - } - public baselineFindAllReferences(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "findAllReferences", markerOrRange }); + this.state.baselineFindAllReferences(markerOrRange, /*rangeText*/ undefined); } public baselineFindAllReferencesAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "findAllReferences", rangeText }); + this.state.baselineFindAllReferences(/*markerOrRange*/ undefined, rangeText); } public baselineGetFileReferences(...fileName: string[]) { - this.state.verifyBaselineCommands({ type: "getFileReferences", fileName }); + this.state.baselineGetFileReferences(fileName); } public baselineGoToDefinition(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "goToDefinition", markerOrRange }); + this.state.baselineGoToDefinition(markerOrRange, /*rangeText*/ undefined); } public baselineGoToDefinitionAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "goToDefinition", rangeText }); + this.state.baselineGoToDefinition(/*markerOrRange*/ undefined, rangeText); } public baselineGetDefinitionAtPosition(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "getDefinitionAtPosition", markerOrRange }); + this.state.baselineGetDefinitionAtPosition(markerOrRange, /*rangeText*/ undefined); } public baselineGetDefinitionAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "getDefinitionAtPosition", rangeText }); + this.state.baselineGetDefinitionAtPosition(/*markerOrRange*/ undefined, rangeText); } public baselineGoToSourceDefinition(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "goToSourceDefinition", markerOrRange }); + this.state.baselineGoToSourceDefinition(markerOrRange, /*rangeText*/ undefined); } public baselineGoToSourceDefinitionAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "goToSourceDefinition", rangeText }); + this.state.baselineGoToSourceDefinition(/*markerOrRange*/ undefined, rangeText); } public baselineGoToType(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "goToType", markerOrRange }); + this.state.baselineGoToType(markerOrRange, /*rangeText*/ undefined); } public baselineGoToTypeAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "goToType", rangeText }); + this.state.baselineGoToType(/*markerOrRange*/ undefined, rangeText); } public baselineGoToImplementation(...markerOrRange: FourSlash.MarkerOrNameOrRange[]) { - this.state.verifyBaselineCommands({ type: "goToImplementation", markerOrRange }); + this.state.baselineGoToImplementation(markerOrRange, /*rangeText*/ undefined); } public baselineGoToImplementationAtRangesWithText(...rangeText: string[]) { - this.state.verifyBaselineCommands({ type: "goToImplementation", rangeText }); + this.state.baselineGoToImplementation(/*markerOrRange*/ undefined, rangeText); } public baselineDocumentHighlights(markerOrRange?: ArrayOrSingle, options?: VerifyDocumentHighlightsOptions) { - this.state.verifyBaselineCommands({ type: "documentHighlights", markerOrRange, options }); + this.state.baselineDocumentHighlights(markerOrRange, /*rangeText*/ undefined, options); } public baselineDocumentHighlightsAtRangesWithText(rangeText?: ArrayOrSingle, options?: VerifyDocumentHighlightsOptions) { - this.state.verifyBaselineCommands({ type: "documentHighlights", rangeText, options }); + this.state.baselineDocumentHighlights(/*markerOrRange*/ undefined, rangeText, options); } public noErrors() { @@ -574,11 +570,11 @@ export class Verify extends VerifyNegatable { } public baselineRename(markerOrRange?: ArrayOrSingle, options?: RenameOptions) { - this.state.verifyBaselineCommands({ type: "findRenameLocations", markerOrRange, options }); + this.state.baselineRename(markerOrRange, /*rangeText*/ undefined, options); } public baselineRenameAtRangesWithText(rangeText?: ArrayOrSingle, options?: RenameOptions) { - this.state.verifyBaselineCommands({ type: "findRenameLocations", rangeText, options }); + this.state.baselineRename(/*markerOrRange*/ undefined, rangeText, options); } public verifyQuickInfoDisplayParts(kind: string, kindModifiers: string, textSpan: FourSlash.TextSpan, displayParts: ts.SymbolDisplayPart[], documentation: ts.SymbolDisplayPart[], tags: ts.JSDocTagInfo[]) { @@ -1931,25 +1927,3 @@ export interface RenameOptions { readonly providePrefixAndSuffixTextForRename?: boolean; readonly quotePreference?: "auto" | "double" | "single"; } -export type BaselineCommandWithMarkerOrRange = { - type: "findAllReferences" | "goToDefinition" | "getDefinitionAtPosition" | "goToSourceDefinition" | "goToType" | "goToImplementation"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; -} | { - type: "findRenameLocations"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; - options?: RenameOptions; -} | { - type: "documentHighlights"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; - options?: VerifyDocumentHighlightsOptions; -}; -export type BaselineCommand = BaselineCommandWithMarkerOrRange | { - type: "getFileReferences"; - fileName: ArrayOrSingle; -} | { - type: "customWork"; - work: () => string | undefined; -}; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 3ef0e2d0bea..298d8310161 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -262,7 +262,7 @@ export namespace Compiler { export const es2015DefaultLibFileName = "lib.es2015.d.ts"; // Cache of lib files from "built/local" - let libFileNameSourceFileMap: Map | undefined; + export let libFileNameSourceFileMap: Map | undefined; export function getDefaultLibrarySourceFile(fileName = defaultLibFileName): ts.SourceFile | undefined { if (!isDefaultLibraryFile(fileName)) { diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 3760206090a..b5dd1318f5e 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -14,6 +14,14 @@ import * as vpath from "./_namespaces/vpath"; import { incrementalVerifier, } from "./incrementalUtils"; +import { + createLoggerWithInMemoryLogs, + HarnessLSCouldNotResolveModule, + Logger, +} from "./tsserverLogger"; +import { + createWatchUtils, +} from "./watchUtils"; export function makeDefaultProxy(info: ts.server.PluginCreateInfo): ts.LanguageService { const proxy = Object.create(/*o*/ null); // eslint-disable-line no-null/no-null @@ -122,6 +130,7 @@ export interface LanguageServiceAdapter { getLanguageService(): ts.LanguageService; getClassifier(): ts.Classifier; getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo; + getLogger(): Logger | undefined; } export abstract class LanguageServiceAdapterHost { @@ -326,6 +335,7 @@ class NativeLanguageServiceHost extends LanguageServiceAdapterHost implements ts export class NativeLanguageServiceAdapter implements LanguageServiceAdapter { private host: NativeLanguageServiceHost; + getLogger = ts.returnUndefined; constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) { this.host = new NativeLanguageServiceHost(cancellationToken, options); } @@ -370,10 +380,18 @@ class SessionClientHost extends NativeLanguageServiceHost implements ts.server.S } } -class SessionServerHost implements ts.server.ServerHost, ts.server.Logger { +interface ServerHostFileWatcher { + cb: ts.FileWatcherCallback; + pollingInterval: ts.PollingInterval; +} +interface ServerHostDirectoryWatcher { + cb: ts.DirectoryWatcherCallback; +} +class SessionServerHost implements ts.server.ServerHost { args: string[] = []; newLine: string; useCaseSensitiveFileNames = false; + watchUtils = createWatchUtils("watchedFiles", "watchedDirectories"); constructor(private host: NativeLanguageServiceHost) { this.newLine = this.host.getNewLine(); @@ -440,61 +458,28 @@ class SessionServerHost implements ts.server.ServerHost, ts.server.Logger { return this.host.readDirectory(path, extensions, exclude, include, depth); } - watchFile(): ts.FileWatcher { - return { close: ts.noop }; + watchFile(file: string, cb: ts.FileWatcherCallback, pollingInterval: ts.PollingInterval) { + return this.watchUtils.pollingWatch(file, { cb, pollingInterval }); } - watchDirectory(): ts.FileWatcher { - return { close: ts.noop }; + watchDirectory(dir: string, cb: ts.DirectoryWatcherCallback, recursive: boolean): ts.FileWatcher { + return this.watchUtils.fsWatch(dir, recursive, { cb }); } - close = ts.noop; - - info(message: string): void { - this.host.log(message); + setTimeout(_callback: (...args: any[]) => void, _ms: number, ..._args: any[]): any { + // Currently none of the tests use this and we would want something thats deterministic like unittests where we tell which callbacks to invoke } - msg(message: string): void { - this.host.log(message); + clearTimeout(_timeoutId: any): void { + // Currently none of the tests use this and we would want something thats deterministic like unittests where we tell which callbacks to invoke } - loggingEnabled() { - return true; + setImmediate(_callback: (...args: any[]) => void, ..._args: any[]): any { + // Currently none of the tests use this and we would want something thats deterministic like unittests where we tell which callbacks to invoke } - getLogFileName(): string | undefined { - return undefined; - } - - hasLevel() { - return false; - } - - startGroup() { - throw ts.notImplemented(); - } - endGroup() { - throw ts.notImplemented(); - } - - perftrc(message: string): void { - return this.host.log(message); - } - - setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any { - return setTimeout(callback, ms, ...args); - } - - clearTimeout(timeoutId: any): void { - clearTimeout(timeoutId); - } - - setImmediate(callback: (...args: any[]) => void, _ms: number, ...args: any[]): any { - return setImmediate(callback, args); - } - - clearImmediate(timeoutId: any): void { - clearImmediate(timeoutId); + clearImmediate(_timeoutId: any): void { + // Currently none of the tests use this and we would want something thats deterministic like unittests where we tell which callbacks to invoke } createHash(s: string) { @@ -597,22 +582,36 @@ class SessionServerHost implements ts.server.ServerHost, ts.server.Logger { default: return { module: undefined, - error: new Error("Could not resolve module"), + error: new Error(HarnessLSCouldNotResolveModule), }; } } } class FourslashSession extends ts.server.Session { + constructor(opts: ts.server.SessionOptions, readonly baselineHost: (when: string) => void) { + super(opts); + } getText(fileName: string) { return ts.getSnapshotText(this.projectService.getDefaultProjectForFile(ts.server.toNormalizedPath(fileName), /*ensureProject*/ true)!.getScriptSnapshot(fileName)!); } + + protected override toStringMessage(message: string): string { + return JSON.stringify(JSON.parse(message), undefined, 2); + } + + public override onMessage(message: string): void { + this.baselineHost("Before Request"); + super.onMessage(message); + this.baselineHost("After Request"); + } } export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { private host: SessionClientHost; private client: ts.server.SessionClient; private server: FourslashSession; + private logger: Logger; constructor(cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) { // This is the main host that tests use to direct tests const clientHost = new SessionClientHost(cancellationToken, options); @@ -621,6 +620,7 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { // This host is just a proxy for the clientHost, it uses the client // host to answer server queries about files on disk const serverHost = new SessionServerHost(clientHost); + this.logger = createLoggerWithInMemoryLogs(serverHost, /*sanitizeLibs*/ true); const opts: ts.server.SessionOptions = { host: serverHost, cancellationToken: ts.server.nullCancellationToken, @@ -629,11 +629,17 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { typingsInstaller: { ...ts.server.nullTypingsInstaller, globalTypingsCacheLocation: "/Library/Caches/typescript" }, byteLength: Buffer.byteLength, hrtime: process.hrtime, - logger: serverHost, + logger: this.logger, canUseEvents: true, incrementalVerifier, }; - this.server = new FourslashSession(opts); + this.server = new FourslashSession(opts, when => { + const baseline = serverHost.watchUtils.serializeWatches(); + if (baseline.length) { + this.logger.log(when); + baseline.forEach(s => this.logger.log(s)); + } + }); // Fake the connection between the client and the server serverHost.writeMessage = client.onMessage.bind(client); @@ -647,6 +653,9 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { this.client = client; this.host = clientHost; } + getLogger() { + return this.logger; + } getHost() { return this.host; } diff --git a/src/harness/tsserverLogger.ts b/src/harness/tsserverLogger.ts new file mode 100644 index 00000000000..ccc166fe1d3 --- /dev/null +++ b/src/harness/tsserverLogger.ts @@ -0,0 +1,150 @@ +import * as ts from "./_namespaces/ts"; +import { + Compiler, +} from "./harnessIO"; + +export const HarnessLSCouldNotResolveModule = "HarnessLanguageService:: Could not resolve module"; + +export function replaceAll(source: string, searchValue: string, replaceValue: string): string { + let result: string | undefined = (source as string & { replaceAll: typeof source.replace; }).replaceAll?.(searchValue, replaceValue); + + if (result !== undefined) { + return result; + } + + result = ""; + const searchLength = searchValue.length; + while (true) { + const index = source.indexOf(searchValue); + if (index < 0) { + break; + } + result += source.slice(0, index); + result += replaceValue; + source = source.slice(index + searchLength); + } + result += source; + return result; +} + +export interface Logger extends ts.server.Logger { + logs?: string[]; + log(s: string): void; + host?: ts.server.ServerHost; +} + +export function nullLogger(): Logger { + return { + close: ts.noop, + hasLevel: ts.returnFalse, + loggingEnabled: ts.returnFalse, + perftrc: ts.noop, + info: ts.noop, + msg: ts.noop, + startGroup: ts.noop, + endGroup: ts.noop, + getLogFileName: ts.returnUndefined, + log: ts.noop, + isTestLogger: true, + }; +} + +export function createHasErrorMessageLogger(): Logger { + return { + ...nullLogger(), + msg: (s, type) => ts.Debug.fail(`Error: ${s}, type: ${type}`), + }; +} +function handleLoggerGroup(logger: Logger): Logger { + let inGroup = false; + let firstInGroup = false; + logger.startGroup = () => { + inGroup = true; + firstInGroup = true; + }; + logger.endGroup = () => inGroup = false; + const originalInfo = logger.info; + logger.info = s => msg(s, ts.server.Msg.Info, s => originalInfo.call(logger, s)); + logger.log = s => originalInfo.call(logger, s); + return logger; + + function msg(s: string, type = ts.server.Msg.Err, write: (s: string) => void) { + s = `[${nowString(logger)}] ${s}`; + if (!inGroup || firstInGroup) s = padStringRight(type + " seq", " ") + s; + if (ts.Debug.isDebugging) console.log(s); + write(s); + } + + function padStringRight(str: string, padding: string) { + return (str + padding).slice(0, padding.length); + } +} + +export function nowString(logger: Logger) { + // E.g. "12:34:56.789" + logger.host?.now?.(); // To increment the time but not print it to avoid the baseline updates + return `hh:mm:ss:mss`; +} + +export function createLoggerWritingToConsole(host: ts.server.ServerHost) { + return handleLoggerGroup({ + ...nullLogger(), + hasLevel: ts.returnTrue, + loggingEnabled: ts.returnTrue, + perftrc: s => console.log(s), + info: s => console.log(s), + msg: (s, type) => console.log(`${type}:: ${s}`), + host, + }); +} + +export function sanitizeLog(s: string): string { + s = s.replace(/Elapsed::?\s*\d+(?:\.\d+)?ms/g, "Elapsed:: *ms"); + s = s.replace(/"updateGraphDurationMs":\s*\d+(?:\.\d+)?/g, `"updateGraphDurationMs": *`); + s = s.replace(/"createAutoImportProviderProgramDurationMs":\s*\d+(?:\.\d+)?/g, `"createAutoImportProviderProgramDurationMs": *`); + s = replaceAll(s, ts.version, "FakeVersion"); + s = s.replace(/getCompletionData: Get current token: \d+(?:\.\d+)?/g, `getCompletionData: Get current token: *`); + s = s.replace(/getCompletionData: Is inside comment: \d+(?:\.\d+)?/g, `getCompletionData: Is inside comment: *`); + s = s.replace(/getCompletionData: Get previous token: \d+(?:\.\d+)?/g, `getCompletionData: Get previous token: *`); + s = s.replace(/getCompletionsAtPosition: isCompletionListBlocker: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: isCompletionListBlocker: *`); + s = s.replace(/getCompletionData: Semantic work: \d+(?:\.\d+)?/g, `getCompletionData: Semantic work: *`); + s = s.replace(/getCompletionsAtPosition: getCompletionEntriesFromSymbols: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: getCompletionEntriesFromSymbols: *`); + s = s.replace(/forEachExternalModuleToImportFrom autoImportProvider: \d+(?:\.\d+)?/g, `forEachExternalModuleToImportFrom autoImportProvider: *`); + s = s.replace(/getExportInfoMap: done in \d+(?:\.\d+)?/g, `getExportInfoMap: done in *`); + s = s.replace(/collectAutoImports: \d+(?:\.\d+)?/g, `collectAutoImports: *`); + s = s.replace(/continuePreviousIncompleteResponse: \d+(?:\.\d+)?/g, `continuePreviousIncompleteResponse: *`); + s = s.replace(/dependencies in \d+(?:\.\d+)?/g, `dependencies in *`); + s = s.replace(/"exportMapKey":\s*"\d+ \d+ /g, match => match.replace(/ \d+ /, ` * `)); + s = s.replace(/getIndentationAtPosition: getCurrentSourceFile: \d+(?:\.\d+)?/, `getIndentationAtPosition: getCurrentSourceFile: *`); + s = s.replace(/getIndentationAtPosition: computeIndentation\s*: \d+(?:\.\d+)?/, `getIndentationAtPosition: computeIndentation: *`); + s = sanitizeHarnessLSException(s); + return s; +} + +function sanitizeHarnessLSException(s: string) { + const index = s.indexOf(HarnessLSCouldNotResolveModule); + if (index > 0) s = s.substring(0, index) + HarnessLSCouldNotResolveModule; + return s; +} + +export function sanitizeLibFileText(s: string): string { + Compiler.libFileNameSourceFileMap?.forEach((lib, fileName) => { + s = replaceAll(s, JSON.stringify(lib.text), `${fileName}-Text`); + s = replaceAll(s, lib.text, `${fileName}-Text`); + }); + return s; +} + +export function createLoggerWithInMemoryLogs(host: ts.server.ServerHost, sanitizeLibs?: true): Logger { + const logger = createHasErrorMessageLogger(); + const logs: string[] = []; + if (host) logs.push(`currentDirectory:: ${host.getCurrentDirectory()} useCaseSensitiveFileNames: ${host.useCaseSensitiveFileNames}`); + return handleLoggerGroup({ + ...logger, + logs, + hasLevel: ts.returnTrue, + loggingEnabled: ts.returnTrue, + info: s => logs.push((sanitizeLibs ? sanitizeLibFileText : ts.identity)(sanitizeLog(s))), + host, + }); +} diff --git a/src/harness/watchUtils.ts b/src/harness/watchUtils.ts new file mode 100644 index 00000000000..f05c81ae2ae --- /dev/null +++ b/src/harness/watchUtils.ts @@ -0,0 +1,147 @@ +import { + arrayFrom, + compareStringsCaseSensitive, + contains, + createMultiMap, + Debug, + FileWatcher, + FileWatcherCallback, + MultiMap, + PollingInterval, +} from "./_namespaces/ts"; + +export interface TestFileWatcher { + cb: FileWatcherCallback; + pollingInterval: PollingInterval; +} + +export interface TestFsWatcher { + cb: DirCallback; + inode: number | undefined; +} + +export interface WatchUtils { + pollingWatches: MultiMap; + fsWatches: MultiMap; + fsWatchesRecursive: MultiMap; + pollingWatch(path: Path, data: PollingWatcherData): FileWatcher; + fsWatch(path: Path, recursive: boolean, data: FsWatcherData): FileWatcher; + serializeWatches(baseline?: string[]): string[]; + getHasWatchChanges(): boolean; + setHasWatchChanges(): void; +} + +export function createWatchUtils( + pollingWatchesName: string, + fsWatchesName: string, +): WatchUtils { + const pollingWatches = createMultiMap(); + const fsWatches = createMultiMap(); + const fsWatchesRecursive = createMultiMap(); + + let hasWatchChanges = false; + + let serializedPollingWatches: Map | undefined; + let serializedFsWatches: Map | undefined; + let serializedFsWatchesRecursive: Map | undefined; + + return { + pollingWatches, + fsWatches, + fsWatchesRecursive, + pollingWatch, + fsWatch, + serializeWatches, + getHasWatchChanges: () => hasWatchChanges, + setHasWatchChanges: () => hasWatchChanges = true, + }; + + function createWatcher(map: MultiMap, path: Path, callback: T): FileWatcher { + hasWatchChanges = true; + map.add(path, callback); + let closed = false; + return { + close: () => { + Debug.assert(!closed); + map.remove(path, callback); + hasWatchChanges = true; + closed = true; + }, + }; + } + + function pollingWatch(path: Path, data: PollingWatcherData) { + return createWatcher( + pollingWatches, + path, + data, + ); + } + + function fsWatch(path: Path, recursive: boolean, data: FsWatcherData) { + return createWatcher( + recursive ? fsWatchesRecursive : fsWatches, + path, + data, + ); + } + + function serializeWatches(baseline: string[] = []) { + if (!hasWatchChanges) return baseline; + serializedPollingWatches = serializeMultiMap(baseline, pollingWatchesName, pollingWatches, serializedPollingWatches); + serializedFsWatches = serializeMultiMap(baseline, fsWatchesName, fsWatches, serializedFsWatches); + serializedFsWatchesRecursive = serializeMultiMap(baseline, `${fsWatchesName}Recursive`, fsWatchesRecursive, serializedFsWatchesRecursive); + hasWatchChanges = false; + return baseline; + } +} + +export function serializeMultiMap(baseline: string[], caption: string, multiMap: MultiMap, serialized: Map | undefined) { + let hasChange = diffMap(baseline, caption, multiMap, serialized, /*deleted*/ false); + hasChange = diffMap(baseline, caption, serialized, multiMap, /*deleted*/ true) || hasChange; + if (hasChange) { + serialized = new Map(); + multiMap.forEach((value, key) => serialized!.set(key, new Array(...value))); + } + return serialized; +} + +function diffMap( + baseline: string[], + caption: string, + map: Map | undefined, + old: Map | undefined, + deleted: boolean, +) { + let captionAdded = false; + let baselineChanged = false; + let hasChange = false; + if (map) { + for (const key of arrayFrom(map.keys()).sort(compareStringsCaseSensitive)) { + const existing = old?.get(key); + let addedKey = false; + const values = map.get(key)!; + for (const value of values) { + const hasExisting = contains(existing, value); + if (deleted && hasExisting) continue; + if (!hasExisting) hasChange = true; + if (!addedKey) { + addBaseline(`${key}:${deleted || existing ? "" : " *new*"}`); + addedKey = true; + } + addBaseline(` ${JSON.stringify(value)}${deleted || hasExisting || !existing ? "" : " *new*"}`); + } + } + } + if (baselineChanged) baseline.push(""); + return hasChange; + + function addBaseline(s: string) { + if (!captionAdded) { + baseline.push(`${caption}${deleted ? " *deleted*" : ""}::`); + captionAdded = true; + } + baseline.push(s); + baselineChanged = true; + } +} diff --git a/src/testRunner/fourslashRunner.ts b/src/testRunner/fourslashRunner.ts index cbf2bf7d87e..689cdcceca9 100644 --- a/src/testRunner/fourslashRunner.ts +++ b/src/testRunner/fourslashRunner.ts @@ -52,9 +52,18 @@ export class FourSlashRunner extends RunnerBase { if (testIndex >= 0) fn = fn.substr(testIndex); if (justName !== "fourslash.ts") { - it(this.testSuiteName + " test " + justName + " runs correctly", () => { - FourSlash.runFourSlashTest(this.basePath, this.testType, fn); + let serverLogBaseliner: FourSlash.FourSlashServerLogBaseliner = {}; + after(() => { + serverLogBaseliner = undefined!; }); + it(this.testSuiteName + " test " + justName + " runs correctly", () => { + FourSlash.runFourSlashTest(this.basePath, this.testType, fn, serverLogBaseliner); + }); + if (this.testType === FourSlash.FourSlashTestType.Server) { + it(this.testSuiteName + " test " + justName + " tsserver log", () => { + serverLogBaseliner.baseline?.(); + }); + } } }); }); diff --git a/src/testRunner/unittests/helpers/tsserver.ts b/src/testRunner/unittests/helpers/tsserver.ts index 8fe67e18314..e88d01170f6 100644 --- a/src/testRunner/unittests/helpers/tsserver.ts +++ b/src/testRunner/unittests/helpers/tsserver.ts @@ -1,6 +1,11 @@ import { incrementalVerifier, } from "../../../harness/incrementalUtils"; +import { + createHasErrorMessageLogger, + createLoggerWithInMemoryLogs, + Logger, +} from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { @@ -21,133 +26,6 @@ import { TestServerHostTrackingWrittenFiles, } from "./virtualFileSystemWithWatch"; -export function replaceAll(source: string, searchValue: string, replaceValue: string): string { - let result: string | undefined = (source as string & { replaceAll: typeof source.replace; }).replaceAll?.(searchValue, replaceValue); - - if (result !== undefined) { - return result; - } - - result = ""; - const searchLength = searchValue.length; - while (true) { - const index = source.indexOf(searchValue); - if (index < 0) { - break; - } - result += source.slice(0, index); - result += replaceValue; - source = source.slice(index + searchLength); - } - result += source; - return result; -} - -export interface Logger extends ts.server.Logger { - logs?: string[]; - log(s: string): void; - host?: TestServerHost; -} - -export function nullLogger(): Logger { - return { - close: ts.noop, - hasLevel: ts.returnFalse, - loggingEnabled: ts.returnFalse, - perftrc: ts.noop, - info: ts.noop, - msg: ts.noop, - startGroup: ts.noop, - endGroup: ts.noop, - getLogFileName: ts.returnUndefined, - log: ts.noop, - isTestLogger: true, - }; -} - -export function createHasErrorMessageLogger(): Logger { - return { - ...nullLogger(), - msg: (s, type) => ts.Debug.fail(`Error: ${s}, type: ${type}`), - }; -} - -function handleLoggerGroup(logger: Logger, host: TestServerHost | undefined): Logger { - let inGroup = false; - let firstInGroup = false; - logger.startGroup = () => { - inGroup = true; - firstInGroup = true; - }; - logger.endGroup = () => inGroup = false; - logger.host = host; - const originalInfo = logger.info; - logger.info = s => msg(s, ts.server.Msg.Info, s => originalInfo.call(logger, s)); - logger.log = s => originalInfo.call(logger, s); - return logger; - - function msg(s: string, type = ts.server.Msg.Err, write: (s: string) => void) { - s = `[${nowString(logger.host!)}] ${s}`; - if (!inGroup || firstInGroup) s = padStringRight(type + " seq", " ") + s; - if (ts.Debug.isDebugging) console.log(s); - write(s); - } - - function padStringRight(str: string, padding: string) { - return (str + padding).slice(0, padding.length); - } -} - -export function nowString(host: TestServerHost) { - // E.g. "12:34:56.789" - host.now(); // To increment the time but not print it to avoid the baseline updates - return `hh:mm:ss:mss`; -} - -export function createLoggerWritingToConsole(host: TestServerHost): Logger { - return handleLoggerGroup({ - ...nullLogger(), - hasLevel: ts.returnTrue, - loggingEnabled: ts.returnTrue, - perftrc: s => console.log(s), - info: s => console.log(s), - msg: (s, type) => console.log(`${type}:: ${s}`), - }, host); -} - -export function sanitizeLog(s: string): string { - s = s.replace(/Elapsed::?\s*\d+(?:\.\d+)?ms/g, "Elapsed:: *ms"); - s = s.replace(/"updateGraphDurationMs":\s*\d+(?:\.\d+)?/g, `"updateGraphDurationMs": *`); - s = s.replace(/"createAutoImportProviderProgramDurationMs":\s*\d+(?:\.\d+)?/g, `"createAutoImportProviderProgramDurationMs": *`); - s = replaceAll(s, ts.version, "FakeVersion"); - s = s.replace(/getCompletionData: Get current token: \d+(?:\.\d+)?/g, `getCompletionData: Get current token: *`); - s = s.replace(/getCompletionData: Is inside comment: \d+(?:\.\d+)?/g, `getCompletionData: Is inside comment: *`); - s = s.replace(/getCompletionData: Get previous token: \d+(?:\.\d+)?/g, `getCompletionData: Get previous token: *`); - s = s.replace(/getCompletionsAtPosition: isCompletionListBlocker: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: isCompletionListBlocker: *`); - s = s.replace(/getCompletionData: Semantic work: \d+(?:\.\d+)?/g, `getCompletionData: Semantic work: *`); - s = s.replace(/getCompletionsAtPosition: getCompletionEntriesFromSymbols: \d+(?:\.\d+)?/g, `getCompletionsAtPosition: getCompletionEntriesFromSymbols: *`); - s = s.replace(/forEachExternalModuleToImportFrom autoImportProvider: \d+(?:\.\d+)?/g, `forEachExternalModuleToImportFrom autoImportProvider: *`); - s = s.replace(/getExportInfoMap: done in \d+(?:\.\d+)?/g, `getExportInfoMap: done in *`); - s = s.replace(/collectAutoImports: \d+(?:\.\d+)?/g, `collectAutoImports: *`); - s = s.replace(/continuePreviousIncompleteResponse: \d+(?:\.\d+)?/g, `continuePreviousIncompleteResponse: *`); - s = s.replace(/dependencies in \d+(?:\.\d+)?/g, `dependencies in *`); - s = s.replace(/"exportMapKey":\s*"\d+ \d+ /g, match => match.replace(/ \d+ /, ` * `)); - return s; -} - -export function createLoggerWithInMemoryLogs(host: TestServerHost): Logger { - const logger = createHasErrorMessageLogger(); - const logs: string[] = []; - if (host) logs.push(`currentDirectory:: ${host.getCurrentDirectory()} useCaseSensitiveFileNames: ${host.useCaseSensitiveFileNames}`); - return handleLoggerGroup({ - ...logger, - logs, - hasLevel: ts.returnTrue, - loggingEnabled: ts.returnTrue, - info: s => logs.push(sanitizeLog(s)), - }, host); -} - export function baselineTsserverLogs(scenario: string, subScenario: string, sessionOrService: { logger: Logger; }) { ts.Debug.assert(sessionOrService.logger.logs?.length); // Ensure caller used in memory logger Harness.Baseline.runBaseline(`tsserver/${scenario}/${subScenario.split(" ").join("-")}.js`, sessionOrService.logger.logs.join("\r\n")); @@ -269,11 +147,11 @@ export class TestSession extends ts.server.Session { public override executeCommand(request: ts.server.protocol.Request) { if (this.logger.hasLevel(ts.server.LogLevel.verbose)) { this.testhost.baselineHost("Before request"); - this.logger.info(`request:${ts.server.indent(JSON.stringify(request, undefined, 2))}`); + this.logger.info(`request:${ts.server.stringifyIndented(request)}`); } const response = super.executeCommand(request); if (this.logger.hasLevel(ts.server.LogLevel.verbose)) { - this.logger.info(`response:${ts.server.indent(JSON.stringify(response.response === ts.getSupportedCodeFixes() ? { ...response, response: "ts.getSupportedCodeFixes()" } : response, undefined, 2))}`); + this.logger.info(`response:${ts.server.stringifyIndented(response.response === ts.getSupportedCodeFixes() ? { ...response, response: "ts.getSupportedCodeFixes()" } : response)}`); this.testhost.baselineHost("After request"); } return response; diff --git a/src/testRunner/unittests/helpers/typingsInstaller.ts b/src/testRunner/unittests/helpers/typingsInstaller.ts index c533b049f84..a70d9ec7b6e 100644 --- a/src/testRunner/unittests/helpers/typingsInstaller.ts +++ b/src/testRunner/unittests/helpers/typingsInstaller.ts @@ -1,14 +1,16 @@ +import { + Logger, + nowString, + replaceAll, + sanitizeLog, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { ActionWatchTypingLocations, stringifyIndented, } from "../../_namespaces/ts.server"; import { - Logger, - nowString, patchHostTimeouts, - replaceAll, - sanitizeLog, TestSessionAndServiceHost, } from "./tsserver"; import { @@ -61,7 +63,7 @@ export function loggerToTypingsInstallerLog(logger: Logger): ts.server.typingsIn // const initialLog = sanitizeLog(s); const pseudoSanitizedLog = replaceAll(initialLog, `@ts${ts.versionMajorMinor}`, `@tsFakeMajor.Minor`); - return logger.log(`TI:: [${nowString(logger.host!)}] ${pseudoSanitizedLog}`); + return logger.log(`TI:: [${nowString(logger)}] ${pseudoSanitizedLog}`); }, } : undefined; } diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index 7079bb01c0a..b60df153f15 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -1,18 +1,17 @@ +import { + createWatchUtils, +} from "../../../harness/watchUtils"; import * as Harness from "../../_namespaces/Harness"; import { - arrayFrom, clear, clone, combinePaths, compareStringsCaseSensitive, - contains, createGetCanonicalFileName, - createMultiMap, createSystemWatchFunctions, Debug, directorySeparator, FileSystemEntryKind, - FileWatcher, FileWatcherCallback, FileWatcherEventKind, filterMutate, @@ -285,9 +284,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, readonly immediateCallbacks = new Callbacks(this, "Immedidate"); readonly screenClears: number[] = []; - readonly watchedFiles = createMultiMap(); - readonly fsWatches = createMultiMap(); - readonly fsWatchesRecursive = createMultiMap(); + readonly watchUtils = createWatchUtils("PolledWatches", "FsWatches"); runWithFallbackPolling: boolean; public readonly useCaseSensitiveFileNames: boolean; public readonly newLine: string; @@ -623,24 +620,8 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, this.removeFileOrFolder(currentEntry); } - hasWatchChanges?: boolean; - private createWatcher(map: MultiMap, path: Path, callback: T): FileWatcher { - this.hasWatchChanges = true; - map.add(path, callback); - let closed = false; - return { - close: () => { - Debug.assert(!closed); - map.remove(path, callback); - this.hasWatchChanges = true; - closed = true; - }, - }; - } - private watchFileWorker(fileName: string, cb: FileWatcherCallback, pollingInterval: PollingInterval) { - return this.createWatcher( - this.watchedFiles, + return this.watchUtils.pollingWatch( this.toFullPath(fileName), { cb, pollingInterval }, ); @@ -655,9 +636,9 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, const path = this.toFullPath(fileOrDirectory); // Error if the path does not exist if (this.inodeWatching && !this.inodes?.has(path)) throw new Error(); - const result = this.createWatcher( - recursive ? this.fsWatchesRecursive : this.fsWatches, + const result = this.watchUtils.fsWatch( path, + recursive, { cb, inode: this.inodes?.get(path), @@ -668,7 +649,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, } invokeFileWatcher(fileFullPath: string, eventKind: FileWatcherEventKind, modifiedTime: Date | undefined) { - invokeWatcherCallbacks(this.watchedFiles.get(this.toPath(fileFullPath)), ({ cb }) => cb(fileFullPath, eventKind, modifiedTime)); + invokeWatcherCallbacks(this.watchUtils.pollingWatches.get(this.toPath(fileFullPath)), ({ cb }) => cb(fileFullPath, eventKind, modifiedTime)); } private fsWatchCallback(map: MultiMap, fullPath: string, eventName: "rename" | "change", modifiedTime: Date | undefined, entryFullPath: string | undefined, useTildeSuffix: boolean | undefined) { @@ -684,11 +665,11 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, } invokeFsWatchesCallbacks(fullPath: string, eventName: "rename" | "change", modifiedTime?: Date, entryFullPath?: string, useTildeSuffix?: boolean) { - this.fsWatchCallback(this.fsWatches, fullPath, eventName, modifiedTime, entryFullPath, useTildeSuffix); + this.fsWatchCallback(this.watchUtils.fsWatches, fullPath, eventName, modifiedTime, entryFullPath, useTildeSuffix); } invokeFsWatchesRecursiveCallbacks(fullPath: string, eventName: "rename" | "change", modifiedTime?: Date, entryFullPath?: string, useTildeSuffix?: boolean) { - this.fsWatchCallback(this.fsWatchesRecursive, fullPath, eventName, modifiedTime, entryFullPath, useTildeSuffix); + this.fsWatchCallback(this.watchUtils.fsWatchesRecursive, fullPath, eventName, modifiedTime, entryFullPath, useTildeSuffix); } private getRelativePathToDirectory(directoryFullPath: string, fileFullPath: string) { @@ -1004,16 +985,8 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, baseline.push(""); } - private serializedWatchedFiles: Map | undefined; - private serializedFsWatches: Map | undefined; - private serializedFsWatchesRecursive: Map | undefined; - serializeWatches(baseline: string[] = []) { - if (!this.hasWatchChanges) return baseline; - this.serializedWatchedFiles = serializeMultiMap(baseline, "PolledWatches", this.watchedFiles, this.serializedWatchedFiles); - this.serializedFsWatches = serializeMultiMap(baseline, "FsWatches", this.fsWatches, this.serializedFsWatches); - this.serializedFsWatchesRecursive = serializeMultiMap(baseline, "FsWatchesRecursive", this.fsWatchesRecursive, this.serializedFsWatchesRecursive); - this.hasWatchChanges = false; - return baseline; + serializeWatches(baseline?: string[]) { + return this.watchUtils.serializeWatches(baseline); } realpath(s: string): string { @@ -1115,56 +1088,6 @@ function diffFsEntry(baseline: string[], oldFsEntry: FSEntry | undefined, newFsE } } -export function serializeMultiMap(baseline: string[], caption: string, multiMap: MultiMap, serialized: Map | undefined) { - let hasChange = diffMap(baseline, caption, multiMap, serialized, /*deleted*/ false); - hasChange = diffMap(baseline, caption, serialized, multiMap, /*deleted*/ true) || hasChange; - if (hasChange) { - serialized = new Map(); - multiMap.forEach((value, key) => serialized!.set(key, new Array(...value))); - } - return serialized; -} - -function diffMap( - baseline: string[], - caption: string, - map: Map | undefined, - old: Map | undefined, - deleted: boolean, -) { - let captionAdded = false; - let baselineChanged = false; - let hasChange = false; - if (map) { - for (const key of arrayFrom(map.keys()).sort(compareStringsCaseSensitive)) { - const existing = old?.get(key); - let addedKey = false; - const values = map.get(key)!; - for (const value of values) { - const hasExisting = contains(existing, value); - if (deleted && hasExisting) continue; - if (!hasExisting) hasChange = true; - if (!addedKey) { - addBaseline(`${key}:${deleted || existing ? "" : " *new*"}`); - addedKey = true; - } - addBaseline(` ${JSON.stringify(value)}${deleted || hasExisting || !existing ? "" : " *new*"}`); - } - } - } - if (baselineChanged) baseline.push(""); - return hasChange; - - function addBaseline(s: string) { - if (!captionAdded) { - baseline.push(`${caption}${deleted ? " *deleted*" : ""}::`); - captionAdded = true; - } - baseline.push(s); - baselineChanged = true; - } -} - function baselineOutputs(baseline: string[], output: readonly string[], start: number, end = output.length) { let baselinedOutput: string[] | undefined; for (let i = start; i < end; i++) { diff --git a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts index 03cbe2c5ceb..06cd1ed05c8 100644 --- a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts +++ b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -5,7 +8,6 @@ import { } from "../helpers/tscWatch"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts index dfa7eb11506..fafb15de8fe 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/auxiliaryProject.ts b/src/testRunner/unittests/tsserver/auxiliaryProject.ts index 78ee2341378..188594dd042 100644 --- a/src/testRunner/unittests/tsserver/auxiliaryProject.ts +++ b/src/testRunner/unittests/tsserver/auxiliaryProject.ts @@ -1,10 +1,12 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { dedent, } from "../../_namespaces/Utils"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 88a98030dc5..3533b4e89a9 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -1,14 +1,16 @@ import { IncrementalVerifierCallbacks, } from "../../../harness/incrementalUtils"; +import { + createLoggerWithInMemoryLogs, + Logger, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, logDiagnostics, - Logger, openFilesForSession, TestProjectService, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/cancellationToken.ts b/src/testRunner/unittests/tsserver/cancellationToken.ts index 5fc573e00f3..c9f58d3c4e0 100644 --- a/src/testRunner/unittests/tsserver/cancellationToken.ts +++ b/src/testRunner/unittests/tsserver/cancellationToken.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, TestServerCancellationToken, TestSessionRequest, diff --git a/src/testRunner/unittests/tsserver/compileOnSave.ts b/src/testRunner/unittests/tsserver/compileOnSave.ts index 0dcd6bb7dd7..9e02f3da536 100644 --- a/src/testRunner/unittests/tsserver/compileOnSave.ts +++ b/src/testRunner/unittests/tsserver/compileOnSave.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, + Logger, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, - Logger, openExternalProjectForSession, openFilesForSession, protocolTextSpanFromSubstring, diff --git a/src/testRunner/unittests/tsserver/completions.ts b/src/testRunner/unittests/tsserver/completions.ts index 9bb415750d4..d7a03bdd61a 100644 --- a/src/testRunner/unittests/tsserver/completions.ts +++ b/src/testRunner/unittests/tsserver/completions.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/completionsIncomplete.ts b/src/testRunner/unittests/tsserver/completionsIncomplete.ts index e98ffd9b774..d2bcec05bc9 100644 --- a/src/testRunner/unittests/tsserver/completionsIncomplete.ts +++ b/src/testRunner/unittests/tsserver/completionsIncomplete.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/configFileSearch.ts b/src/testRunner/unittests/tsserver/configFileSearch.ts index e250ae54fa9..fb416dedffd 100644 --- a/src/testRunner/unittests/tsserver/configFileSearch.ts +++ b/src/testRunner/unittests/tsserver/configFileSearch.ts @@ -1,6 +1,8 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/configuredProjects.ts b/src/testRunner/unittests/tsserver/configuredProjects.ts index 0f524e010e4..1411db07de4 100644 --- a/src/testRunner/unittests/tsserver/configuredProjects.ts +++ b/src/testRunner/unittests/tsserver/configuredProjects.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { ensureErrorFreeBuild, @@ -8,7 +11,6 @@ import { } from "../helpers/tscWatch"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, logConfiguredProjectsHasOpenRefStatus, diff --git a/src/testRunner/unittests/tsserver/declarationFileMaps.ts b/src/testRunner/unittests/tsserver/declarationFileMaps.ts index 2f63d0c8b21..b3de82ed320 100644 --- a/src/testRunner/unittests/tsserver/declarationFileMaps.ts +++ b/src/testRunner/unittests/tsserver/declarationFileMaps.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/documentRegistry.ts b/src/testRunner/unittests/tsserver/documentRegistry.ts index ffde566529c..6f78f0185bf 100644 --- a/src/testRunner/unittests/tsserver/documentRegistry.ts +++ b/src/testRunner/unittests/tsserver/documentRegistry.ts @@ -1,11 +1,13 @@ import { reportDocumentRegistryStats, } from "../../../harness/incrementalUtils"; +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/duplicatePackages.ts b/src/testRunner/unittests/tsserver/duplicatePackages.ts index 4a957d481ae..d01dc584501 100644 --- a/src/testRunner/unittests/tsserver/duplicatePackages.ts +++ b/src/testRunner/unittests/tsserver/duplicatePackages.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/dynamicFiles.ts b/src/testRunner/unittests/tsserver/dynamicFiles.ts index 644deb0e908..a7815617e22 100644 --- a/src/testRunner/unittests/tsserver/dynamicFiles.ts +++ b/src/testRunner/unittests/tsserver/dynamicFiles.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts index 7406af24c15..6280d4fc979 100644 --- a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts +++ b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../../harness/tsserverLogger"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts index 4f854dca732..fb64c6bc2c8 100644 --- a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts +++ b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../../harness/tsserverLogger"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/projectLoading.ts b/src/testRunner/unittests/tsserver/events/projectLoading.ts index 98295f81aaf..2eebb4284c6 100644 --- a/src/testRunner/unittests/tsserver/events/projectLoading.ts +++ b/src/testRunner/unittests/tsserver/events/projectLoading.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../../harness/tsserverLogger"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, createSessionWithCustomEventHandler, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts index 8f113d43c01..ab025be7e8f 100644 --- a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts +++ b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../../harness/tsserverLogger"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, createSessionWithCustomEventHandler, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/watchEvents.ts b/src/testRunner/unittests/tsserver/events/watchEvents.ts index 8c28c946480..5cf06362e3f 100644 --- a/src/testRunner/unittests/tsserver/events/watchEvents.ts +++ b/src/testRunner/unittests/tsserver/events/watchEvents.ts @@ -1,27 +1,30 @@ +import { + createLoggerWithInMemoryLogs, + Logger, +} from "../../../../harness/tsserverLogger"; +import { + createWatchUtils, + WatchUtils, +} from "../../../../harness/watchUtils"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, createSessionWithCustomEventHandler, - Logger, openFilesForSession, TestSession, } from "../../helpers/tsserver"; import { createServerHost, libFile, - serializeMultiMap, TestServerHost, } from "../../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: events:: watchEvents", () => { interface TestServerHostWithCustomWatch extends TestServerHost { factoryData: { - watchedFiles: ts.MultiMap; - watchedDirectories: ts.MultiMap; - watchedDirectoriesRecursive: ts.MultiMap; + watchUtils: WatchUtils; watchFile(data: ts.server.protocol.CreateFileWatcherEventBody): void; watchDirectory(data: ts.server.protocol.CreateDirectoryWatcherEventBody): void; closeWatcher(data: ts.server.protocol.CloseFileWatcherEventBody): void; @@ -32,16 +35,11 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { logger: Logger, ) { const idToClose = new Map void>(); - let serializedWatchedFiles: Map | undefined; - let serializedWatchedDirectories: Map | undefined; - let serializedWatchedDirectoriesRecursive: Map | undefined; const host = logger.host as TestServerHostWithCustomWatch; const originalSerializeWatches = host.serializeWatches; host.serializeWatches = serializeWatches; host.factoryData = { - watchedFiles: ts.createMultiMap(), - watchedDirectories: ts.createMultiMap(), - watchedDirectoriesRecursive: ts.createMultiMap(), + watchUtils: createWatchUtils(`Custom WatchedFiles`, `Custom WatchedDirectories`), watchFile, watchDirectory, closeWatcher, @@ -51,22 +49,20 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { function watchFile(data: ts.server.protocol.CreateFileWatcherEventBody) { logger.log(`Custom watchFile: ${data.id}: ${data.path}`); ts.Debug.assert(!idToClose.has(data.id)); - host.factoryData.watchedFiles.add(data.path, data); - host.hasWatchChanges = true; + const result = host.factoryData.watchUtils.pollingWatch(data.path, data); idToClose.set(data.id, () => { logger.log(`Custom watchFile:: Close:: ${data.id}: ${data.path}`); - host.factoryData.watchedFiles.remove(data.path, data); + result.close(); }); } function watchDirectory(data: ts.server.protocol.CreateDirectoryWatcherEventBody) { logger.log(`Custom watchDirectory: ${data.id}: ${data.path} ${data.recursive}`); ts.Debug.assert(!idToClose.has(data.id)); - (data.recursive ? host.factoryData.watchedDirectoriesRecursive : host.factoryData.watchedDirectories).add(data.path, data); - host.hasWatchChanges = true; + const result = host.factoryData.watchUtils.fsWatch(data.path, data.recursive, data); idToClose.set(data.id, () => { logger.log(`Custom watchDirectory:: Close:: ${data.id}: ${data.path} ${data.recursive}`); - (data.recursive ? host.factoryData.watchedDirectoriesRecursive : host.factoryData.watchedDirectories).remove(data.path, data); + result.close(); }); } @@ -74,18 +70,18 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { const close = idToClose.get(data.id); if (close) { idToClose.delete(data.id); - host.hasWatchChanges = true; close(); } } function serializeWatches(baseline: string[] = []) { - const hasWatchChanges = host.hasWatchChanges; + if (host.factoryData.watchUtils.getHasWatchChanges()) host.watchUtils.setHasWatchChanges(); + const hasWatchChanges = host.watchUtils.getHasWatchChanges(); originalSerializeWatches.call(host, baseline); - if (!hasWatchChanges) return baseline; - serializedWatchedFiles = serializeMultiMap(baseline, `Custom WatchedFiles`, host.factoryData.watchedFiles, serializedWatchedFiles); - serializedWatchedDirectories = serializeMultiMap(baseline, `Custom WatchedDirectories:Recursive`, host.factoryData.watchedDirectoriesRecursive, serializedWatchedDirectories); - serializedWatchedDirectoriesRecursive = serializeMultiMap(baseline, `Custom WatchedDirectories`, host.factoryData.watchedDirectories, serializedWatchedDirectoriesRecursive); + if (hasWatchChanges) { + host.factoryData.watchUtils.setHasWatchChanges(); + host.factoryData.watchUtils.serializeWatches(baseline); + } return baseline; } } @@ -100,7 +96,7 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { function addFile(session: TestSession, path: string) { updateFileOnHost(session, path, "Add file"); session.logger.log("Custom watch"); - (session.logger.host as TestServerHostWithCustomWatch).factoryData.watchedDirectoriesRecursive.get("/user/username/projects/myproject")?.forEach(data => + (session.logger.host as TestServerHostWithCustomWatch).factoryData.watchUtils.fsWatchesRecursive.get("/user/username/projects/myproject")?.forEach(data => session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.WatchChange, arguments: { id: data.id, path, eventType: "create" }, @@ -112,7 +108,7 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { function changeFile(session: TestSession, path: string) { updateFileOnHost(session, path, "Change File"); session.logger.log("Custom watch"); - (session.logger.host as TestServerHostWithCustomWatch).factoryData.watchedFiles.get(path)?.forEach(data => + (session.logger.host as TestServerHostWithCustomWatch).factoryData.watchUtils.pollingWatches.get(path)?.forEach(data => session.executeCommandSeq({ command: ts.server.protocol.CommandTypes.WatchChange, arguments: { id: data.id, path, eventType: "update" }, @@ -135,7 +131,7 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { it("canUseWatchEvents", () => { const { host, logger } = setup(); - const session = createSessionWithCustomEventHandler(logger.host!, { canUseWatchEvents: true, logger }, handleWatchEvents); + const session = createSessionWithCustomEventHandler(host, { canUseWatchEvents: true, logger }, handleWatchEvents); openFilesForSession(["/user/username/projects/myproject/a.ts"], session); // Directory watcher @@ -169,8 +165,8 @@ describe("unittests:: tsserver:: events:: watchEvents", () => { }); it("canUseWatchEvents without canUseEvents", () => { - const { logger } = setup(); - const session = createSession(logger.host!, { canUseEvents: false, logger }); + const { host, logger } = setup(); + const session = createSession(host, { canUseEvents: false, logger }); openFilesForSession(["/user/username/projects/myproject/a.ts"], session); // Directory watcher diff --git a/src/testRunner/unittests/tsserver/exportMapCache.ts b/src/testRunner/unittests/tsserver/exportMapCache.ts index bcf6b3b38fd..0142dee7cef 100644 --- a/src/testRunner/unittests/tsserver/exportMapCache.ts +++ b/src/testRunner/unittests/tsserver/exportMapCache.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/extends.ts b/src/testRunner/unittests/tsserver/extends.ts index 91676f0da2a..cc3e4126876 100644 --- a/src/testRunner/unittests/tsserver/extends.ts +++ b/src/testRunner/unittests/tsserver/extends.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { getSymlinkedExtendsSys, } from "../helpers/extends"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/externalProjects.ts b/src/testRunner/unittests/tsserver/externalProjects.ts index 62653cd49a2..23bd06b5f0e 100644 --- a/src/testRunner/unittests/tsserver/externalProjects.ts +++ b/src/testRunner/unittests/tsserver/externalProjects.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, logConfiguredProjectsHasOpenRefStatus, diff --git a/src/testRunner/unittests/tsserver/findAllReferences.ts b/src/testRunner/unittests/tsserver/findAllReferences.ts index e194b58fe7b..928b4292651 100644 --- a/src/testRunner/unittests/tsserver/findAllReferences.ts +++ b/src/testRunner/unittests/tsserver/findAllReferences.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { protocol, } from "../../_namespaces/ts.server"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts index 2ef7a891b2a..bc77c0276fd 100644 --- a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolTextSpanFromSubstring, diff --git a/src/testRunner/unittests/tsserver/formatSettings.ts b/src/testRunner/unittests/tsserver/formatSettings.ts index a0d55ac41a5..027abb51602 100644 --- a/src/testRunner/unittests/tsserver/formatSettings.ts +++ b/src/testRunner/unittests/tsserver/formatSettings.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts index 03ed1542cfb..1c9cc8ee249 100644 --- a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts +++ b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts index d7ebe957084..298baa5d2fb 100644 --- a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts +++ b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, textSpanFromSubstring, diff --git a/src/testRunner/unittests/tsserver/getExportReferences.ts b/src/testRunner/unittests/tsserver/getExportReferences.ts index 1219a07c2f3..31dd0e0c1f9 100644 --- a/src/testRunner/unittests/tsserver/getExportReferences.ts +++ b/src/testRunner/unittests/tsserver/getExportReferences.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/getFileReferences.ts b/src/testRunner/unittests/tsserver/getFileReferences.ts index 057ab0dcb22..28d0d5feb88 100644 --- a/src/testRunner/unittests/tsserver/getFileReferences.ts +++ b/src/testRunner/unittests/tsserver/getFileReferences.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts index 67aa8b3f9d3..2d0336232d5 100644 --- a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts +++ b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/goToDefinition.ts b/src/testRunner/unittests/tsserver/goToDefinition.ts index f078d677694..8b2cce8d610 100644 --- a/src/testRunner/unittests/tsserver/goToDefinition.ts +++ b/src/testRunner/unittests/tsserver/goToDefinition.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { protocol, } from "../../_namespaces/ts.server"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/importHelpers.ts b/src/testRunner/unittests/tsserver/importHelpers.ts index ad355231c25..9b02e52a5a6 100644 --- a/src/testRunner/unittests/tsserver/importHelpers.ts +++ b/src/testRunner/unittests/tsserver/importHelpers.ts @@ -1,6 +1,8 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openExternalProjectForSession, toExternalFile, diff --git a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts index 3a80c143773..da83c51c21f 100644 --- a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts +++ b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, verifyGetErrRequest, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/inferredProjects.ts b/src/testRunner/unittests/tsserver/inferredProjects.ts index a67e3a2ba11..ecf3ffa2520 100644 --- a/src/testRunner/unittests/tsserver/inferredProjects.ts +++ b/src/testRunner/unittests/tsserver/inferredProjects.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { dedent, @@ -8,7 +11,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, logInferredProjectsOrphanStatus, diff --git a/src/testRunner/unittests/tsserver/inlayHints.ts b/src/testRunner/unittests/tsserver/inlayHints.ts index b2c7e0a3d1a..b92df9d2ae1 100644 --- a/src/testRunner/unittests/tsserver/inlayHints.ts +++ b/src/testRunner/unittests/tsserver/inlayHints.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -5,7 +8,6 @@ import { } from "../helpers/tscWatch"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, TestSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/jsdocTag.ts b/src/testRunner/unittests/tsserver/jsdocTag.ts index b3023da35d8..ffd7e83e12d 100644 --- a/src/testRunner/unittests/tsserver/jsdocTag.ts +++ b/src/testRunner/unittests/tsserver/jsdocTag.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/languageService.ts b/src/testRunner/unittests/tsserver/languageService.ts index b7f3646716c..06278415d20 100644 --- a/src/testRunner/unittests/tsserver/languageService.ts +++ b/src/testRunner/unittests/tsserver/languageService.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as Utils from "../../_namespaces/Utils"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, logDiagnostics, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/libraryResolution.ts b/src/testRunner/unittests/tsserver/libraryResolution.ts index 99a1d099420..1bfdb90aa15 100644 --- a/src/testRunner/unittests/tsserver/libraryResolution.ts +++ b/src/testRunner/unittests/tsserver/libraryResolution.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { getServerHosForLibResolution, } from "../helpers/libraryResolution"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts index b1de9a8fa7e..fb71c8009f9 100644 --- a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts +++ b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { dedent, @@ -5,7 +8,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, setCompilerOptionsForInferredProjectsRequestForSession, diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts index 9bc2dc2c0af..ff838057a9d 100644 --- a/src/testRunner/unittests/tsserver/metadataInResponse.ts +++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/moduleResolution.ts b/src/testRunner/unittests/tsserver/moduleResolution.ts index c3ca2a25aa3..7397a6ab7bb 100644 --- a/src/testRunner/unittests/tsserver/moduleResolution.ts +++ b/src/testRunner/unittests/tsserver/moduleResolution.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { dedent, @@ -16,7 +19,6 @@ import { } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolTextSpanFromSubstring, diff --git a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts index acc39d3981d..2cbe1983cd6 100644 --- a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts +++ b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/navTo.ts b/src/testRunner/unittests/tsserver/navTo.ts index 883d5bdbda5..0bae4e26a0e 100644 --- a/src/testRunner/unittests/tsserver/navTo.ts +++ b/src/testRunner/unittests/tsserver/navTo.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/occurences.ts b/src/testRunner/unittests/tsserver/occurences.ts index c89b4754db8..246b5daedf3 100644 --- a/src/testRunner/unittests/tsserver/occurences.ts +++ b/src/testRunner/unittests/tsserver/occurences.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/openFile.ts b/src/testRunner/unittests/tsserver/openFile.ts index 110357c2b03..abdcb943e8f 100644 --- a/src/testRunner/unittests/tsserver/openFile.ts +++ b/src/testRunner/unittests/tsserver/openFile.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/packageJsonInfo.ts b/src/testRunner/unittests/tsserver/packageJsonInfo.ts index 573e014a6f7..0ef2f8c71bf 100644 --- a/src/testRunner/unittests/tsserver/packageJsonInfo.ts +++ b/src/testRunner/unittests/tsserver/packageJsonInfo.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/partialSemanticServer.ts b/src/testRunner/unittests/tsserver/partialSemanticServer.ts index cbe2c337ab3..d87f3d790ff 100644 --- a/src/testRunner/unittests/tsserver/partialSemanticServer.ts +++ b/src/testRunner/unittests/tsserver/partialSemanticServer.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/plugins.ts b/src/testRunner/unittests/tsserver/plugins.ts index c73f12b987d..a8c19216b9c 100644 --- a/src/testRunner/unittests/tsserver/plugins.ts +++ b/src/testRunner/unittests/tsserver/plugins.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, TestSessionOptions, diff --git a/src/testRunner/unittests/tsserver/pluginsAsync.ts b/src/testRunner/unittests/tsserver/pluginsAsync.ts index a14caeb8457..2772e5d0f68 100644 --- a/src/testRunner/unittests/tsserver/pluginsAsync.ts +++ b/src/testRunner/unittests/tsserver/pluginsAsync.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { defer, @@ -5,7 +8,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index a80ebc5dbf6..9d803553084 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { appendAllScriptInfos, baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts index 121a59a9252..72d4270b045 100644 --- a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts +++ b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts @@ -1,10 +1,12 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { ensureErrorFreeBuild, } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolToLocation, diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 00b764b72f1..21ceaa9f5b1 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { solutionBuildWithBaseline, @@ -5,7 +8,6 @@ import { import { baselineTsserverLogs, createHostWithSolutionBuild, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts index 5f5ecb64d68..c8db545e772 100644 --- a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts +++ b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts @@ -1,9 +1,11 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, createHostWithSolutionBuild, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, TestSession, diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index e6c9dbfffae..61278b5f500 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -6,7 +9,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, logConfiguredProjectsHasOpenRefStatus, diff --git a/src/testRunner/unittests/tsserver/projectsWithReferences.ts b/src/testRunner/unittests/tsserver/projectsWithReferences.ts index a261c7adbbe..6d031cc431b 100644 --- a/src/testRunner/unittests/tsserver/projectsWithReferences.ts +++ b/src/testRunner/unittests/tsserver/projectsWithReferences.ts @@ -1,6 +1,8 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/refactors.ts b/src/testRunner/unittests/tsserver/refactors.ts index 21b09170fb8..27d7e820640 100644 --- a/src/testRunner/unittests/tsserver/refactors.ts +++ b/src/testRunner/unittests/tsserver/refactors.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/reload.ts b/src/testRunner/unittests/tsserver/reload.ts index 4ff33544924..4aecf859844 100644 --- a/src/testRunner/unittests/tsserver/reload.ts +++ b/src/testRunner/unittests/tsserver/reload.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, logInferredProjectsOrphanStatus, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/reloadProjects.ts b/src/testRunner/unittests/tsserver/reloadProjects.ts index fd9cc1503dc..06cb510de11 100644 --- a/src/testRunner/unittests/tsserver/reloadProjects.ts +++ b/src/testRunner/unittests/tsserver/reloadProjects.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openExternalProjectForSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/rename.ts b/src/testRunner/unittests/tsserver/rename.ts index 7c37001e3c1..bafd2432599 100644 --- a/src/testRunner/unittests/tsserver/rename.ts +++ b/src/testRunner/unittests/tsserver/rename.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts index 36fb766dddd..94f695e654a 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; import { @@ -5,7 +8,6 @@ import { } from "../helpers/contents"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts index ad14f4e71ac..9baf89050d8 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -5,12 +5,12 @@ import { import { incrementalVerifier, } from "../../../harness/incrementalUtils"; -import * as Harness from "../../_namespaces/Harness"; -import * as ts from "../../_namespaces/ts"; import { createHasErrorMessageLogger, nullLogger, -} from "../helpers/tsserver"; +} from "../../../harness/tsserverLogger"; +import * as Harness from "../../_namespaces/Harness"; +import * as ts from "../../_namespaces/ts"; let lastWrittenToHost: string; const noopFileWatcher: ts.FileWatcher = { close: ts.noop }; diff --git a/src/testRunner/unittests/tsserver/skipLibCheck.ts b/src/testRunner/unittests/tsserver/skipLibCheck.ts index 067d87544b1..99554427351 100644 --- a/src/testRunner/unittests/tsserver/skipLibCheck.ts +++ b/src/testRunner/unittests/tsserver/skipLibCheck.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openExternalProjectForSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/smartSelection.ts b/src/testRunner/unittests/tsserver/smartSelection.ts index 28b40409230..952268b4af9 100644 --- a/src/testRunner/unittests/tsserver/smartSelection.ts +++ b/src/testRunner/unittests/tsserver/smartSelection.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/symLinks.ts b/src/testRunner/unittests/tsserver/symLinks.ts index 85f3319b57d..82f0720cb41 100644 --- a/src/testRunner/unittests/tsserver/symLinks.ts +++ b/src/testRunner/unittests/tsserver/symLinks.ts @@ -1,3 +1,6 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { dedent, @@ -5,7 +8,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/symlinkCache.ts b/src/testRunner/unittests/tsserver/symlinkCache.ts index faca21587bc..73fc0b2ab2f 100644 --- a/src/testRunner/unittests/tsserver/symlinkCache.ts +++ b/src/testRunner/unittests/tsserver/symlinkCache.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/syntacticServer.ts b/src/testRunner/unittests/tsserver/syntacticServer.ts index 9a48ff07d7d..e63ef008b89 100644 --- a/src/testRunner/unittests/tsserver/syntacticServer.ts +++ b/src/testRunner/unittests/tsserver/syntacticServer.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/syntaxOperations.ts b/src/testRunner/unittests/tsserver/syntaxOperations.ts index bff763b8297..5c61ede3b88 100644 --- a/src/testRunner/unittests/tsserver/syntaxOperations.ts +++ b/src/testRunner/unittests/tsserver/syntaxOperations.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/telemetry.ts b/src/testRunner/unittests/tsserver/telemetry.ts index e7fd1c6814d..7ea855435f5 100644 --- a/src/testRunner/unittests/tsserver/telemetry.ts +++ b/src/testRunner/unittests/tsserver/telemetry.ts @@ -1,8 +1,10 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openExternalProjectForSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/textStorage.ts b/src/testRunner/unittests/tsserver/textStorage.ts index 8b82e33628c..7a3031347f9 100644 --- a/src/testRunner/unittests/tsserver/textStorage.ts +++ b/src/testRunner/unittests/tsserver/textStorage.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, } from "../helpers/tsserver"; import { diff --git a/src/testRunner/unittests/tsserver/typeAquisition.ts b/src/testRunner/unittests/tsserver/typeAquisition.ts index fc708b23506..18a53dcdb05 100644 --- a/src/testRunner/unittests/tsserver/typeAquisition.ts +++ b/src/testRunner/unittests/tsserver/typeAquisition.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, toExternalFile, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts index e8810c19340..793773823f8 100644 --- a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts +++ b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts @@ -1,7 +1,9 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts index c0caf9bab9c..a7be45f1fd6 100644 --- a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts +++ b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts @@ -1,6 +1,8 @@ +import { + createLoggerWithInMemoryLogs, +} from "../../../harness/tsserverLogger"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts index b17c7444cd8..45c10e10406 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -1,13 +1,15 @@ +import { + createLoggerWithInMemoryLogs, + replaceAll, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, patchHostTimeouts, - replaceAll, TestSessionRequest, toExternalFile, } from "../helpers/tsserver"; diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts index 7d973288c96..617620f2f65 100644 --- a/src/testRunner/unittests/tsserver/watchEnvironment.ts +++ b/src/testRunner/unittests/tsserver/watchEnvironment.ts @@ -1,3 +1,7 @@ +import { + createLoggerWithInMemoryLogs, + Logger, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -5,10 +9,8 @@ import { } from "../helpers/tscWatch"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, createSession, - Logger, openExternalProjectForSession, openFilesForSession, protocolFileLocationFromSubstring, diff --git a/tests/baselines/reference/autoImportAllowTsExtensions1.baseline.md b/tests/baselines/reference/autoImportAllowTsExtensions1.baseline.md index 0e3c27ce7e9..8818deac53b 100644 --- a/tests/baselines/reference/autoImportAllowTsExtensions1.baseline.md +++ b/tests/baselines/reference/autoImportAllowTsExtensions1.baseline.md @@ -1,3 +1,4 @@ +// === Auto Imports === ```ts // @Filename: /main.ts /*|*/ diff --git a/tests/baselines/reference/autoImportAllowTsExtensions2.baseline.md b/tests/baselines/reference/autoImportAllowTsExtensions2.baseline.md index 1117148b187..688df04a26e 100644 --- a/tests/baselines/reference/autoImportAllowTsExtensions2.baseline.md +++ b/tests/baselines/reference/autoImportAllowTsExtensions2.baseline.md @@ -1,3 +1,4 @@ +// === Auto Imports === ```ts // @Filename: /main.ts /*|*/ diff --git a/tests/baselines/reference/autoImportAllowTsExtensions3.baseline.md b/tests/baselines/reference/autoImportAllowTsExtensions3.baseline.md index 551ff404a6a..941244d4d5a 100644 --- a/tests/baselines/reference/autoImportAllowTsExtensions3.baseline.md +++ b/tests/baselines/reference/autoImportAllowTsExtensions3.baseline.md @@ -1,3 +1,4 @@ +// === Auto Imports === ```ts // @Filename: /main.ts import { Component } from "./Component.tsx"; diff --git a/tests/baselines/reference/autoImportAllowTsExtensions4.baseline.md b/tests/baselines/reference/autoImportAllowTsExtensions4.baseline.md index cdae3c5eaa4..9c646c8f418 100644 --- a/tests/baselines/reference/autoImportAllowTsExtensions4.baseline.md +++ b/tests/baselines/reference/autoImportAllowTsExtensions4.baseline.md @@ -1,3 +1,4 @@ +// === Auto Imports === ```ts // @Filename: /main.ts import { Component } from "./local.js"; diff --git a/tests/baselines/reference/autoImportVerbatimCJS1.baseline.md b/tests/baselines/reference/autoImportVerbatimCJS1.baseline.md index a1058a67d59..ceeb93b4b40 100644 --- a/tests/baselines/reference/autoImportVerbatimCJS1.baseline.md +++ b/tests/baselines/reference/autoImportVerbatimCJS1.baseline.md @@ -1,3 +1,4 @@ +// === Auto Imports === ```ts // @Filename: /a.ts /*|*/ diff --git a/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline b/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline index aa39897be0f..1fe75324156 100644 --- a/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline +++ b/tests/baselines/reference/bpSpan_arrayLiteralExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var a = [10, 20, 30]; diff --git a/tests/baselines/reference/bpSpan_binaryExpressions.baseline b/tests/baselines/reference/bpSpan_binaryExpressions.baseline index 93f6b97005b..98c926937cc 100644 --- a/tests/baselines/reference/bpSpan_binaryExpressions.baseline +++ b/tests/baselines/reference/bpSpan_binaryExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_breakOrContinue.baseline b/tests/baselines/reference/bpSpan_breakOrContinue.baseline index 617589b9047..710ea1012ff 100644 --- a/tests/baselines/reference/bpSpan_breakOrContinue.baseline +++ b/tests/baselines/reference/bpSpan_breakOrContinue.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >while (true) { diff --git a/tests/baselines/reference/bpSpan_class.baseline b/tests/baselines/reference/bpSpan_class.baseline index 3370762f72b..330a4d58974 100644 --- a/tests/baselines/reference/bpSpan_class.baseline +++ b/tests/baselines/reference/bpSpan_class.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >class Greeter { diff --git a/tests/baselines/reference/bpSpan_classAmbient.baseline b/tests/baselines/reference/bpSpan_classAmbient.baseline index b168c5416c5..6c3ada70499 100644 --- a/tests/baselines/reference/bpSpan_classAmbient.baseline +++ b/tests/baselines/reference/bpSpan_classAmbient.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare class Greeter { diff --git a/tests/baselines/reference/bpSpan_classes.baseline b/tests/baselines/reference/bpSpan_classes.baseline index ecba5c8706a..eca706e19e7 100644 --- a/tests/baselines/reference/bpSpan_classes.baseline +++ b/tests/baselines/reference/bpSpan_classes.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >module Foo.Bar { diff --git a/tests/baselines/reference/bpSpan_conditionalExpressions.baseline b/tests/baselines/reference/bpSpan_conditionalExpressions.baseline index 17432ee5439..c015157e01a 100644 --- a/tests/baselines/reference/bpSpan_conditionalExpressions.baseline +++ b/tests/baselines/reference/bpSpan_conditionalExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_const.baseline b/tests/baselines/reference/bpSpan_const.baseline index 176fb76be86..d721615e8c9 100644 --- a/tests/baselines/reference/bpSpan_const.baseline +++ b/tests/baselines/reference/bpSpan_const.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >const c1 = false; diff --git a/tests/baselines/reference/bpSpan_debugger.baseline b/tests/baselines/reference/bpSpan_debugger.baseline index 700ef7a56a9..c8ba757aebf 100644 --- a/tests/baselines/reference/bpSpan_debugger.baseline +++ b/tests/baselines/reference/bpSpan_debugger.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >debugger; ~~~~~~~~~ => Pos: (0 to 8) SpanInfo: {"start":0,"length":8} diff --git a/tests/baselines/reference/bpSpan_decorators.baseline b/tests/baselines/reference/bpSpan_decorators.baseline index f6bb700e098..56163cb4eb9 100644 --- a/tests/baselines/reference/bpSpan_decorators.baseline +++ b/tests/baselines/reference/bpSpan_decorators.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare function ClassDecorator1(target: Function): void; diff --git a/tests/baselines/reference/bpSpan_do.baseline b/tests/baselines/reference/bpSpan_do.baseline index 602ec5b16c7..32a449b6903 100644 --- a/tests/baselines/reference/bpSpan_do.baseline +++ b/tests/baselines/reference/bpSpan_do.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var i = 0; diff --git a/tests/baselines/reference/bpSpan_enums.baseline b/tests/baselines/reference/bpSpan_enums.baseline index 1dd77f8d417..9d0f123d00c 100644 --- a/tests/baselines/reference/bpSpan_enums.baseline +++ b/tests/baselines/reference/bpSpan_enums.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >enum e { diff --git a/tests/baselines/reference/bpSpan_exportAssignment.baseline b/tests/baselines/reference/bpSpan_exportAssignment.baseline index a9d635a929c..5880cdfbec2 100644 --- a/tests/baselines/reference/bpSpan_exportAssignment.baseline +++ b/tests/baselines/reference/bpSpan_exportAssignment.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >class a { diff --git a/tests/baselines/reference/bpSpan_exports.baseline b/tests/baselines/reference/bpSpan_exports.baseline index 1b09fb75a2f..07f31a3f07f 100644 --- a/tests/baselines/reference/bpSpan_exports.baseline +++ b/tests/baselines/reference/bpSpan_exports.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >export * from "a"; diff --git a/tests/baselines/reference/bpSpan_for.baseline b/tests/baselines/reference/bpSpan_for.baseline index 46214f6e3b1..efda94cfd3f 100644 --- a/tests/baselines/reference/bpSpan_for.baseline +++ b/tests/baselines/reference/bpSpan_for.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >for (var i = 0; i < 10; i++) { diff --git a/tests/baselines/reference/bpSpan_forIn.baseline b/tests/baselines/reference/bpSpan_forIn.baseline index 1c46a83e3b4..22460e26efa 100644 --- a/tests/baselines/reference/bpSpan_forIn.baseline +++ b/tests/baselines/reference/bpSpan_forIn.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >for (var x in String) { diff --git a/tests/baselines/reference/bpSpan_functionExpressions.baseline b/tests/baselines/reference/bpSpan_functionExpressions.baseline index f75bde15f07..f5fad4a3b8e 100644 --- a/tests/baselines/reference/bpSpan_functionExpressions.baseline +++ b/tests/baselines/reference/bpSpan_functionExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var greetings = 0; diff --git a/tests/baselines/reference/bpSpan_functions.baseline b/tests/baselines/reference/bpSpan_functions.baseline index 535f177c0f6..468cbfabed1 100644 --- a/tests/baselines/reference/bpSpan_functions.baseline +++ b/tests/baselines/reference/bpSpan_functions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var greetings = 0; diff --git a/tests/baselines/reference/bpSpan_ifElse.baseline b/tests/baselines/reference/bpSpan_ifElse.baseline index fc9e5f6758a..17a644d4631 100644 --- a/tests/baselines/reference/bpSpan_ifElse.baseline +++ b/tests/baselines/reference/bpSpan_ifElse.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var i = 10; diff --git a/tests/baselines/reference/bpSpan_import.baseline b/tests/baselines/reference/bpSpan_import.baseline index af0f959c57c..cfede392460 100644 --- a/tests/baselines/reference/bpSpan_import.baseline +++ b/tests/baselines/reference/bpSpan_import.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >module m { diff --git a/tests/baselines/reference/bpSpan_imports.baseline b/tests/baselines/reference/bpSpan_imports.baseline index c59f9faf904..97979980f97 100644 --- a/tests/baselines/reference/bpSpan_imports.baseline +++ b/tests/baselines/reference/bpSpan_imports.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >import * as NS from "a"; diff --git a/tests/baselines/reference/bpSpan_inBlankLine.baseline b/tests/baselines/reference/bpSpan_inBlankLine.baseline index 40fe26a16a6..cdafbbaccf5 100644 --- a/tests/baselines/reference/bpSpan_inBlankLine.baseline +++ b/tests/baselines/reference/bpSpan_inBlankLine.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_inComments.baseline b/tests/baselines/reference/bpSpan_inComments.baseline index 5c167293513..a137e36069b 100644 --- a/tests/baselines/reference/bpSpan_inComments.baseline +++ b/tests/baselines/reference/bpSpan_inComments.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >/*comment here*/ var x = 10; /*comment here*/ diff --git a/tests/baselines/reference/bpSpan_interface.baseline b/tests/baselines/reference/bpSpan_interface.baseline index 14e7921757d..d6f95b94008 100644 --- a/tests/baselines/reference/bpSpan_interface.baseline +++ b/tests/baselines/reference/bpSpan_interface.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface I { diff --git a/tests/baselines/reference/bpSpan_labeled.baseline b/tests/baselines/reference/bpSpan_labeled.baseline index 8c2d23adedb..7ab734052db 100644 --- a/tests/baselines/reference/bpSpan_labeled.baseline +++ b/tests/baselines/reference/bpSpan_labeled.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >x: diff --git a/tests/baselines/reference/bpSpan_let.baseline b/tests/baselines/reference/bpSpan_let.baseline index d9a3c2f8547..12a58c2896b 100644 --- a/tests/baselines/reference/bpSpan_let.baseline +++ b/tests/baselines/reference/bpSpan_let.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >let l1; diff --git a/tests/baselines/reference/bpSpan_module.baseline b/tests/baselines/reference/bpSpan_module.baseline index e544fc4c432..b336474a58c 100644 --- a/tests/baselines/reference/bpSpan_module.baseline +++ b/tests/baselines/reference/bpSpan_module.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >module m2 { diff --git a/tests/baselines/reference/bpSpan_moduleAmbient.baseline b/tests/baselines/reference/bpSpan_moduleAmbient.baseline index 8ea705dc09f..3c7ffa50a62 100644 --- a/tests/baselines/reference/bpSpan_moduleAmbient.baseline +++ b/tests/baselines/reference/bpSpan_moduleAmbient.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare module Bar { diff --git a/tests/baselines/reference/bpSpan_moduleEmpty.baseline b/tests/baselines/reference/bpSpan_moduleEmpty.baseline index 3139d4603d2..0c8e39086e9 100644 --- a/tests/baselines/reference/bpSpan_moduleEmpty.baseline +++ b/tests/baselines/reference/bpSpan_moduleEmpty.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >module Bar { diff --git a/tests/baselines/reference/bpSpan_objectLiteralExpressions.baseline b/tests/baselines/reference/bpSpan_objectLiteralExpressions.baseline index 0d864a9b1bd..ca7ee528961 100644 --- a/tests/baselines/reference/bpSpan_objectLiteralExpressions.baseline +++ b/tests/baselines/reference/bpSpan_objectLiteralExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = { diff --git a/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline b/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline index bcc2326c1f3..0ef51091e1d 100644 --- a/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline +++ b/tests/baselines/reference/bpSpan_parenCallOrNewExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >function foo(a: number) { diff --git a/tests/baselines/reference/bpSpan_stmts.baseline b/tests/baselines/reference/bpSpan_stmts.baseline index b818c9c9e30..29757662f9c 100644 --- a/tests/baselines/reference/bpSpan_stmts.baseline +++ b/tests/baselines/reference/bpSpan_stmts.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >function f() { diff --git a/tests/baselines/reference/bpSpan_switch.baseline b/tests/baselines/reference/bpSpan_switch.baseline index 7fde6067ed0..98e498b12ec 100644 --- a/tests/baselines/reference/bpSpan_switch.baseline +++ b/tests/baselines/reference/bpSpan_switch.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_tryCatchFinally.baseline b/tests/baselines/reference/bpSpan_tryCatchFinally.baseline index c35683b6e53..b493d58297a 100644 --- a/tests/baselines/reference/bpSpan_tryCatchFinally.baseline +++ b/tests/baselines/reference/bpSpan_tryCatchFinally.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline b/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline index 9a15f782081..64bf0da6809 100644 --- a/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline +++ b/tests/baselines/reference/bpSpan_typeAssertionExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >class Greeter { diff --git a/tests/baselines/reference/bpSpan_typealias.baseline b/tests/baselines/reference/bpSpan_typealias.baseline index 80e654ad2f3..0ae9af1578d 100644 --- a/tests/baselines/reference/bpSpan_typealias.baseline +++ b/tests/baselines/reference/bpSpan_typealias.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >module m2 { diff --git a/tests/baselines/reference/bpSpan_unaryExpressions.baseline b/tests/baselines/reference/bpSpan_unaryExpressions.baseline index e0433bf5fad..7b20a54d37c 100644 --- a/tests/baselines/reference/bpSpan_unaryExpressions.baseline +++ b/tests/baselines/reference/bpSpan_unaryExpressions.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var x = 10; diff --git a/tests/baselines/reference/bpSpan_variables.baseline b/tests/baselines/reference/bpSpan_variables.baseline index 545118daf8d..065046250db 100644 --- a/tests/baselines/reference/bpSpan_variables.baseline +++ b/tests/baselines/reference/bpSpan_variables.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var a = 10; diff --git a/tests/baselines/reference/bpSpan_while.baseline b/tests/baselines/reference/bpSpan_while.baseline index 464a736447a..faf49603848 100644 --- a/tests/baselines/reference/bpSpan_while.baseline +++ b/tests/baselines/reference/bpSpan_while.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var a = 10; diff --git a/tests/baselines/reference/bpSpan_with.baseline b/tests/baselines/reference/bpSpan_with.baseline index d4a00e7a3aa..26f8c1a0188 100644 --- a/tests/baselines/reference/bpSpan_with.baseline +++ b/tests/baselines/reference/bpSpan_with.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >var obj: string; diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPattern.baseline index 923e0cced09..7287804c2d1 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline index 56894ce9a9a..5f60e468e60 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPattern.baseline index c318d875ddf..ff989991c3e 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline index daf4f8a0d84..dda8b084588 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.baseline index 16f6039031e..6a2c2b9b532 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline index c7e2f005833..b371cd4c440 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.baseline index b303f33026a..cda225dacfb 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline index 18a0ebdca34..5b02f499e81 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentForOfObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.baseline index 017f4859b1b..2b23b14a8bb 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline index 17b60f1861a..99355c6ab0f 100644 --- a/tests/baselines/reference/bpSpanDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringAssignmentStatementArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPattern.baseline index 9a65a6f2e95..5ac3a935e22 100644 --- a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.baseline index 78fc1b42b2f..2074514de52 100644 --- a/tests/baselines/reference/bpSpanDestructuringForArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPattern.baseline index 718799a8334..88bd92a6877 100644 --- a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.baseline index 54d9cbc0471..0549a1bb494 100644 --- a/tests/baselines/reference/bpSpanDestructuringForObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPattern.baseline index 2d0cbda5d8d..cc2fc8eb563 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.baseline index 5dfc730003f..f6c9757df09 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForOfArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPattern.baseline index 14e0d2a2d27..546c826ca9d 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.baseline index d2169558daf..56133c43d55 100644 --- a/tests/baselines/reference/bpSpanDestructuringForOfObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringForOfObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern.baseline index 03f0ee87356..82e926e8ea5 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern2.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern2.baseline index 8fbd3a9ffb2..b55f8e9acff 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPattern2.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPattern2.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.baseline index d071692b0f2..3a7690e65db 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.baseline index 895c83a4c8c..70876541ee0 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterArrayBindingPatternDefaultValues2.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterArrayBindingPatternDefaultValues2.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPattern.baseline index be773df4530..63ce24e7a19 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline index c06c9b56fe5..197aacdd091 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPattern.baseline index 21f11f320ab..634f018f6d9 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface Robot { diff --git a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.baseline index 6cb9b39c0d3..1a5fb127df6 100644 --- a/tests/baselines/reference/bpSpanDestructuringParameterObjectBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringParameterObjectBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface Robot { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatement.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatement.baseline index 3939c66c56e..b464e99d565 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatement.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatement.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface Robot { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatement1.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatement1.baseline index ce1edbb0ee9..3e43f2be917 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatement1.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatement1.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface Robot { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern.baseline index 0639ca49c9d..c5d52f0cdf7 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.baseline index e6170c44042..f43078caccd 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPattern2.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPattern2.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline index e3b43164563..4d683f55c0d 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline index b55c6c765f2..e1a3ef51006 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementDefaultValues.baseline index 60ee5897d48..53484ed79a8 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >interface Robot { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.baseline index 66f814ada9c..1848a90dffe 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPattern.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPattern.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline similarity index 99% rename from tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline rename to tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline index 75b37a0231e..22320f52066 100644 --- a/tests/baselines/reference/bpSpanDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline +++ b/tests/baselines/reference/breakpointValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.baseline @@ -1,3 +1,4 @@ +// === breakpoints === 1 >declare var console: { diff --git a/tests/baselines/reference/callHierarchyAccessor.callHierarchy.txt b/tests/baselines/reference/callHierarchyAccessor.callHierarchy.txt index cab6d39285a..e5267604374 100644 --- a/tests/baselines/reference/callHierarchyAccessor.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyAccessor.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: getter ├ containerName: C diff --git a/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt b/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt index 470cec600f3..90a55cabb66 100644 --- a/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts diff --git a/tests/baselines/reference/callHierarchyClass.callHierarchy.txt b/tests/baselines/reference/callHierarchyClass.callHierarchy.txt index e56084002c7..8887e08dc58 100644 --- a/tests/baselines/reference/callHierarchyClass.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyClass.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyClass.ts diff --git a/tests/baselines/reference/callHierarchyClassStaticBlock.callHierarchy.txt b/tests/baselines/reference/callHierarchyClassStaticBlock.callHierarchy.txt index fbf3658c982..57f22f3e73a 100644 --- a/tests/baselines/reference/callHierarchyClassStaticBlock.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyClassStaticBlock.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyClassStaticBlock.ts diff --git a/tests/baselines/reference/callHierarchyClassStaticBlock2.callHierarchy.txt b/tests/baselines/reference/callHierarchyClassStaticBlock2.callHierarchy.txt index beaf564c2d5..9d100f53c91 100644 --- a/tests/baselines/reference/callHierarchyClassStaticBlock2.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyClassStaticBlock2.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: static {} ├ kind: constructor ├ file: /tests/cases/fourslash/callHierarchyClassStaticBlock2.ts diff --git a/tests/baselines/reference/callHierarchyConstNamedArrowFunction.callHierarchy.txt b/tests/baselines/reference/callHierarchyConstNamedArrowFunction.callHierarchy.txt index bcc7ab9ac8a..f012a56a08c 100644 --- a/tests/baselines/reference/callHierarchyConstNamedArrowFunction.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyConstNamedArrowFunction.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyConstNamedArrowFunction.ts diff --git a/tests/baselines/reference/callHierarchyConstNamedClassExpression.callHierarchy.txt b/tests/baselines/reference/callHierarchyConstNamedClassExpression.callHierarchy.txt index ed4a25e1641..7549fc3faec 100644 --- a/tests/baselines/reference/callHierarchyConstNamedClassExpression.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyConstNamedClassExpression.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: Bar ├ kind: class ├ file: /tests/cases/fourslash/callHierarchyConstNamedClassExpression.ts diff --git a/tests/baselines/reference/callHierarchyConstNamedFunctionExpression.callHierarchy.txt b/tests/baselines/reference/callHierarchyConstNamedFunctionExpression.callHierarchy.txt index 6c92745d50d..733afea9090 100644 --- a/tests/baselines/reference/callHierarchyConstNamedFunctionExpression.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyConstNamedFunctionExpression.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyConstNamedFunctionExpression.ts diff --git a/tests/baselines/reference/callHierarchyContainerName.callHierarchy.txt b/tests/baselines/reference/callHierarchyContainerName.callHierarchy.txt index 7b9c24c8006..1402de01964 100644 --- a/tests/baselines/reference/callHierarchyContainerName.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyContainerName.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: f ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyContainerName.ts diff --git a/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt b/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt index 583fa14f605..f946f64b979 100644 --- a/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: f ├ kind: function ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts diff --git a/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt b/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt index e301fbdf8b1..612cc1229c0 100644 --- a/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyCrossFile.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: createModelReference ├ kind: function ├ file: /a.ts diff --git a/tests/baselines/reference/callHierarchyDecorator.callHierarchy.txt b/tests/baselines/reference/callHierarchyDecorator.callHierarchy.txt index 698c9ab313b..ef8d90bfe79 100644 --- a/tests/baselines/reference/callHierarchyDecorator.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyDecorator.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyDecorator.ts diff --git a/tests/baselines/reference/callHierarchyExportDefaultClass.callHierarchy.txt b/tests/baselines/reference/callHierarchyExportDefaultClass.callHierarchy.txt index 9b1e7b9604c..910f93da26a 100644 --- a/tests/baselines/reference/callHierarchyExportDefaultClass.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyExportDefaultClass.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: default ├ kind: class ├ file: /tests/cases/fourslash/other.ts diff --git a/tests/baselines/reference/callHierarchyExportDefaultFunction.callHierarchy.txt b/tests/baselines/reference/callHierarchyExportDefaultFunction.callHierarchy.txt index 919b219e6e8..f3a82a187ed 100644 --- a/tests/baselines/reference/callHierarchyExportDefaultFunction.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyExportDefaultFunction.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: default ├ kind: function ├ file: /tests/cases/fourslash/other.ts diff --git a/tests/baselines/reference/callHierarchyExportEqualsFunction.callHierarchy.txt b/tests/baselines/reference/callHierarchyExportEqualsFunction.callHierarchy.txt index 427fc13ab1e..2068e9de5fa 100644 --- a/tests/baselines/reference/callHierarchyExportEqualsFunction.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyExportEqualsFunction.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: /tests/cases/fourslash/other.ts ├ kind: module ├ file: /tests/cases/fourslash/other.ts diff --git a/tests/baselines/reference/callHierarchyFile.callHierarchy.txt b/tests/baselines/reference/callHierarchyFile.callHierarchy.txt index acb10464892..db232fc2612 100644 --- a/tests/baselines/reference/callHierarchyFile.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFile.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyFile.ts diff --git a/tests/baselines/reference/callHierarchyFunction.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunction.callHierarchy.txt index 47573780188..9a2659e679e 100644 --- a/tests/baselines/reference/callHierarchyFunction.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunction.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyFunction.ts diff --git a/tests/baselines/reference/callHierarchyFunctionAmbiguity.1.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunctionAmbiguity.1.callHierarchy.txt index 438218d45bf..647f37c413e 100644 --- a/tests/baselines/reference/callHierarchyFunctionAmbiguity.1.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunctionAmbiguity.1.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: function ├ file: /tests/cases/fourslash/a.d.ts diff --git a/tests/baselines/reference/callHierarchyFunctionAmbiguity.2.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunctionAmbiguity.2.callHierarchy.txt index 438218d45bf..647f37c413e 100644 --- a/tests/baselines/reference/callHierarchyFunctionAmbiguity.2.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunctionAmbiguity.2.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: function ├ file: /tests/cases/fourslash/a.d.ts diff --git a/tests/baselines/reference/callHierarchyFunctionAmbiguity.3.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunctionAmbiguity.3.callHierarchy.txt index 438218d45bf..647f37c413e 100644 --- a/tests/baselines/reference/callHierarchyFunctionAmbiguity.3.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunctionAmbiguity.3.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: function ├ file: /tests/cases/fourslash/a.d.ts diff --git a/tests/baselines/reference/callHierarchyFunctionAmbiguity.4.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunctionAmbiguity.4.callHierarchy.txt index 438218d45bf..647f37c413e 100644 --- a/tests/baselines/reference/callHierarchyFunctionAmbiguity.4.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunctionAmbiguity.4.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: function ├ file: /tests/cases/fourslash/a.d.ts diff --git a/tests/baselines/reference/callHierarchyFunctionAmbiguity.5.callHierarchy.txt b/tests/baselines/reference/callHierarchyFunctionAmbiguity.5.callHierarchy.txt index 7acaa23e044..d693d38933b 100644 --- a/tests/baselines/reference/callHierarchyFunctionAmbiguity.5.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyFunctionAmbiguity.5.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/main.ts diff --git a/tests/baselines/reference/callHierarchyInterfaceMethod.callHierarchy.txt b/tests/baselines/reference/callHierarchyInterfaceMethod.callHierarchy.txt index c0b5e0d1a66..1d1b55b7670 100644 --- a/tests/baselines/reference/callHierarchyInterfaceMethod.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyInterfaceMethod.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: foo ├ kind: method ├ file: /tests/cases/fourslash/callHierarchyInterfaceMethod.ts diff --git a/tests/baselines/reference/callHierarchyJsxElement.callHierarchy.txt b/tests/baselines/reference/callHierarchyJsxElement.callHierarchy.txt index 1ef619697f8..100ff5e812b 100644 --- a/tests/baselines/reference/callHierarchyJsxElement.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyJsxElement.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: Bar ├ kind: function ├ file: /tests/cases/fourslash/main.tsx diff --git a/tests/baselines/reference/callHierarchyTaggedTemplate.callHierarchy.txt b/tests/baselines/reference/callHierarchyTaggedTemplate.callHierarchy.txt index 47ef606473b..66264498196 100644 --- a/tests/baselines/reference/callHierarchyTaggedTemplate.callHierarchy.txt +++ b/tests/baselines/reference/callHierarchyTaggedTemplate.callHierarchy.txt @@ -1,3 +1,4 @@ +// === Call Hierarchy === ╭ name: bar ├ kind: function ├ file: /tests/cases/fourslash/callHierarchyTaggedTemplate.ts diff --git a/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.baseline.jsonc b/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.baseline.jsonc index dc8ebeae50c..634f03e78f7 100644 --- a/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.baseline.jsonc +++ b/tests/baselines/reference/cancellationWhenfindingAllRefsOnDefinition.baseline.jsonc @@ -97,11 +97,6 @@ -// === customWork === -// cancelled findAllReferences - - - // === findAllReferences === // === /tests/cases/fourslash/findAllRefsOnDefinition-import.ts === // --- (line: 3) skipped --- diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline index 80a31656fd0..596a2e7819e 100644 --- a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: true Diagnostics: Cannot write file '/tests/cases/fourslash/b.js' because it would overwrite input file. diff --git a/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline b/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline index 2479767063e..cecf5e4f9d7 100644 --- a/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline +++ b/tests/baselines/reference/completionDetailsOfContextSensitiveParameterNoCrash.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/completionDetailsOfContextSensitiveParameterNoCrash.ts === // type __ = never; // diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index 58065fd8d6a..6ee4743746e 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionEntryForUnionMethod.ts === // var y: Array|Array; // y.map( diff --git a/tests/baselines/reference/completionForStringLiteralImport3.baseline b/tests/baselines/reference/completionForStringLiteralImport3.baseline index 674ef9f361a..88e1d949df4 100644 --- a/tests/baselines/reference/completionForStringLiteralImport3.baseline +++ b/tests/baselines/reference/completionForStringLiteralImport3.baseline @@ -1,3 +1,4 @@ +// === Completions === === /a.ts === // import * as foo from ""; // ^ diff --git a/tests/baselines/reference/completionImportAttributes.baseline b/tests/baselines/reference/completionImportAttributes.baseline index 7594f95cfc8..098f3e1cb5f 100644 --- a/tests/baselines/reference/completionImportAttributes.baseline +++ b/tests/baselines/reference/completionImportAttributes.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/main.ts === // import("./other.json", {}); // ^ diff --git a/tests/baselines/reference/completionImportCallAssertion.baseline b/tests/baselines/reference/completionImportCallAssertion.baseline index 605d0485a08..88cf55ffe28 100644 --- a/tests/baselines/reference/completionImportCallAssertion.baseline +++ b/tests/baselines/reference/completionImportCallAssertion.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/main.ts === // import("./other.json", {}); // ^ diff --git a/tests/baselines/reference/completionNoParentLocation.baseline b/tests/baselines/reference/completionNoParentLocation.baseline index 12248157328..eb52630cfd1 100644 --- a/tests/baselines/reference/completionNoParentLocation.baseline +++ b/tests/baselines/reference/completionNoParentLocation.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionNoParentLocation.ts === // // ^ diff --git a/tests/baselines/reference/completionPropertyFromConstraint.baseline b/tests/baselines/reference/completionPropertyFromConstraint.baseline index 3d360ab3eff..210d913dabe 100644 --- a/tests/baselines/reference/completionPropertyFromConstraint.baseline +++ b/tests/baselines/reference/completionPropertyFromConstraint.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionPropertyFromConstraint.ts === // interface Styles { // alignContent: string | null; diff --git a/tests/baselines/reference/completionsAfterPropertyNameInClass.baseline b/tests/baselines/reference/completionsAfterPropertyNameInClass.baseline index b19974e4161..ae453aa62a8 100644 --- a/tests/baselines/reference/completionsAfterPropertyNameInClass.baseline +++ b/tests/baselines/reference/completionsAfterPropertyNameInClass.baseline @@ -1,3 +1,4 @@ +// === Completions === === /a.js === // class C1 { // async #fo diff --git a/tests/baselines/reference/completionsClassMembers1.baseline b/tests/baselines/reference/completionsClassMembers1.baseline index 0e52f777216..be7070fc3d2 100644 --- a/tests/baselines/reference/completionsClassMembers1.baseline +++ b/tests/baselines/reference/completionsClassMembers1.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsClassMembers1.ts === // interface I { // method(): void; diff --git a/tests/baselines/reference/completionsClassMembers2.baseline b/tests/baselines/reference/completionsClassMembers2.baseline index a6afcfdbdd2..cea76a493cf 100644 --- a/tests/baselines/reference/completionsClassMembers2.baseline +++ b/tests/baselines/reference/completionsClassMembers2.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsClassMembers2.ts === // interface I { // method(): void; diff --git a/tests/baselines/reference/completionsClassMembers3.baseline b/tests/baselines/reference/completionsClassMembers3.baseline index 0c61b0064e5..6775c83a61c 100644 --- a/tests/baselines/reference/completionsClassMembers3.baseline +++ b/tests/baselines/reference/completionsClassMembers3.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsClassMembers3.ts === // interface I { // method(): void; diff --git a/tests/baselines/reference/completionsClassMembers4.baseline b/tests/baselines/reference/completionsClassMembers4.baseline index d21c0b4e78a..c35b5b51b7a 100644 --- a/tests/baselines/reference/completionsClassMembers4.baseline +++ b/tests/baselines/reference/completionsClassMembers4.baseline @@ -1,3 +1,4 @@ +// === Completions === === /foo.ts === // export class Observable { // pipe(): Observable; diff --git a/tests/baselines/reference/completionsClassMembers5.baseline b/tests/baselines/reference/completionsClassMembers5.baseline index 24f83a2e0f2..a6d95efa48e 100644 --- a/tests/baselines/reference/completionsClassMembers5.baseline +++ b/tests/baselines/reference/completionsClassMembers5.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsClassMembers5.ts === // export const SOME_CONSTANT = 'SOME_TEXT'; // export class Base { diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index 9c84a387981..da06aabfe12 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsCommentsClass.ts === // /** This is class c2 without constructor*/ // class c2 { diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index cf4807c1d83..d92adc7d31e 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsCommentsClassMembers.ts === // /** This is comment for c1*/ // class c1 { diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index b7823ca0e0d..0bbbcba9099 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsCommentsCommentParsing.ts === // /// This is simple /// comments // function simple() { diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index e8b72b51f62..b44ec67ee36 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsCommentsFunctionDeclaration.ts === // /** This comment should appear for foo*/ // function foo() { diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index dbafae6e08d..9cbba53160e 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsCommentsFunctionExpression.ts === // /** lambdaFoo var comment*/ // var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; diff --git a/tests/baselines/reference/completionsImportWithKeyword.baseline b/tests/baselines/reference/completionsImportWithKeyword.baseline index 6c516ae03b0..caf9a73c4d1 100644 --- a/tests/baselines/reference/completionsImportWithKeyword.baseline +++ b/tests/baselines/reference/completionsImportWithKeyword.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/a.ts === // const f = { // a: 1 diff --git a/tests/baselines/reference/completionsJSDocTags.baseline b/tests/baselines/reference/completionsJSDocTags.baseline index b2a527a8680..c657cd6862a 100644 --- a/tests/baselines/reference/completionsJSDocTags.baseline +++ b/tests/baselines/reference/completionsJSDocTags.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsJSDocTags.ts === // /** // * This is class Foo. diff --git a/tests/baselines/reference/completionsOverridingMethod15.baseline b/tests/baselines/reference/completionsOverridingMethod15.baseline index 146553bb07d..20411eadc76 100644 --- a/tests/baselines/reference/completionsOverridingMethod15.baseline +++ b/tests/baselines/reference/completionsOverridingMethod15.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsOverridingMethod15.ts === // declare class B { // get foo(): any; diff --git a/tests/baselines/reference/completionsOverridingMethod16.baseline b/tests/baselines/reference/completionsOverridingMethod16.baseline index 38f7eb1b530..78e1245ee9b 100644 --- a/tests/baselines/reference/completionsOverridingMethod16.baseline +++ b/tests/baselines/reference/completionsOverridingMethod16.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsOverridingMethod16.ts === // declare class B { // set foo(value: any); diff --git a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline index 9fa60615f10..421a45d9ee2 100644 --- a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/something.js === // var C = function () { } // /** diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline index 46c07099d00..bffbebf8fd5 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsStringMethods.ts === // var s = "foo". // ^ diff --git a/tests/baselines/reference/completionsUniqueSymbol2.baseline b/tests/baselines/reference/completionsUniqueSymbol2.baseline index d873364a57d..3a2b3b39581 100644 --- a/tests/baselines/reference/completionsUniqueSymbol2.baseline +++ b/tests/baselines/reference/completionsUniqueSymbol2.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/completionsUniqueSymbol2.ts === // const a = { // KEY_1: 'key_1', diff --git a/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline b/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline index 6fe36668283..1ee52023a0e 100644 --- a/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline +++ b/tests/baselines/reference/deprecatedInheritedJSDocOverload.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/deprecatedInheritedJSDocOverload.ts === // interface PartialObserver {} // interface Subscription {} diff --git a/tests/baselines/reference/exhaustiveCaseCompletions9.baseline b/tests/baselines/reference/exhaustiveCaseCompletions9.baseline index 966a650a284..5e97013efd3 100644 --- a/tests/baselines/reference/exhaustiveCaseCompletions9.baseline +++ b/tests/baselines/reference/exhaustiveCaseCompletions9.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/exhaustiveCaseCompletions9.ts === // switch (Math.random() ? 123 : 456) { // case "foo!": diff --git a/tests/baselines/reference/findReferencesAfterEdit.baseline.jsonc b/tests/baselines/reference/findReferencesAfterEdit.baseline.jsonc index 6fd097f7ce0..460d8b215e9 100644 --- a/tests/baselines/reference/findReferencesAfterEdit.baseline.jsonc +++ b/tests/baselines/reference/findReferencesAfterEdit.baseline.jsonc @@ -144,11 +144,6 @@ -// === customWork === -// edits - - - // === findAllReferences === // === /tests/cases/fourslash/a.ts === // interface A { diff --git a/tests/baselines/reference/getEmitOutputDeclarationMultiFiles.baseline b/tests/baselines/reference/getEmitOutputDeclarationMultiFiles.baseline index 9208d6fb4f9..9a39e039974 100644 --- a/tests/baselines/reference/getEmitOutputDeclarationMultiFiles.baseline +++ b/tests/baselines/reference/getEmitOutputDeclarationMultiFiles.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js diff --git a/tests/baselines/reference/getEmitOutputDeclarationSingleFile.baseline b/tests/baselines/reference/getEmitOutputDeclarationSingleFile.baseline index 0e19223306a..241ba6f3a50 100644 --- a/tests/baselines/reference/getEmitOutputDeclarationSingleFile.baseline +++ b/tests/baselines/reference/getEmitOutputDeclarationSingleFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingleFile.js diff --git a/tests/baselines/reference/getEmitOutputExternalModule.baseline b/tests/baselines/reference/getEmitOutputExternalModule.baseline index c577fb56792..9dfdf9a6362 100644 --- a/tests/baselines/reference/getEmitOutputExternalModule.baseline +++ b/tests/baselines/reference/getEmitOutputExternalModule.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingleFile.js diff --git a/tests/baselines/reference/getEmitOutputExternalModule2.baseline b/tests/baselines/reference/getEmitOutputExternalModule2.baseline index dfbe9bf061d..cbd532561ab 100644 --- a/tests/baselines/reference/getEmitOutputExternalModule2.baseline +++ b/tests/baselines/reference/getEmitOutputExternalModule2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingleFile.js diff --git a/tests/baselines/reference/getEmitOutputMapRoots.baseline b/tests/baselines/reference/getEmitOutputMapRoots.baseline index 67a136a3456..c87a6205f62 100644 --- a/tests/baselines/reference/getEmitOutputMapRoots.baseline +++ b/tests/baselines/reference/getEmitOutputMapRoots.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingleFile.js.map diff --git a/tests/baselines/reference/getEmitOutputNoErrors.baseline b/tests/baselines/reference/getEmitOutputNoErrors.baseline index 8dea3c96fe6..a1c99f05899 100644 --- a/tests/baselines/reference/getEmitOutputNoErrors.baseline +++ b/tests/baselines/reference/getEmitOutputNoErrors.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getEmitOutputOnlyOneFile.baseline b/tests/baselines/reference/getEmitOutputOnlyOneFile.baseline index e37174aa232..3a845632cfb 100644 --- a/tests/baselines/reference/getEmitOutputOnlyOneFile.baseline +++ b/tests/baselines/reference/getEmitOutputOnlyOneFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile2.js diff --git a/tests/baselines/reference/getEmitOutputOut.baseline b/tests/baselines/reference/getEmitOutputOut.baseline index 26bb4e1b693..1ef6a24c11e 100644 --- a/tests/baselines/reference/getEmitOutputOut.baseline +++ b/tests/baselines/reference/getEmitOutputOut.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : out.js diff --git a/tests/baselines/reference/getEmitOutputOutFile.baseline b/tests/baselines/reference/getEmitOutputOutFile.baseline index ce3454c4ed4..bb6ab294ec0 100644 --- a/tests/baselines/reference/getEmitOutputOutFile.baseline +++ b/tests/baselines/reference/getEmitOutputOutFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : outFile.js diff --git a/tests/baselines/reference/getEmitOutputSingleFile.baseline b/tests/baselines/reference/getEmitOutputSingleFile.baseline index 929cd9d7a7d..274e040bfbb 100644 --- a/tests/baselines/reference/getEmitOutputSingleFile.baseline +++ b/tests/baselines/reference/getEmitOutputSingleFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : outputDir/singleFile.js diff --git a/tests/baselines/reference/getEmitOutputSingleFile2.baseline b/tests/baselines/reference/getEmitOutputSingleFile2.baseline index 0e19223306a..241ba6f3a50 100644 --- a/tests/baselines/reference/getEmitOutputSingleFile2.baseline +++ b/tests/baselines/reference/getEmitOutputSingleFile2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingleFile.js diff --git a/tests/baselines/reference/getEmitOutputSourceMap.baseline b/tests/baselines/reference/getEmitOutputSourceMap.baseline index 5ef3f843b23..566225e0f17 100644 --- a/tests/baselines/reference/getEmitOutputSourceMap.baseline +++ b/tests/baselines/reference/getEmitOutputSourceMap.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js.map diff --git a/tests/baselines/reference/getEmitOutputSourceMap2.baseline b/tests/baselines/reference/getEmitOutputSourceMap2.baseline index 6a9d6cac3da..c954be858ac 100644 --- a/tests/baselines/reference/getEmitOutputSourceMap2.baseline +++ b/tests/baselines/reference/getEmitOutputSourceMap2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : sample/outDir/inputFile1.js.map diff --git a/tests/baselines/reference/getEmitOutputSourceRoot.baseline b/tests/baselines/reference/getEmitOutputSourceRoot.baseline index a5185984a6f..eb5eef155b5 100644 --- a/tests/baselines/reference/getEmitOutputSourceRoot.baseline +++ b/tests/baselines/reference/getEmitOutputSourceRoot.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js.map diff --git a/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline b/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline index a8013f697ca..f840171abc8 100644 --- a/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline +++ b/tests/baselines/reference/getEmitOutputSourceRootMultiFiles.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js.map diff --git a/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline b/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline index 0e15fe43aca..1639e59986e 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_Preserve.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js.map diff --git a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline index 071d18992ea..5fa94301498 100644 --- a/tests/baselines/reference/getEmitOutputTsxFile_React.baseline +++ b/tests/baselines/reference/getEmitOutputTsxFile_React.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js.map diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile.baseline index 0176f4b628f..0b61cbd061f 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false EmitSkipped: false diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline index cf4465be0be..388b00a4593 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false EmitSkipped: false diff --git a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline index cd1f2739e33..03f6d17ba96 100644 --- a/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline +++ b/tests/baselines/reference/getEmitOutputWithDeclarationFile3.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : declSingle.js diff --git a/tests/baselines/reference/getEmitOutputWithEarlySyntacticErrors.baseline b/tests/baselines/reference/getEmitOutputWithEarlySyntacticErrors.baseline index b011e5885e3..70fb5755627 100644 --- a/tests/baselines/reference/getEmitOutputWithEarlySyntacticErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithEarlySyntacticErrors.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline index f992ec803b7..2328e3b7e1a 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline index a0ee0e676ea..fe6614c1639 100644 --- a/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithEmitterErrors2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrors.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrors.baseline index 7ada814a55e..93fdc50af7e 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrors.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline index 739ef233191..a9e562a138a 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrors2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles.baseline index 2fb3cdd9210..0161f687cfc 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js diff --git a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline index 0d5ab3f6747..d151c68daed 100644 --- a/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSemanticErrorsForMultipleFiles2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : out.js diff --git a/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles.baseline b/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles.baseline index 1ec89e66d5a..061ded577c2 100644 --- a/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles.baseline +++ b/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile1.js diff --git a/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles2.baseline b/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles2.baseline index f429d4e1295..9ba713b1fdf 100644 --- a/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles2.baseline +++ b/tests/baselines/reference/getEmitOutputWithSyntacticErrorsForMultipleFiles2.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : out.js diff --git a/tests/baselines/reference/getEmitOutputWithSyntaxErrors.baseline b/tests/baselines/reference/getEmitOutputWithSyntaxErrors.baseline index f84b9e810c9..eec8ef779d8 100644 --- a/tests/baselines/reference/getEmitOutputWithSyntaxErrors.baseline +++ b/tests/baselines/reference/getEmitOutputWithSyntaxErrors.baseline @@ -1,3 +1,4 @@ +// === EmitOutput === EmitSkipped: false FileName : /tests/cases/fourslash/inputFile.js diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline index 934bc31c831..96bf375c5bb 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics01.baseline @@ -1,3 +1,4 @@ +// === Syntax and Semantic Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics01.ts': /tests/cases/fourslash/server/a.js(1,5): error TS1134: Variable declaration expected. /tests/cases/fourslash/server/a.js(1,8): error TS1109: Expression expected. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline index 6cf2f8c401f..11c339ae633 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics02.baseline @@ -1,3 +1,4 @@ +// === Syntax and Semantic Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts': /tests/cases/fourslash/server/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files. /tests/cases/fourslash/server/b.js(3,17): error TS8010: Type annotations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline index 780c5a15082..9081913b130 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics1.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts': /tests/cases/fourslash/a.js(1,1): error TS8002: 'import ... =' can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline index ca184aa5aad..15656d8827c 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics10.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts': /tests/cases/fourslash/a.js(1,12): error TS8004: Type parameter declarations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline index c23fbe8672f..b36ee67f51b 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics11.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts': /tests/cases/fourslash/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline index 73ca590b32a..edb02e002fa 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics12.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts': /tests/cases/fourslash/a.js(1,1): error TS8009: The 'declare' modifier can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline index a2dcecb6a40..2b783648360 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics13.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts': /tests/cases/fourslash/a.js(1,8): error TS8010: Type annotations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline index ef2ddacd1b4..448946bd354 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics14.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts': /tests/cases/fourslash/a.js(1,13): error TS1109: Expression expected. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline index f30956f93c4..c1d353f34d7 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics15.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts': /tests/cases/fourslash/a.js(1,12): error TS8012: Parameter modifiers can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline index c72e41a2d04..1f981f155fa 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics16.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts': /tests/cases/fourslash/a.js(1,13): error TS8009: The '?' modifier can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline index 199c3cbfd80..ab38aab2ae4 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics17.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts': /tests/cases/fourslash/a.js(1,15): error TS8010: Type annotations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline index c493a7f97c8..8a87a35f510 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics18.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts': /tests/cases/fourslash/a.js(4,5): error TS8009: The 'public' modifier can only be used in TypeScript files. /tests/cases/fourslash/b.js(2,8): error TS8010: Type annotations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline index 28d89307f19..a9140894126 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics19.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts': /tests/cases/fourslash/a.js(1,6): error TS8006: 'enum' declarations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline index f786f88c988..30a83b4abcd 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics2.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts': /tests/cases/fourslash/a.js(1,1): error TS8003: 'export =' can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline index de3624928b0..df86e69efad 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics3.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts': /tests/cases/fourslash/a.js(1,9): error TS8004: Type parameter declarations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline index 59e80b81dd2..fd665a0c293 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics4.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts': /tests/cases/fourslash/a.js(1,1): error TS8009: The 'public' modifier can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline index 06f705ebe79..592f178ae04 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics5.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts': /tests/cases/fourslash/a.js(1,9): error TS8005: 'implements' clauses can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline index 61985450110..b9efdb08364 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics6.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts': /tests/cases/fourslash/a.js(1,11): error TS8006: 'interface' declarations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline index 86420e6a056..2118fe9ddbb 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics7.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts': /tests/cases/fourslash/a.js(1,8): error TS8006: 'module' declarations can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline index 27ea265b073..7976cf8dc66 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics8.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts': /tests/cases/fourslash/a.js(1,6): error TS8008: Type aliases can only be used in TypeScript files. diff --git a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline index 64193706ccc..d821cd787a0 100644 --- a/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline +++ b/tests/baselines/reference/getJavaScriptSyntacticDiagnostics9.baseline @@ -1,3 +1,4 @@ +// === Syntax Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts': /tests/cases/fourslash/a.js(1,1): error TS8009: The 'public' modifier can only be used in TypeScript files. diff --git a/tests/baselines/reference/getOccurrencesAfterEdit.baseline.jsonc b/tests/baselines/reference/getOccurrencesAfterEdit.baseline.jsonc index 54a5cc22412..8cefe285822 100644 --- a/tests/baselines/reference/getOccurrencesAfterEdit.baseline.jsonc +++ b/tests/baselines/reference/getOccurrencesAfterEdit.baseline.jsonc @@ -10,11 +10,6 @@ -// === customWork === -// Added new line - - - // === documentHighlights === // === /tests/cases/fourslash/getOccurrencesAfterEdit.ts === // diff --git a/tests/baselines/reference/importStatementCompletions3.baseline b/tests/baselines/reference/importStatementCompletions3.baseline index 34cb78c2585..7ec48dfcf97 100644 --- a/tests/baselines/reference/importStatementCompletions3.baseline +++ b/tests/baselines/reference/importStatementCompletions3.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/./bar.ts === // import f // ^ diff --git a/tests/baselines/reference/inlayHintsCrash1.baseline b/tests/baselines/reference/inlayHintsCrash1.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsCrash1.baseline +++ b/tests/baselines/reference/inlayHintsCrash1.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsEnumMemberValue.baseline b/tests/baselines/reference/inlayHintsEnumMemberValue.baseline index 276bc9406f1..3d8faad243d 100644 --- a/tests/baselines/reference/inlayHintsEnumMemberValue.baseline +++ b/tests/baselines/reference/inlayHintsEnumMemberValue.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === A, ^ { diff --git a/tests/baselines/reference/inlayHintsFunctionParameterTypes1.baseline b/tests/baselines/reference/inlayHintsFunctionParameterTypes1.baseline index af66775ae95..826eda94b7d 100644 --- a/tests/baselines/reference/inlayHintsFunctionParameterTypes1.baseline +++ b/tests/baselines/reference/inlayHintsFunctionParameterTypes1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const f1: F1 = (a, b) => { } ^ { diff --git a/tests/baselines/reference/inlayHintsFunctionParameterTypes2.baseline b/tests/baselines/reference/inlayHintsFunctionParameterTypes2.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsFunctionParameterTypes2.baseline +++ b/tests/baselines/reference/inlayHintsFunctionParameterTypes2.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsFunctionParameterTypes3.baseline b/tests/baselines/reference/inlayHintsFunctionParameterTypes3.baseline index 33923495c7b..e1398ee7447 100644 --- a/tests/baselines/reference/inlayHintsFunctionParameterTypes3.baseline +++ b/tests/baselines/reference/inlayHintsFunctionParameterTypes3.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === bar: function (x?): void { ^ { diff --git a/tests/baselines/reference/inlayHintsFunctionParameterTypes4.baseline b/tests/baselines/reference/inlayHintsFunctionParameterTypes4.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsFunctionParameterTypes4.baseline +++ b/tests/baselines/reference/inlayHintsFunctionParameterTypes4.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsImportType1.baseline b/tests/baselines/reference/inlayHintsImportType1.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsImportType1.baseline +++ b/tests/baselines/reference/inlayHintsImportType1.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsImportType2.baseline b/tests/baselines/reference/inlayHintsImportType2.baseline index 3d4f8098c30..31cbfee9728 100644 --- a/tests/baselines/reference/inlayHintsImportType2.baseline +++ b/tests/baselines/reference/inlayHintsImportType2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function bar () { return require('./a').a; } ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveAnyParameter1.baseline b/tests/baselines/reference/inlayHintsInteractiveAnyParameter1.baseline index 82f85a385b9..83129828724 100644 --- a/tests/baselines/reference/inlayHintsInteractiveAnyParameter1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveAnyParameter1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo(1); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveAnyParameter2.baseline b/tests/baselines/reference/inlayHintsInteractiveAnyParameter2.baseline index 9709ddac5c2..da90a70f3f6 100644 --- a/tests/baselines/reference/inlayHintsInteractiveAnyParameter2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveAnyParameter2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo(1); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes1.baseline b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes1.baseline index 6f97856e805..f3060b08a61 100644 --- a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const f1: F1 = (a, b) => { } ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes2.baseline b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes2.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes2.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes3.baseline b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes3.baseline index f1f6e03387b..b743a60ef69 100644 --- a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes3.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes3.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === bar: function (x?): void { ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes4.baseline b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes4.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes4.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes4.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes5.baseline b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes5.baseline index c4df79dc90d..64fcd1e25f1 100644 --- a/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes5.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveFunctionParameterTypes5.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === export function fn(b = foo) {} ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveImportType1.baseline b/tests/baselines/reference/inlayHintsInteractiveImportType1.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsInteractiveImportType1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveImportType1.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsInteractiveImportType2.baseline b/tests/baselines/reference/inlayHintsInteractiveImportType2.baseline index 787ee663b83..97bc815a9b9 100644 --- a/tests/baselines/reference/inlayHintsInteractiveImportType2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveImportType2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function bar () { return require('./a').a; } ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveJsDocParameterNames.baseline b/tests/baselines/reference/inlayHintsInteractiveJsDocParameterNames.baseline index af633a5b975..77aae93700e 100644 --- a/tests/baselines/reference/inlayHintsInteractiveJsDocParameterNames.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveJsDocParameterNames.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === y.foo(1, 2) ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveMultifile1.baseline b/tests/baselines/reference/inlayHintsInteractiveMultifile1.baseline index 11f79a69320..df760582ca2 100644 --- a/tests/baselines/reference/inlayHintsInteractiveMultifile1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveMultifile1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === async function foo () { ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveMultifileFunctionCalls.baseline b/tests/baselines/reference/inlayHintsInteractiveMultifileFunctionCalls.baseline index 47ac8e6d4ad..f5baa970cd3 100644 --- a/tests/baselines/reference/inlayHintsInteractiveMultifileFunctionCalls.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveMultifileFunctionCalls.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === helperB("hello, world!"); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveOverloadCall.baseline b/tests/baselines/reference/inlayHintsInteractiveOverloadCall.baseline index 10df249d878..b17e715e142 100644 --- a/tests/baselines/reference/inlayHintsInteractiveOverloadCall.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveOverloadCall.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === call(1); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveParameterNames.baseline b/tests/baselines/reference/inlayHintsInteractiveParameterNames.baseline index b6ab7a563a2..e67854cd0f0 100644 --- a/tests/baselines/reference/inlayHintsInteractiveParameterNames.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveParameterNames.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1, 2); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan1.baseline b/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan1.baseline index 966225e43a3..3e575d07dc1 100644 --- a/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function c2 () { foo2(1, 2); } ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan2.baseline b/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan2.baseline index acc0b6dbdba..829a2c2e9aa 100644 --- a/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveParameterNamesInSpan2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo2(1, 2); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveParameterNamesWithComments.baseline b/tests/baselines/reference/inlayHintsInteractiveParameterNamesWithComments.baseline index 9ca391a20c7..b9db834b7f8 100644 --- a/tests/baselines/reference/inlayHintsInteractiveParameterNamesWithComments.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveParameterNamesWithComments.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === fn(/* nobody knows exactly what this param is */ 42); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveRestParameters1.baseline b/tests/baselines/reference/inlayHintsInteractiveRestParameters1.baseline index 6241709b7f3..d02222ea5f3 100644 --- a/tests/baselines/reference/inlayHintsInteractiveRestParameters1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveRestParameters1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1, 1, 1, 1); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveRestParameters2.baseline b/tests/baselines/reference/inlayHintsInteractiveRestParameters2.baseline index 8d5e91db2fd..b7d6518b759 100644 --- a/tests/baselines/reference/inlayHintsInteractiveRestParameters2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveRestParameters2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo(...x, 3); ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveReturnType.baseline b/tests/baselines/reference/inlayHintsInteractiveReturnType.baseline index bf401880c3d..62d9fe4979f 100644 --- a/tests/baselines/reference/inlayHintsInteractiveReturnType.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveReturnType.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function foo1 () { ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveVariableTypes1.baseline b/tests/baselines/reference/inlayHintsInteractiveVariableTypes1.baseline index 18fe7f7b62d..1544f14cc7a 100644 --- a/tests/baselines/reference/inlayHintsInteractiveVariableTypes1.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveVariableTypes1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const m = () => 123; ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveVariableTypes2.baseline b/tests/baselines/reference/inlayHintsInteractiveVariableTypes2.baseline index bc18a904cd2..a4923e8db2e 100644 --- a/tests/baselines/reference/inlayHintsInteractiveVariableTypes2.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveVariableTypes2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const array = [1, 2] ^ { diff --git a/tests/baselines/reference/inlayHintsInteractiveWithClosures.baseline b/tests/baselines/reference/inlayHintsInteractiveWithClosures.baseline index 105dc629106..73b11708e1b 100644 --- a/tests/baselines/reference/inlayHintsInteractiveWithClosures.baseline +++ b/tests/baselines/reference/inlayHintsInteractiveWithClosures.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1)(2); ^ { diff --git a/tests/baselines/reference/inlayHintsJsDocParameterNames.baseline b/tests/baselines/reference/inlayHintsJsDocParameterNames.baseline index d53b81a3519..1330bfee62a 100644 --- a/tests/baselines/reference/inlayHintsJsDocParameterNames.baseline +++ b/tests/baselines/reference/inlayHintsJsDocParameterNames.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === y.foo(1, 2) ^ { diff --git a/tests/baselines/reference/inlayHintsMultifile1.baseline b/tests/baselines/reference/inlayHintsMultifile1.baseline index d6a0b7c62e3..65f9122bbb7 100644 --- a/tests/baselines/reference/inlayHintsMultifile1.baseline +++ b/tests/baselines/reference/inlayHintsMultifile1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === async function foo () { ^ { diff --git a/tests/baselines/reference/inlayHintsNoHintWhenArgumentMatchesName.baseline b/tests/baselines/reference/inlayHintsNoHintWhenArgumentMatchesName.baseline index 0370f29f5f9..3e3ab26f16b 100644 --- a/tests/baselines/reference/inlayHintsNoHintWhenArgumentMatchesName.baseline +++ b/tests/baselines/reference/inlayHintsNoHintWhenArgumentMatchesName.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo(a, 2); ^ { diff --git a/tests/baselines/reference/inlayHintsNoParameterHints.baseline b/tests/baselines/reference/inlayHintsNoParameterHints.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsNoParameterHints.baseline +++ b/tests/baselines/reference/inlayHintsNoParameterHints.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsNoVariableTypeHints.baseline b/tests/baselines/reference/inlayHintsNoVariableTypeHints.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsNoVariableTypeHints.baseline +++ b/tests/baselines/reference/inlayHintsNoVariableTypeHints.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsOverloadCall.baseline b/tests/baselines/reference/inlayHintsOverloadCall.baseline index 8c9f5baed42..b7f45a405fc 100644 --- a/tests/baselines/reference/inlayHintsOverloadCall.baseline +++ b/tests/baselines/reference/inlayHintsOverloadCall.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === call(1); ^ { diff --git a/tests/baselines/reference/inlayHintsParameterNames.baseline b/tests/baselines/reference/inlayHintsParameterNames.baseline index b2c2c8aee18..cce97fe2afb 100644 --- a/tests/baselines/reference/inlayHintsParameterNames.baseline +++ b/tests/baselines/reference/inlayHintsParameterNames.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1, 2); ^ { diff --git a/tests/baselines/reference/inlayHintsParameterNamesInSpan1.baseline b/tests/baselines/reference/inlayHintsParameterNamesInSpan1.baseline index 888d50fcb5f..76f65a424f4 100644 --- a/tests/baselines/reference/inlayHintsParameterNamesInSpan1.baseline +++ b/tests/baselines/reference/inlayHintsParameterNamesInSpan1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function c2 () { foo2(1, 2); } ^ { diff --git a/tests/baselines/reference/inlayHintsParameterNamesInSpan2.baseline b/tests/baselines/reference/inlayHintsParameterNamesInSpan2.baseline index f0484d4044d..93352d5c059 100644 --- a/tests/baselines/reference/inlayHintsParameterNamesInSpan2.baseline +++ b/tests/baselines/reference/inlayHintsParameterNamesInSpan2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo2(1, 2); ^ { diff --git a/tests/baselines/reference/inlayHintsPropertyDeclarations.baseline b/tests/baselines/reference/inlayHintsPropertyDeclarations.baseline index cdbf7df70b8..c3392e6f7c5 100644 --- a/tests/baselines/reference/inlayHintsPropertyDeclarations.baseline +++ b/tests/baselines/reference/inlayHintsPropertyDeclarations.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === a = 1 ^ { diff --git a/tests/baselines/reference/inlayHintsQuotePreference1.baseline b/tests/baselines/reference/inlayHintsQuotePreference1.baseline index a3bb747939b..8f70348c8da 100644 --- a/tests/baselines/reference/inlayHintsQuotePreference1.baseline +++ b/tests/baselines/reference/inlayHintsQuotePreference1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === export function fn(a = a1, b = b1) {} ^ { diff --git a/tests/baselines/reference/inlayHintsQuotePreference2.baseline b/tests/baselines/reference/inlayHintsQuotePreference2.baseline index 0084f769ce8..29753105561 100644 --- a/tests/baselines/reference/inlayHintsQuotePreference2.baseline +++ b/tests/baselines/reference/inlayHintsQuotePreference2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === export function fn(a = a1, b = b1) {} ^ { diff --git a/tests/baselines/reference/inlayHintsRestParameters1.baseline b/tests/baselines/reference/inlayHintsRestParameters1.baseline index ee07967f75d..400a73a4ed7 100644 --- a/tests/baselines/reference/inlayHintsRestParameters1.baseline +++ b/tests/baselines/reference/inlayHintsRestParameters1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1, 1, 1, 1); ^ { diff --git a/tests/baselines/reference/inlayHintsRestParameters2.baseline b/tests/baselines/reference/inlayHintsRestParameters2.baseline index 79c2a63f63c..ca3298fc414 100644 --- a/tests/baselines/reference/inlayHintsRestParameters2.baseline +++ b/tests/baselines/reference/inlayHintsRestParameters2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo(...x, 3); ^ { diff --git a/tests/baselines/reference/inlayHintsReturnType.baseline b/tests/baselines/reference/inlayHintsReturnType.baseline index 1a17fa50721..1a683a63e8b 100644 --- a/tests/baselines/reference/inlayHintsReturnType.baseline +++ b/tests/baselines/reference/inlayHintsReturnType.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === function foo1 () { ^ { diff --git a/tests/baselines/reference/inlayHintsTypeMatchesName.baseline b/tests/baselines/reference/inlayHintsTypeMatchesName.baseline index 6136dbb8025..1d8aa81fc42 100644 --- a/tests/baselines/reference/inlayHintsTypeMatchesName.baseline +++ b/tests/baselines/reference/inlayHintsTypeMatchesName.baseline @@ -1 +1,2 @@ +// === Inlay Hints === === No inlay hints === \ No newline at end of file diff --git a/tests/baselines/reference/inlayHintsVariableTypes1.baseline b/tests/baselines/reference/inlayHintsVariableTypes1.baseline index 6cea19f330c..642373f89a9 100644 --- a/tests/baselines/reference/inlayHintsVariableTypes1.baseline +++ b/tests/baselines/reference/inlayHintsVariableTypes1.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const m = () => 123; ^ { diff --git a/tests/baselines/reference/inlayHintsVariableTypes2.baseline b/tests/baselines/reference/inlayHintsVariableTypes2.baseline index ff04dbe0e59..863c60d6c58 100644 --- a/tests/baselines/reference/inlayHintsVariableTypes2.baseline +++ b/tests/baselines/reference/inlayHintsVariableTypes2.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === const array = [1, 2] ^ { diff --git a/tests/baselines/reference/inlayHintsWithClosures.baseline b/tests/baselines/reference/inlayHintsWithClosures.baseline index 4b2eade0844..c7bb22e70e6 100644 --- a/tests/baselines/reference/inlayHintsWithClosures.baseline +++ b/tests/baselines/reference/inlayHintsWithClosures.baseline @@ -1,3 +1,4 @@ +// === Inlay Hints === foo1(1)(2); ^ { diff --git a/tests/baselines/reference/jsDocAliasQuickInfo.baseline b/tests/baselines/reference/jsDocAliasQuickInfo.baseline index 6cefb8e5eee..61f5a015fbe 100644 --- a/tests/baselines/reference/jsDocAliasQuickInfo.baseline +++ b/tests/baselines/reference/jsDocAliasQuickInfo.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /jsDocAliasQuickInfo.ts === // /** // * Comment diff --git a/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline b/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline index 5f2b3405c4b..9f91774fb21 100644 --- a/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline +++ b/tests/baselines/reference/jsDocDontBreakWithNamespaces.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/jsDocDontBreakWithNamespaces.js === // /** // * @returns {module:@nodefuel/web~Webserver~wsServer#hello} Websocket server object diff --git a/tests/baselines/reference/jsDocFunctionSignatures5.baseline b/tests/baselines/reference/jsDocFunctionSignatures5.baseline index 003c9614018..0adafac9959 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures5.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures5.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/Foo.js === // /** // * Filters a path based on a regexp or glob pattern. diff --git a/tests/baselines/reference/jsDocFunctionSignatures6.baseline b/tests/baselines/reference/jsDocFunctionSignatures6.baseline index 643979b9f02..ca8e7fbd539 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures6.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures6.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/Foo.js === // /** // * @param {string} p1 - A string param diff --git a/tests/baselines/reference/jsDocSignature-43394.baseline b/tests/baselines/reference/jsDocSignature-43394.baseline index 1dccabe0b2c..8a48d948928 100644 --- a/tests/baselines/reference/jsDocSignature-43394.baseline +++ b/tests/baselines/reference/jsDocSignature-43394.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/jsDocSignature-43394.ts === // /** // * @typedef {Object} Foo diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline index 816b0a69d14..eaa535157e1 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsDocTypeTag1.js === // /** @type {String} */ // var S; diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline index 2c1244f0f50..eef0206fc22 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsDocTypeTag2.js === // /** @type {string} */ // var s; diff --git a/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline b/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline index b2a5af5fbcf..beac39f4ca7 100644 --- a/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline +++ b/tests/baselines/reference/jsDocTypedefQuickInfo1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsDocTypedef1.js === // /** // * @typedef {Object} Opts diff --git a/tests/baselines/reference/jsFileJsdocTypedefTagTypeExpressionCompletion4.baseline b/tests/baselines/reference/jsFileJsdocTypedefTagTypeExpressionCompletion4.baseline index 31b55c76e24..46d12c0df98 100644 --- a/tests/baselines/reference/jsFileJsdocTypedefTagTypeExpressionCompletion4.baseline +++ b/tests/baselines/reference/jsFileJsdocTypedefTagTypeExpressionCompletion4.baseline @@ -1,3 +1,4 @@ +// === Completions === === /a.js === // const foo = { // bar: { diff --git a/tests/baselines/reference/jsdocLink1.baseline b/tests/baselines/reference/jsdocLink1.baseline index d97a97d7a19..bdb568f2030 100644 --- a/tests/baselines/reference/jsdocLink1.baseline +++ b/tests/baselines/reference/jsdocLink1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsdocLink1.ts === // class C { // } diff --git a/tests/baselines/reference/jsdocLink2.baseline b/tests/baselines/reference/jsdocLink2.baseline index 80887fc8182..43b06e17f89 100644 --- a/tests/baselines/reference/jsdocLink2.baseline +++ b/tests/baselines/reference/jsdocLink2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/script.ts === // /** // * {@link C} diff --git a/tests/baselines/reference/jsdocLink3.baseline b/tests/baselines/reference/jsdocLink3.baseline index f8304c54287..c3f94329761 100644 --- a/tests/baselines/reference/jsdocLink3.baseline +++ b/tests/baselines/reference/jsdocLink3.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /module1.ts === // import { C } from './jsdocLink3' // /** diff --git a/tests/baselines/reference/jsdocLink4.baseline b/tests/baselines/reference/jsdocLink4.baseline index 966cbb71f37..632fb6d7cdc 100644 --- a/tests/baselines/reference/jsdocLink4.baseline +++ b/tests/baselines/reference/jsdocLink4.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsdocLink4.ts === // declare class I { // /** {@link I} */ diff --git a/tests/baselines/reference/jsdocLink5.baseline b/tests/baselines/reference/jsdocLink5.baseline index 6140e7db4f7..b89b8fe3b95 100644 --- a/tests/baselines/reference/jsdocLink5.baseline +++ b/tests/baselines/reference/jsdocLink5.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/jsdocLink5.ts === // function g() { } // /** diff --git a/tests/baselines/reference/jsdocOnInheritedMembers1.baseline b/tests/baselines/reference/jsdocOnInheritedMembers1.baseline index 920aab2d2a4..ad5f09b18a1 100644 --- a/tests/baselines/reference/jsdocOnInheritedMembers1.baseline +++ b/tests/baselines/reference/jsdocOnInheritedMembers1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.js === // /** @template T */ // class A { diff --git a/tests/baselines/reference/jsdocOnInheritedMembers2.baseline b/tests/baselines/reference/jsdocOnInheritedMembers2.baseline index a46cad1a89b..b80ffc8fc2f 100644 --- a/tests/baselines/reference/jsdocOnInheritedMembers2.baseline +++ b/tests/baselines/reference/jsdocOnInheritedMembers2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.js === // /** @template T */ // class A { diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline index d391120bfe8..970b5ae2584 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion1.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/b.js === // /** // * @p diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline index bae9309cb2b..0e8cc9b8cee 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion2.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/b.js === // /** // * diff --git a/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline b/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline index 676ec666e05..31809167ab0 100644 --- a/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline +++ b/tests/baselines/reference/jsdocParameterTagSnippetCompletion3.baseline @@ -1,3 +1,4 @@ +// === Completions === === /tests/cases/fourslash/a.js === // /** // * @p diff --git a/tests/baselines/reference/jsdocReturnsTag.baseline b/tests/baselines/reference/jsdocReturnsTag.baseline index 4bfc851f6c5..03ab3e04bfb 100644 --- a/tests/baselines/reference/jsdocReturnsTag.baseline +++ b/tests/baselines/reference/jsdocReturnsTag.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/dummy.js === // /** // * Find an item diff --git a/tests/baselines/reference/linkedEditingJsxTag10.linkedEditing.txt b/tests/baselines/reference/linkedEditingJsxTag10.linkedEditing.txt index d8322f53ea4..6ecbcb2cbc3 100644 --- a/tests/baselines/reference/linkedEditingJsxTag10.linkedEditing.txt +++ b/tests/baselines/reference/linkedEditingJsxTag10.linkedEditing.txt @@ -1,3 +1,4 @@ +// === Linked Editing === === /jsx0.tsx === const jsx = <> diff --git a/tests/baselines/reference/linkedEditingJsxTag11.linkedEditing.txt b/tests/baselines/reference/linkedEditingJsxTag11.linkedEditing.txt index c6000d3eb54..f4b7c8169f0 100644 --- a/tests/baselines/reference/linkedEditingJsxTag11.linkedEditing.txt +++ b/tests/baselines/reference/linkedEditingJsxTag11.linkedEditing.txt @@ -1,3 +1,4 @@ +// === Linked Editing === === /customElements.tsx === const jsx = <[|/*0*/fbt:enum|] knownProp="accepted" unknownProp="rejected"> diff --git a/tests/baselines/reference/moduleNodeNextImportFix.baseline b/tests/baselines/reference/moduleNodeNextImportFix.baseline index 09260962708..6bffcba0921 100644 --- a/tests/baselines/reference/moduleNodeNextImportFix.baseline +++ b/tests/baselines/reference/moduleNodeNextImportFix.baseline @@ -1,3 +1,4 @@ +// === Syntax and Semantic Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/moduleNodeNextImportFix.ts': diff --git a/tests/baselines/reference/nameOrDottedSpan_classes.baseline b/tests/baselines/reference/nameOrDottedSpan_classes.baseline index 88383c638a8..17174b8b8ec 100644 --- a/tests/baselines/reference/nameOrDottedSpan_classes.baseline +++ b/tests/baselines/reference/nameOrDottedSpan_classes.baseline @@ -1,3 +1,4 @@ +// === NameOrDottedNameSpans === 1 >module Foo.Bar { diff --git a/tests/baselines/reference/nameOrDottedSpan_stmts.baseline b/tests/baselines/reference/nameOrDottedSpan_stmts.baseline index d0d35199e81..df2a33598bd 100644 --- a/tests/baselines/reference/nameOrDottedSpan_stmts.baseline +++ b/tests/baselines/reference/nameOrDottedSpan_stmts.baseline @@ -1,3 +1,4 @@ +// === NameOrDottedNameSpans === 1 >function f() { diff --git a/tests/baselines/reference/nodeNextPathCompletions.baseline b/tests/baselines/reference/nodeNextPathCompletions.baseline index c6bfcf57017..493195286c2 100644 --- a/tests/baselines/reference/nodeNextPathCompletions.baseline +++ b/tests/baselines/reference/nodeNextPathCompletions.baseline @@ -1,3 +1,4 @@ +// === Completions === === /src/foo.ts === // import { fooFromIndex } from ""; // ^ diff --git a/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline b/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline index 70fe83fefe5..b7debbb67a4 100644 --- a/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline +++ b/tests/baselines/reference/nonJsDeclarationFilePathCompletions.baseline @@ -1,3 +1,4 @@ +// === Completions === === /project/usage.ts === // import { HtmlModuleThing } from "./"; // ^ diff --git a/tests/baselines/reference/quickInfoAlias.baseline b/tests/baselines/reference/quickInfoAlias.baseline index 3da8bf54377..88c4a40dc4b 100644 --- a/tests/baselines/reference/quickInfoAlias.baseline +++ b/tests/baselines/reference/quickInfoAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /c.ts === // /** // * Doc 2 diff --git a/tests/baselines/reference/quickInfoAtPropWithAmbientDeclarationInJs.baseline b/tests/baselines/reference/quickInfoAtPropWithAmbientDeclarationInJs.baseline index f54fc1c08a7..cdcb396da4c 100644 --- a/tests/baselines/reference/quickInfoAtPropWithAmbientDeclarationInJs.baseline +++ b/tests/baselines/reference/quickInfoAtPropWithAmbientDeclarationInJs.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.js === // class C { // constructor() { diff --git a/tests/baselines/reference/quickInfoCircularInstantiationExpression.baseline b/tests/baselines/reference/quickInfoCircularInstantiationExpression.baseline index d4d4c097b99..2c190b11c43 100644 --- a/tests/baselines/reference/quickInfoCircularInstantiationExpression.baseline +++ b/tests/baselines/reference/quickInfoCircularInstantiationExpression.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCircularInstantiationExpression.ts === // declare function foo(t: T): typeof foo; // foo(""); diff --git a/tests/baselines/reference/quickInfoCommentsClass.baseline b/tests/baselines/reference/quickInfoCommentsClass.baseline index 2320404ca1c..70477175c0c 100644 --- a/tests/baselines/reference/quickInfoCommentsClass.baseline +++ b/tests/baselines/reference/quickInfoCommentsClass.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCommentsClass.ts === // /** This is class c2 without constructor*/ // class c2 { diff --git a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline index 795b95e7da9..8492ed1944a 100644 --- a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline +++ b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCommentsClassMembers.ts === // /** This is comment for c1*/ // class c1 { diff --git a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline index 07a3aa1dd22..46db8bc10c5 100644 --- a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline +++ b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCommentsCommentParsing.ts === // /// This is simple /// comments // function simple() { diff --git a/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline b/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline index 76dc6b63ae6..ed94be75fe0 100644 --- a/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/quickInfoCommentsFunctionDeclaration.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCommentsFunctionDeclaration.ts === // /** This comment should appear for foo*/ // function foo() { diff --git a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline index e09a0952705..ef4ff78194c 100644 --- a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts === // /** lambdaFoo var comment*/ // var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; diff --git a/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline b/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline index 8f9bd7e6386..1a59669f5bb 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsArrowFunctionExpression.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsArrowFunctionExpression.ts === // var x = a => 10; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsClass.baseline b/tests/baselines/reference/quickInfoDisplayPartsClass.baseline index f0755ac5155..4a23d7e88a3 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClass.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClass.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClass.ts === // class c { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline index c3592ada13d..fa10abdf8f9 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassAccessors.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassAccessors.ts === // class c { // public get publicProperty() { return ""; } diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline index 28b3f045c88..8a7779717b0 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassAutoAccessors.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassAutoAccessors.ts === // class c { // public accessor publicProperty: string; diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline index 2aab66121b7..81a44f6b6d7 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassConstructor.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassConstructor.ts === // class c { // constructor() { diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline index a098ab06f9e..344dda6046b 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultAnonymous.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassDefaultAnonymous.ts === // export default class { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline index 646bda5fd00..6b365359fb4 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassDefaultNamed.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassDefaultNamed.ts === // export default class C { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline index 7802faff0c1..38095e74e89 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassIncomplete.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassIncomplete.ts === // class { // ^^^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline index 3e739c8b4de..59333da1aef 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassMethod.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassMethod.ts === // class c { // public publicMethod() { } diff --git a/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline b/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline index 8a5adb6ad08..7dbcdbc6cec 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsClassProperty.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsClassProperty.ts === // class c { // public publicProperty: string; diff --git a/tests/baselines/reference/quickInfoDisplayPartsConst.baseline b/tests/baselines/reference/quickInfoDisplayPartsConst.baseline index 513cc0d2c9e..ab682f5974d 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsConst.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsConst.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsConst.ts === // const a = 10; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline index 6e7eacfee59..76df896caa4 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsEnum1.ts === // enum E { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline index a3082f890d8..74cea351771 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsEnum2.ts === // enum E { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline index 4d70350891d..81f3d2db914 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum3.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsEnum3.ts === // enum E { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline b/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline index 1b9fe48619d..f48e166e4cb 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsEnum4.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsEnum4.ts === // const enum Foo { // "\t" = 9, diff --git a/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline index bf0173b6f21..7745fa24426 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsExternalModuleAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsExternalModuleAlias_file1.ts === // import a1 = require("./quickInfoDisplayPartsExternalModuleAlias_file0"); // ^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline b/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline index 0ce40cd0f59..06e804b0d93 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsExternalModules.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsExternalModules.ts === // export namespace m { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline index e97900efd67..f821703daf7 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunction.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsFunction.ts === // function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) { // ^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline index 31c2eb23ece..10601e1d5d3 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunctionExpression.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsFunctionExpression.ts === // var x = function foo() { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline b/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline index ade64c39cc5..d5cc54296c7 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsFunctionIncomplete.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsFunctionIncomplete.ts === // function (param: string) { // ^^^^^^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline b/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline index 689938309e5..2619bd0fe81 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInterface.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsInterface.ts === // interface i { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline b/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline index df3eafe5705..21441e8e5dd 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInterfaceMembers.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsInterfaceMembers.ts === // interface I { // property: string; diff --git a/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline index 715e8055de2..0b2754eff81 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsInternalModuleAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsInternalModuleAlias.ts === // module m.m1 { // export class c { diff --git a/tests/baselines/reference/quickInfoDisplayPartsLet.baseline b/tests/baselines/reference/quickInfoDisplayPartsLet.baseline index db61e72f097..4ba81a21147 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLet.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLet.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsLet.ts === // let a = 10; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline index f2e8f1886c6..f070027118b 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLiteralLikeNames01.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsLiteralLikeNames01.ts === // class C { // public 1() { } diff --git a/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline index 69eeef0f8cd..7a172f986fd 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsLocalFunction.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsLocalFunction.ts === // function outerFoo() { // ^^^^^^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsModules.baseline b/tests/baselines/reference/quickInfoDisplayPartsModules.baseline index c7483f308c9..4dbccdf8898 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsModules.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsModules.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsModules.ts === // namespace m { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline index dcd1de9e5a6..a434b4d5822 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsParameters.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsParameters.ts === // /** @return *crunch* */ // function foo(param: string, optionalParam?: string, paramWithInitializer = "hello", ...restParam: string[]) { diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline index 9e6dab5b259..abce4f22f05 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeAlias.ts === // class c { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline index 280377195ff..fdd4984b230 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInClass.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInClass.ts === // class c { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline index e44572ec1c2..8c1e3b3f30d 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunction.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunction.ts === // function foo(a: U) { // ^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline index 60d77d3a82c..76879f3e9e7 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInFunctionLikeInTypeAlias.ts === // type MixinCtor = new () => A & { constructor: MixinCtor }; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline index 0cf35c6a26e..9a39fbdd993 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInInterface.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInInterface.ts === // interface I { // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline index 738066034a5..e57500c0125 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsTypeParameterInTypeAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsTypeParameterInTypeAlias.ts === // type List = T[] // ^^^^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsUsing.baseline b/tests/baselines/reference/quickInfoDisplayPartsUsing.baseline index f71da8902a3..71ee2c0d294 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsUsing.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsUsing.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsUsing.ts === // using a = "a"; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsVar.baseline b/tests/baselines/reference/quickInfoDisplayPartsVar.baseline index 2bf532491b3..fd4db6a83e4 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVar.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVar.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsVar.ts === // var a = 10; // ^ diff --git a/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline b/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline index 693e40e4583..5647b2a07c1 100644 --- a/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline +++ b/tests/baselines/reference/quickInfoDisplayPartsVarWithStringTypes01.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoDisplayPartsVarWithStringTypes01.ts === // let hello: "hello" | 'hello' = "hello"; // ^^^^^ diff --git a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline index b3ec939c77d..5e83f546a4a 100644 --- a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline +++ b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/a.js === // const foo = { // f1: (params) => { } diff --git a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline index afe499b5614..52867228ab1 100644 --- a/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline +++ b/tests/baselines/reference/quickInfoForArgumentsPropertyNameInJsMode2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/a.js === // function f(x) { // ^ diff --git a/tests/baselines/reference/quickInfoForConstAssertions.baseline b/tests/baselines/reference/quickInfoForConstAssertions.baseline index 09098d7b7a9..ae2371632db 100644 --- a/tests/baselines/reference/quickInfoForConstAssertions.baseline +++ b/tests/baselines/reference/quickInfoForConstAssertions.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForConstAssertions.ts === // const a = { a: 1 } as const; // ^^^^^ diff --git a/tests/baselines/reference/quickInfoForJSDocCodefence.baseline b/tests/baselines/reference/quickInfoForJSDocCodefence.baseline index 653feb17c17..6f6b6908db7 100644 --- a/tests/baselines/reference/quickInfoForJSDocCodefence.baseline +++ b/tests/baselines/reference/quickInfoForJSDocCodefence.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForJSDocCodefence.ts === // /** // * @example diff --git a/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline b/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline index 4280f6bc8e9..13e285ca3d3 100644 --- a/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline +++ b/tests/baselines/reference/quickInfoForJSDocUnknownTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForJSDocUnknownTag.ts === // /** // * @example diff --git a/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline b/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline index 28f7d6984be..ea0e79b3b58 100644 --- a/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline +++ b/tests/baselines/reference/quickInfoForJSDocWithHttpLinks.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForJSDocWithHttpLinks.js === // /** @typedef {number} https://wat */ // ^^^^^ diff --git a/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline b/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline index b74400052bf..ba49b977c0f 100644 --- a/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline +++ b/tests/baselines/reference/quickInfoForJSDocWithUnresolvedHttpLinks.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForJSDocWithHttpLinks.js === // /** @see {@link https://hva} */ // var see2 = true diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline index 57bb3fba30a..e32129e4ee5 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName03.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForObjectBindingElementName03.ts === // interface Options { // /** diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline index 50b0ac4a41c..c85ba86e54e 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName04.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForObjectBindingElementName04.ts === // interface Options { // /** diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline index 1bf9532809e..36781df3e6f 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName05.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForObjectBindingElementName05.ts === // interface A { // /** diff --git a/tests/baselines/reference/quickInfoForObjectBindingElementName06.baseline b/tests/baselines/reference/quickInfoForObjectBindingElementName06.baseline index 33ed9bf843e..499f47cac18 100644 --- a/tests/baselines/reference/quickInfoForObjectBindingElementName06.baseline +++ b/tests/baselines/reference/quickInfoForObjectBindingElementName06.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoForObjectBindingElementName06.ts === // type Foo = { // /** diff --git a/tests/baselines/reference/quickInfoImportMeta.baseline b/tests/baselines/reference/quickInfoImportMeta.baseline index 768c0f8549a..0e20a5dce7d 100644 --- a/tests/baselines/reference/quickInfoImportMeta.baseline +++ b/tests/baselines/reference/quickInfoImportMeta.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/foo.ts === // /// // /// diff --git a/tests/baselines/reference/quickInfoInheritDoc.baseline b/tests/baselines/reference/quickInfoInheritDoc.baseline index c148237ac95..3c4a4b8b2b9 100644 --- a/tests/baselines/reference/quickInfoInheritDoc.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc.ts === // abstract class BaseClass { // /** diff --git a/tests/baselines/reference/quickInfoInheritDoc2.baseline b/tests/baselines/reference/quickInfoInheritDoc2.baseline index 5c985207c61..d2aaaeda13c 100644 --- a/tests/baselines/reference/quickInfoInheritDoc2.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc2.ts === // class Base { // /** diff --git a/tests/baselines/reference/quickInfoInheritDoc3.baseline b/tests/baselines/reference/quickInfoInheritDoc3.baseline index ea789302487..d99290ad419 100644 --- a/tests/baselines/reference/quickInfoInheritDoc3.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc3.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc3.ts === // function getBaseClass() { // return class Base { diff --git a/tests/baselines/reference/quickInfoInheritDoc4.baseline b/tests/baselines/reference/quickInfoInheritDoc4.baseline index 46f0da2953d..77c59a8b26d 100644 --- a/tests/baselines/reference/quickInfoInheritDoc4.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc4.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc4.ts === // var A: any; // diff --git a/tests/baselines/reference/quickInfoInheritDoc5.baseline b/tests/baselines/reference/quickInfoInheritDoc5.baseline index d676359cdbc..263026c1d1e 100644 --- a/tests/baselines/reference/quickInfoInheritDoc5.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc5.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc5.js === // function A() {} // diff --git a/tests/baselines/reference/quickInfoInheritDoc6.baseline b/tests/baselines/reference/quickInfoInheritDoc6.baseline index 2208131b40a..2f73a1ff873 100644 --- a/tests/baselines/reference/quickInfoInheritDoc6.baseline +++ b/tests/baselines/reference/quickInfoInheritDoc6.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritDoc6.js === // class B extends UNRESOLVED_VALUE_DEFINITELY_DOES_NOT_EXIST { // /** diff --git a/tests/baselines/reference/quickInfoInheritedLinkTag.baseline b/tests/baselines/reference/quickInfoInheritedLinkTag.baseline index 754a66b6821..8b2ef7117eb 100644 --- a/tests/baselines/reference/quickInfoInheritedLinkTag.baseline +++ b/tests/baselines/reference/quickInfoInheritedLinkTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoInheritedLinkTag.ts === // export class C { // /** diff --git a/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline b/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline index 26e7258e717..e73693d5540 100644 --- a/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline +++ b/tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJSDocAtBeforeSpace.ts === // /** // * @return Don't @ me diff --git a/tests/baselines/reference/quickInfoJSDocTags.baseline b/tests/baselines/reference/quickInfoJSDocTags.baseline index 3422078a998..6d162336304 100644 --- a/tests/baselines/reference/quickInfoJSDocTags.baseline +++ b/tests/baselines/reference/quickInfoJSDocTags.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJSDocTags.ts === // /** // * This is class Foo. diff --git a/tests/baselines/reference/quickInfoJsDoc.baseline b/tests/baselines/reference/quickInfoJsDoc.baseline index f3d763849ca..c47cad84ba7 100644 --- a/tests/baselines/reference/quickInfoJsDoc.baseline +++ b/tests/baselines/reference/quickInfoJsDoc.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDoc.ts === // /** // * A constant diff --git a/tests/baselines/reference/quickInfoJsDocAlias.baseline b/tests/baselines/reference/quickInfoJsDocAlias.baseline index 8fbd9b68665..81f8fa873b6 100644 --- a/tests/baselines/reference/quickInfoJsDocAlias.baseline +++ b/tests/baselines/reference/quickInfoJsDocAlias.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /b.ts === // import { A } from "./a"; // A() diff --git a/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline b/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline index 129d839f3df..9390e77ffe4 100644 --- a/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline +++ b/tests/baselines/reference/quickInfoJsDocGetterSetter.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocGetterSetter.ts === // class A { // /** diff --git a/tests/baselines/reference/quickInfoJsDocInheritage.baseline b/tests/baselines/reference/quickInfoJsDocInheritage.baseline index 1de01504e5e..6b9afc72339 100644 --- a/tests/baselines/reference/quickInfoJsDocInheritage.baseline +++ b/tests/baselines/reference/quickInfoJsDocInheritage.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocInheritage.ts === // interface A { // /** diff --git a/tests/baselines/reference/quickInfoJsDocTags1.baseline b/tests/baselines/reference/quickInfoJsDocTags1.baseline index 4bdd50de8d0..fa684958936 100644 --- a/tests/baselines/reference/quickInfoJsDocTags1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags1.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags1.ts === // /** // * Doc diff --git a/tests/baselines/reference/quickInfoJsDocTags10.baseline b/tests/baselines/reference/quickInfoJsDocTags10.baseline index eab5a333214..9abeae90244 100644 --- a/tests/baselines/reference/quickInfoJsDocTags10.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags10.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags10.js === // /** // * @param {T1} a diff --git a/tests/baselines/reference/quickInfoJsDocTags11.baseline b/tests/baselines/reference/quickInfoJsDocTags11.baseline index 542210bfbd1..184901160b8 100644 --- a/tests/baselines/reference/quickInfoJsDocTags11.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags11.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags11.js === // /** // * @param {T1} a diff --git a/tests/baselines/reference/quickInfoJsDocTags12.baseline b/tests/baselines/reference/quickInfoJsDocTags12.baseline index 35604c9a70f..657360b6a5d 100644 --- a/tests/baselines/reference/quickInfoJsDocTags12.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags12.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags12.ts === // /** // * @param {Object} options the args object diff --git a/tests/baselines/reference/quickInfoJsDocTags3.baseline b/tests/baselines/reference/quickInfoJsDocTags3.baseline index d0ccb4e9a8d..ff1de54b66d 100644 --- a/tests/baselines/reference/quickInfoJsDocTags3.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags3.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags3.ts === // interface Foo { // /** diff --git a/tests/baselines/reference/quickInfoJsDocTags4.baseline b/tests/baselines/reference/quickInfoJsDocTags4.baseline index e48d3bed692..019b580902f 100644 --- a/tests/baselines/reference/quickInfoJsDocTags4.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags4.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags4.ts === // class Foo { // /** diff --git a/tests/baselines/reference/quickInfoJsDocTags5.baseline b/tests/baselines/reference/quickInfoJsDocTags5.baseline index aaf4ef4997a..8da5413da6f 100644 --- a/tests/baselines/reference/quickInfoJsDocTags5.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags5.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags5.js === // class Foo { // /** diff --git a/tests/baselines/reference/quickInfoJsDocTags6.baseline b/tests/baselines/reference/quickInfoJsDocTags6.baseline index aca6f256b1f..369916645dd 100644 --- a/tests/baselines/reference/quickInfoJsDocTags6.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags6.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags6.js === // class Foo { // /** diff --git a/tests/baselines/reference/quickInfoJsDocTags7.baseline b/tests/baselines/reference/quickInfoJsDocTags7.baseline index 3dd651ec66c..78dfd1fe99f 100644 --- a/tests/baselines/reference/quickInfoJsDocTags7.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags7.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags7.js === // /** // * @typedef {{ [x: string]: any, y: number }} Foo diff --git a/tests/baselines/reference/quickInfoJsDocTags8.baseline b/tests/baselines/reference/quickInfoJsDocTags8.baseline index ac76cd09327..06ad0ea310d 100644 --- a/tests/baselines/reference/quickInfoJsDocTags8.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags8.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags8.js === // /** // * @typedef {{ [x: string]: any, y: number }} Foo diff --git a/tests/baselines/reference/quickInfoJsDocTags9.baseline b/tests/baselines/reference/quickInfoJsDocTags9.baseline index 036159a2a22..414a194e29c 100644 --- a/tests/baselines/reference/quickInfoJsDocTags9.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags9.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTags9.js === // /** // * @typedef {{ [x: string]: any, y: number }} Foo diff --git a/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline index abae9e22cb6..bec1fcd678c 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTagsCallback.js === // /** // * @callback cb diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline index f9327731844..3c5faa39d23 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload01.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload01.ts === // /** // * Doc foo diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline index 5d58d766606..a672cd597b0 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload03.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload03.ts === // declare function foo(): void; // ^^^ diff --git a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline index 2c8cdb80573..44420b87c67 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsFunctionOverload05.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTagsFunctionOverload05.ts === // declare function foo(): void; // ^^^ diff --git a/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline index d766b0cce62..ca9834e92f5 100644 --- a/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline +++ b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoJsDocTagsTypedef.js === // /** // * Bar comment diff --git a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline index 22a08e3bff6..c82fe061346 100644 --- a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts === // /** // * @param {number} var1 **Highlighted text** diff --git a/tests/baselines/reference/quickInfoJsDocThisTag.baseline b/tests/baselines/reference/quickInfoJsDocThisTag.baseline index a873e110a4d..b039c374a1f 100644 --- a/tests/baselines/reference/quickInfoJsDocThisTag.baseline +++ b/tests/baselines/reference/quickInfoJsDocThisTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.ts === // /** @this {number} */ // function f() { diff --git a/tests/baselines/reference/quickInfoLink10.baseline b/tests/baselines/reference/quickInfoLink10.baseline index 419b71b3657..94c7babf59d 100644 --- a/tests/baselines/reference/quickInfoLink10.baseline +++ b/tests/baselines/reference/quickInfoLink10.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink10.ts === // /** // * start {@link https://vscode.dev/ | end} diff --git a/tests/baselines/reference/quickInfoLink2.baseline b/tests/baselines/reference/quickInfoLink2.baseline index c8730e1df51..fc984248f16 100644 --- a/tests/baselines/reference/quickInfoLink2.baseline +++ b/tests/baselines/reference/quickInfoLink2.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink2.js === // /** // * @typedef AdditionalWallabyConfig Additional valid Wallaby config properties diff --git a/tests/baselines/reference/quickInfoLink3.baseline b/tests/baselines/reference/quickInfoLink3.baseline index 0af1d0dc41a..6b1febab100 100644 --- a/tests/baselines/reference/quickInfoLink3.baseline +++ b/tests/baselines/reference/quickInfoLink3.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink3.ts === // class Foo { // /** diff --git a/tests/baselines/reference/quickInfoLink4.baseline b/tests/baselines/reference/quickInfoLink4.baseline index a3b2823e957..d20a343db40 100644 --- a/tests/baselines/reference/quickInfoLink4.baseline +++ b/tests/baselines/reference/quickInfoLink4.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink4.ts === // type A = 1 | 2; // diff --git a/tests/baselines/reference/quickInfoLink5.baseline b/tests/baselines/reference/quickInfoLink5.baseline index 3b8bac7d039..6302fcd24e2 100644 --- a/tests/baselines/reference/quickInfoLink5.baseline +++ b/tests/baselines/reference/quickInfoLink5.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink5.ts === // const A = 123; // /** diff --git a/tests/baselines/reference/quickInfoLink6.baseline b/tests/baselines/reference/quickInfoLink6.baseline index 603890210d6..521613452bc 100644 --- a/tests/baselines/reference/quickInfoLink6.baseline +++ b/tests/baselines/reference/quickInfoLink6.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink6.ts === // const A = 123; // /** diff --git a/tests/baselines/reference/quickInfoLink7.baseline b/tests/baselines/reference/quickInfoLink7.baseline index 654f671ab12..11d59558054 100644 --- a/tests/baselines/reference/quickInfoLink7.baseline +++ b/tests/baselines/reference/quickInfoLink7.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink7.ts === // /** // * See {@link | } instead diff --git a/tests/baselines/reference/quickInfoLink8.baseline b/tests/baselines/reference/quickInfoLink8.baseline index d34e8a666bf..8e003df7323 100644 --- a/tests/baselines/reference/quickInfoLink8.baseline +++ b/tests/baselines/reference/quickInfoLink8.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink8.ts === // const A = 123; // /** diff --git a/tests/baselines/reference/quickInfoLink9.baseline b/tests/baselines/reference/quickInfoLink9.baseline index 4c5dd0a2b3f..b925be560f2 100644 --- a/tests/baselines/reference/quickInfoLink9.baseline +++ b/tests/baselines/reference/quickInfoLink9.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLink9.ts === // type Foo = { // /** diff --git a/tests/baselines/reference/quickInfoLinkCodePlain.baseline b/tests/baselines/reference/quickInfoLinkCodePlain.baseline index 2324d5f6da1..143b85205e6 100644 --- a/tests/baselines/reference/quickInfoLinkCodePlain.baseline +++ b/tests/baselines/reference/quickInfoLinkCodePlain.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoLinkCodePlain.ts === // export class C { // /** diff --git a/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline b/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline index e699a2cdfd8..3dec1073bd9 100644 --- a/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline +++ b/tests/baselines/reference/quickInfoNestedExportEqualExportDefault.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoNestedExportEqualExportDefault.ts === // export = (state, messages) => { // export default { diff --git a/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline b/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline index 4871481dcb4..934c4c108ff 100644 --- a/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline +++ b/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.tsx === // declare namespace JSX { // interface IntrinsicElements { [elemName: string]: any; } diff --git a/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline b/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline index 9babfbe8568..b6e088885f9 100644 --- a/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline +++ b/tests/baselines/reference/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.tsx === // declare namespace JSX { // interface IntrinsicElements { diff --git a/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline b/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline index b30eaf3dd5f..4a209d31976 100644 --- a/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline +++ b/tests/baselines/reference/quickInfoOnJsxNamespacedName.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.tsx === // ; // ^^^ diff --git a/tests/baselines/reference/quickInfoOnParameterProperties.baseline b/tests/baselines/reference/quickInfoOnParameterProperties.baseline index 545aff93e8b..789f84dc60c 100644 --- a/tests/baselines/reference/quickInfoOnParameterProperties.baseline +++ b/tests/baselines/reference/quickInfoOnParameterProperties.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoOnParameterProperties.ts === // interface IFoo { // /** this is the name of blabla diff --git a/tests/baselines/reference/quickInfoOnThis5.baseline b/tests/baselines/reference/quickInfoOnThis5.baseline index bff1208541e..2075bc2603b 100644 --- a/tests/baselines/reference/quickInfoOnThis5.baseline +++ b/tests/baselines/reference/quickInfoOnThis5.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoOnThis5.ts === // const foo = { // num: 0, diff --git a/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline b/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline index a0f4657820f..ce486a59eec 100644 --- a/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline +++ b/tests/baselines/reference/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.ts === // export type DocumentFilter = { // /** A language id, like `typescript`. */ diff --git a/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline index 6186029bbd8..932dfe01dd7 100644 --- a/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/quickInfoSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/something.js === // var C = function () { } // /** diff --git a/tests/baselines/reference/quickInfoSatisfiesTag.baseline b/tests/baselines/reference/quickInfoSatisfiesTag.baseline index 692bb15ca83..62247027be5 100644 --- a/tests/baselines/reference/quickInfoSatisfiesTag.baseline +++ b/tests/baselines/reference/quickInfoSatisfiesTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /a.js === // /** @satisfies {number} comment */ // const a = 1; diff --git a/tests/baselines/reference/quickInfoThrowsTag.baseline b/tests/baselines/reference/quickInfoThrowsTag.baseline index 9230f30868c..5a9fc8ea59b 100644 --- a/tests/baselines/reference/quickInfoThrowsTag.baseline +++ b/tests/baselines/reference/quickInfoThrowsTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/quickInfoThrowsTag.ts === // class E extends Error {} // diff --git a/tests/baselines/reference/quickInfoTypedefTag.baseline b/tests/baselines/reference/quickInfoTypedefTag.baseline index 8400bfb988a..79595a19883 100644 --- a/tests/baselines/reference/quickInfoTypedefTag.baseline +++ b/tests/baselines/reference/quickInfoTypedefTag.baseline @@ -1,3 +1,4 @@ +// === QuickInfo === === /tests/cases/fourslash/a.js === // /** // * The typedef tag should not appear in the quickinfo. diff --git a/tests/baselines/reference/signatureHelpAfterParameter.baseline b/tests/baselines/reference/signatureHelpAfterParameter.baseline index b91cbc3d0ba..9631f35778f 100644 --- a/tests/baselines/reference/signatureHelpAfterParameter.baseline +++ b/tests/baselines/reference/signatureHelpAfterParameter.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpAfterParameter.ts === // type Type = (a, b, c) => void // const a: Type = (a, b) => {} diff --git a/tests/baselines/reference/signatureHelpCommentsClass.baseline b/tests/baselines/reference/signatureHelpCommentsClass.baseline index cd2cf216957..9debd337be4 100644 --- a/tests/baselines/reference/signatureHelpCommentsClass.baseline +++ b/tests/baselines/reference/signatureHelpCommentsClass.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpCommentsClass.ts === // /** This is class c2 without constructor*/ // class c2 { diff --git a/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline b/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline index 976aa317068..ca94de5bf76 100644 --- a/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline +++ b/tests/baselines/reference/signatureHelpCommentsClassMembers.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpCommentsClassMembers.ts === // /** This is comment for c1*/ // class c1 { diff --git a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline index 4d1c395b6cb..6ac04dc9311 100644 --- a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline +++ b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpCommentsCommentParsing.ts === // /// This is simple /// comments // function simple() { diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline index 2e09ffe3217..b4f440598fe 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts === // /** This comment should appear for foo*/ // function foo() { diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline index 87b967bb589..18e7b7c77f9 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpCommentsFunctionExpression.ts === // /** lambdaFoo var comment*/ // var lambdaFoo = /** this is lambda comment*/ (/**param a*/a: number, /**param b*/b: number) => a + b; diff --git a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline index 3c53b2a8722..50b18e69557 100644 --- a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline +++ b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpConstructorCallParamProperties.ts === // class Circle { // /** diff --git a/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline b/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline index 504c321e9ad..179c98dc37f 100644 --- a/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline +++ b/tests/baselines/reference/signatureHelpJSDocCallbackTag.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/server/jsdocCallbackTag.js === // /** // * @callback FooHandler - A kind of magic diff --git a/tests/baselines/reference/signatureHelpJSDocTags.baseline b/tests/baselines/reference/signatureHelpJSDocTags.baseline index c7153917d6c..57c3f959b2c 100644 --- a/tests/baselines/reference/signatureHelpJSDocTags.baseline +++ b/tests/baselines/reference/signatureHelpJSDocTags.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpJSDocTags.ts === // /** // * This is class Foo. diff --git a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline index 8fa5f4b2f0d..dd9150bd45a 100644 --- a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline +++ b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/test.js === // foo.filter() // ^ diff --git a/tests/baselines/reference/signatureHelpTypeArguments2.baseline b/tests/baselines/reference/signatureHelpTypeArguments2.baseline index b2e999604da..3e6aac851f0 100644 --- a/tests/baselines/reference/signatureHelpTypeArguments2.baseline +++ b/tests/baselines/reference/signatureHelpTypeArguments2.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpTypeArguments2.ts === // /** some documentation // * @template T some documentation 2 diff --git a/tests/baselines/reference/signatureHelpWithUnknown.baseline b/tests/baselines/reference/signatureHelpWithUnknown.baseline index c78887cdbac..0d666b95115 100644 --- a/tests/baselines/reference/signatureHelpWithUnknown.baseline +++ b/tests/baselines/reference/signatureHelpWithUnknown.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelpWithUnknown.ts === // eval(\ // ^ diff --git a/tests/baselines/reference/signatureHelp_unionType.baseline b/tests/baselines/reference/signatureHelp_unionType.baseline index feea6c66a9a..4a5e62912e2 100644 --- a/tests/baselines/reference/signatureHelp_unionType.baseline +++ b/tests/baselines/reference/signatureHelp_unionType.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/signatureHelp_unionType.ts === // declare const a: (fn?: ((x: string) => string) | ((y: number) => number)) => void; // declare const b: (x: string | number) => void; diff --git a/tests/baselines/reference/smartSelection_JSDoc.baseline b/tests/baselines/reference/smartSelection_JSDoc.baseline index 6f223644e43..dbee4ea20f3 100644 --- a/tests/baselines/reference/smartSelection_JSDoc.baseline +++ b/tests/baselines/reference/smartSelection_JSDoc.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === // Not a JSDoc comment /** * @param {number} x The number to square diff --git a/tests/baselines/reference/smartSelection_JSDocTags1.baseline b/tests/baselines/reference/smartSelection_JSDocTags1.baseline index 26c5fb2e9b3..f81f3ff22f7 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags1.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags1.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @returns {Array<{ value: /**/string }>} */ diff --git a/tests/baselines/reference/smartSelection_JSDocTags10.baseline b/tests/baselines/reference/smartSelection_JSDocTags10.baseline index 195a0bd6eb3..2e6d61512f5 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags10.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags10.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @template T * @extends {/**/Set} diff --git a/tests/baselines/reference/smartSelection_JSDocTags11.baseline b/tests/baselines/reference/smartSelection_JSDocTags11.baseline index 65972750980..22d85592c2c 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags11.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags11.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const x = 1; type Foo = { /** comment */ diff --git a/tests/baselines/reference/smartSelection_JSDocTags12.baseline b/tests/baselines/reference/smartSelection_JSDocTags12.baseline index 82acc073265..27e9299bce6 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags12.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags12.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === type B = {}; type A = { a(/** Comment */ /**/p0: number, /** Comment */ p1: number, /** Comment */ p2: number): string; diff --git a/tests/baselines/reference/smartSelection_JSDocTags13.baseline b/tests/baselines/reference/smartSelection_JSDocTags13.baseline index 5a68ca1e23b..fa3e734fbe4 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags13.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags13.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === let a; let b: { /** Comment */ /**/p0: number diff --git a/tests/baselines/reference/smartSelection_JSDocTags2.baseline b/tests/baselines/reference/smartSelection_JSDocTags2.baseline index e7c80be4688..30e52bdd811 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags2.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @type {/**/string} */ diff --git a/tests/baselines/reference/smartSelection_JSDocTags3.baseline b/tests/baselines/reference/smartSelection_JSDocTags3.baseline index d4c29c10733..3c5e5d61231 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags3.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags3.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @param {/**/string} x */ diff --git a/tests/baselines/reference/smartSelection_JSDocTags4.baseline b/tests/baselines/reference/smartSelection_JSDocTags4.baseline index 7a82e42bd48..4e8f46b7231 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags4.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags4.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @typedef {object} Foo * @property {string} a diff --git a/tests/baselines/reference/smartSelection_JSDocTags5.baseline b/tests/baselines/reference/smartSelection_JSDocTags5.baseline index 2d1913987d2..0190c0a29b1 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags5.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags5.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @callback Foo * @param {string} data diff --git a/tests/baselines/reference/smartSelection_JSDocTags6.baseline b/tests/baselines/reference/smartSelection_JSDocTags6.baseline index 5475ba42b45..dd12beba973 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags6.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags6.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @template T * @param {/**/T} x diff --git a/tests/baselines/reference/smartSelection_JSDocTags7.baseline b/tests/baselines/reference/smartSelection_JSDocTags7.baseline index 2e67e7f5d04..4efef4413aa 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags7.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags7.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @constructor * @param {/**/number} data diff --git a/tests/baselines/reference/smartSelection_JSDocTags8.baseline b/tests/baselines/reference/smartSelection_JSDocTags8.baseline index 4c50de4c099..8cb58f0c774 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags8.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags8.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** * @this {/**/Foo} * @param {*} e diff --git a/tests/baselines/reference/smartSelection_JSDocTags9.baseline b/tests/baselines/reference/smartSelection_JSDocTags9.baseline index 9192ca8fdc2..519e3a2ce7b 100644 --- a/tests/baselines/reference/smartSelection_JSDocTags9.baseline +++ b/tests/baselines/reference/smartSelection_JSDocTags9.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === /** @enum {/**/number} */ const Foo = { x: 0, diff --git a/tests/baselines/reference/smartSelection_behindCaret.baseline b/tests/baselines/reference/smartSelection_behindCaret.baseline index 6b7b393f7ea..ad31ec6e7e7 100644 --- a/tests/baselines/reference/smartSelection_behindCaret.baseline +++ b/tests/baselines/reference/smartSelection_behindCaret.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === let/**/ x: string let diff --git a/tests/baselines/reference/smartSelection_bindingPatterns.baseline b/tests/baselines/reference/smartSelection_bindingPatterns.baseline index 78f3e4a10b7..05740da1c79 100644 --- a/tests/baselines/reference/smartSelection_bindingPatterns.baseline +++ b/tests/baselines/reference/smartSelection_bindingPatterns.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const { /**/x, y: a, ...zs = {} } = {}; x diff --git a/tests/baselines/reference/smartSelection_comment1.baseline b/tests/baselines/reference/smartSelection_comment1.baseline index 2e541c0b230..2ce4a0f7c03 100644 --- a/tests/baselines/reference/smartSelection_comment1.baseline +++ b/tests/baselines/reference/smartSelection_comment1.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const a = 1; ///**/comment content comment content diff --git a/tests/baselines/reference/smartSelection_comment2.baseline b/tests/baselines/reference/smartSelection_comment2.baseline index ccb5286f0b5..4ce50a231cf 100644 --- a/tests/baselines/reference/smartSelection_comment2.baseline +++ b/tests/baselines/reference/smartSelection_comment2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const a = 1; //a b/**/c d a bc d diff --git a/tests/baselines/reference/smartSelection_complex.baseline b/tests/baselines/reference/smartSelection_complex.baseline index 2fc5c68c449..df5537f4cb1 100644 --- a/tests/baselines/reference/smartSelection_complex.baseline +++ b/tests/baselines/reference/smartSelection_complex.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === type X = IsExactlyAny

extends true ? T : ({ [K in keyof P]: IsExactlyAny extends true ? K extends keyof T ? T[K] : P[/**/K] : P[K]; } & Pick>) K diff --git a/tests/baselines/reference/smartSelection_emptyRanges.baseline b/tests/baselines/reference/smartSelection_emptyRanges.baseline index e2d9bfae3f6..907314e506a 100644 --- a/tests/baselines/reference/smartSelection_emptyRanges.baseline +++ b/tests/baselines/reference/smartSelection_emptyRanges.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === class HomePage { componentDidMount(/**/) { if (this.props.username) { diff --git a/tests/baselines/reference/smartSelection_function1.baseline b/tests/baselines/reference/smartSelection_function1.baseline index 908d7e1b510..6344b9c6471 100644 --- a/tests/baselines/reference/smartSelection_function1.baseline +++ b/tests/baselines/reference/smartSelection_function1.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const f1 = () => { /**/ }; diff --git a/tests/baselines/reference/smartSelection_function2.baseline b/tests/baselines/reference/smartSelection_function2.baseline index 3d92a4c3582..1b4f84b37c5 100644 --- a/tests/baselines/reference/smartSelection_function2.baseline +++ b/tests/baselines/reference/smartSelection_function2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === function f2() { /**/ } diff --git a/tests/baselines/reference/smartSelection_function3.baseline b/tests/baselines/reference/smartSelection_function3.baseline index 230106f98fa..afd3e7948cf 100644 --- a/tests/baselines/reference/smartSelection_function3.baseline +++ b/tests/baselines/reference/smartSelection_function3.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const f3 = function () { /**/ } diff --git a/tests/baselines/reference/smartSelection_functionParams1.baseline b/tests/baselines/reference/smartSelection_functionParams1.baseline index 1162ceb917a..555d09e0c34 100644 --- a/tests/baselines/reference/smartSelection_functionParams1.baseline +++ b/tests/baselines/reference/smartSelection_functionParams1.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === function f(/**/p, q?, ...r: any[] = []) {} p diff --git a/tests/baselines/reference/smartSelection_functionParams2.baseline b/tests/baselines/reference/smartSelection_functionParams2.baseline index 5f355ff0f0e..8c6c1d318b8 100644 --- a/tests/baselines/reference/smartSelection_functionParams2.baseline +++ b/tests/baselines/reference/smartSelection_functionParams2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === function f( a, /**/b diff --git a/tests/baselines/reference/smartSelection_imports.baseline b/tests/baselines/reference/smartSelection_imports.baseline index f3a449ee13e..0f9ecd5402c 100644 --- a/tests/baselines/reference/smartSelection_imports.baseline +++ b/tests/baselines/reference/smartSelection_imports.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === import { /**/x as y, z } from './z'; import { b } from './'; diff --git a/tests/baselines/reference/smartSelection_lastBlankLine.baseline b/tests/baselines/reference/smartSelection_lastBlankLine.baseline index 3cbad44aac4..9041f4dd74e 100644 --- a/tests/baselines/reference/smartSelection_lastBlankLine.baseline +++ b/tests/baselines/reference/smartSelection_lastBlankLine.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === class C {} /**/ diff --git a/tests/baselines/reference/smartSelection_loneVariableDeclaration.baseline b/tests/baselines/reference/smartSelection_loneVariableDeclaration.baseline index df2345bd20f..c1151f045f8 100644 --- a/tests/baselines/reference/smartSelection_loneVariableDeclaration.baseline +++ b/tests/baselines/reference/smartSelection_loneVariableDeclaration.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const /**/x = 3; x diff --git a/tests/baselines/reference/smartSelection_mappedTypes.baseline b/tests/baselines/reference/smartSelection_mappedTypes.baseline index 5dd6b37d7fe..a86781764a5 100644 --- a/tests/baselines/reference/smartSelection_mappedTypes.baseline +++ b/tests/baselines/reference/smartSelection_mappedTypes.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === type M = { /**/-readonly [K in keyof any]-?: any }; - diff --git a/tests/baselines/reference/smartSelection_objectTypes.baseline b/tests/baselines/reference/smartSelection_objectTypes.baseline index 612d5df2faa..bbddb7b86af 100644 --- a/tests/baselines/reference/smartSelection_objectTypes.baseline +++ b/tests/baselines/reference/smartSelection_objectTypes.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === type X = { /**/foo?: string; readonly bar: { x: number }; diff --git a/tests/baselines/reference/smartSelection_punctuationPriority.baseline b/tests/baselines/reference/smartSelection_punctuationPriority.baseline index 176327b8c98..751bb9c96c3 100644 --- a/tests/baselines/reference/smartSelection_punctuationPriority.baseline +++ b/tests/baselines/reference/smartSelection_punctuationPriority.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === console/**/.log(); console diff --git a/tests/baselines/reference/smartSelection_simple1.baseline b/tests/baselines/reference/smartSelection_simple1.baseline index 16cc30487d8..9a12de3f735 100644 --- a/tests/baselines/reference/smartSelection_simple1.baseline +++ b/tests/baselines/reference/smartSelection_simple1.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === class Foo { bar(a, b) { if (/**/a === b) { diff --git a/tests/baselines/reference/smartSelection_simple2.baseline b/tests/baselines/reference/smartSelection_simple2.baseline index 2c4b520d449..1a8c06681c6 100644 --- a/tests/baselines/reference/smartSelection_simple2.baseline +++ b/tests/baselines/reference/smartSelection_simple2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === export interface IService { _serviceBrand: any; diff --git a/tests/baselines/reference/smartSelection_stringLiteral.baseline b/tests/baselines/reference/smartSelection_stringLiteral.baseline index 4e062d162ce..137bf44a6b5 100644 --- a/tests/baselines/reference/smartSelection_stringLiteral.baseline +++ b/tests/baselines/reference/smartSelection_stringLiteral.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === const a = 'a'; const b = /**/'b'; diff --git a/tests/baselines/reference/smartSelection_templateStrings.baseline b/tests/baselines/reference/smartSelection_templateStrings.baseline index 91fec157842..48e71b2db79 100644 --- a/tests/baselines/reference/smartSelection_templateStrings.baseline +++ b/tests/baselines/reference/smartSelection_templateStrings.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === `a /**/b ${ 'c' } d` diff --git a/tests/baselines/reference/smartSelection_templateStrings2.baseline b/tests/baselines/reference/smartSelection_templateStrings2.baseline index cb49f567cb6..d755f49a2a7 100644 --- a/tests/baselines/reference/smartSelection_templateStrings2.baseline +++ b/tests/baselines/reference/smartSelection_templateStrings2.baseline @@ -1,3 +1,4 @@ +// === Smart Selection === `a ${b} /**/c` a ${b} c diff --git a/tests/baselines/reference/trailingCommaSignatureHelp.baseline b/tests/baselines/reference/trailingCommaSignatureHelp.baseline index 327474709eb..fdcd7d5f6ce 100644 --- a/tests/baselines/reference/trailingCommaSignatureHelp.baseline +++ b/tests/baselines/reference/trailingCommaSignatureHelp.baseline @@ -1,3 +1,4 @@ +// === SignatureHelp === === /tests/cases/fourslash/trailingCommaSignatureHelp.ts === // function str(n: number): string; // /** diff --git a/tests/baselines/reference/tsserver/events/watchEvents/canUseWatchEvents.js b/tests/baselines/reference/tsserver/events/watchEvents/canUseWatchEvents.js index 57b9abb873a..5e78dff62f3 100644 --- a/tests/baselines/reference/tsserver/events/watchEvents/canUseWatchEvents.js +++ b/tests/baselines/reference/tsserver/events/watchEvents/canUseWatchEvents.js @@ -229,7 +229,7 @@ Custom WatchedFiles:: /user/username/projects/myproject/tsconfig.json: *new* {"id":1,"path":"/user/username/projects/myproject/tsconfig.json"} -Custom WatchedDirectories:Recursive:: +Custom WatchedDirectoriesRecursive:: /user/username/projects/myproject: *new* {"id":2,"path":"/user/username/projects/myproject","recursive":true} /user/username/projects/myproject/node_modules/@types: *new* @@ -346,7 +346,7 @@ Custom WatchedFiles:: /user/username/projects/myproject/tsconfig.json: {"id":1,"path":"/user/username/projects/myproject/tsconfig.json"} -Custom WatchedDirectories:Recursive:: +Custom WatchedDirectoriesRecursive:: /user/username/projects/myproject: {"id":2,"path":"/user/username/projects/myproject","recursive":true} /user/username/projects/myproject/node_modules/@types: @@ -482,7 +482,7 @@ Custom WatchedFiles *deleted*:: /user/username/projects/myproject/b.ts: {"id":3,"path":"/user/username/projects/myproject/b.ts"} -Custom WatchedDirectories:Recursive:: +Custom WatchedDirectoriesRecursive:: /user/username/projects/myproject: {"id":2,"path":"/user/username/projects/myproject","recursive":true} /user/username/projects/myproject/node_modules/@types: @@ -536,7 +536,7 @@ Custom WatchedFiles:: /user/username/projects/myproject/tsconfig.json: {"id":1,"path":"/user/username/projects/myproject/tsconfig.json"} -Custom WatchedDirectories:Recursive:: +Custom WatchedDirectoriesRecursive:: /user/username/projects/myproject: {"id":2,"path":"/user/username/projects/myproject","recursive":true} /user/username/projects/myproject/node_modules/@types: diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossPackage_pathsAndSymlink.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossPackage_pathsAndSymlink.js new file mode 100644 index 00000000000..25c5a662350 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossPackage_pathsAndSymlink.js @@ -0,0 +1,432 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/node_modules/@company/common] symlink(/project/packages/common) +//// [/project/packages/app/lib/index.ts] +Tooltip + +//// [/project/packages/app/package.json] +{ + "name": "@company/app", + "version": "1.0.0", + "dependencies": { + "@company/common": "1.0.0" + } +} + +//// [/project/packages/app/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "bundler", + "paths": { + "@/*": ["./*"] + } + } +} + +//// [/project/packages/common/lib/index.tsx] +export function Tooltip {}; + +//// [/project/packages/common/package.json] +{ + "name": "@company/common", + "version": "1.0.0", + "main": "./lib/index.tsx" +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/packages/common/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project/packages/common +Info seq [hh:mm:ss:mss] For info: /project/packages/common/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/packages/common/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/packages/common/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/packages/common/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/packages/common/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/packages/common/package.json SVC-1-0 "{\n \"name\": \"@company/common\",\n \"version\": \"1.0.0\",\n \"main\": \"./lib/index.tsx\"\n}" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/packages/common/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/packages/common/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/project/packages/common/package.json: *new* + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +/project/packages/common/node_modules: *new* + {} +/project/packages/common/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/packages/app/lib/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project/packages/app/lib +Info seq [hh:mm:ss:mss] For info: /project/packages/app/lib/index.ts :: Config file name: /project/packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/packages/app/tsconfig.json 2000 undefined Project: /project/packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /project/packages/app/lib/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/packages/app/tsconfig.json : { + "rootNames": [ + "/project/packages/app/lib/index.ts" + ], + "options": { + "composite": true, + "module": 99, + "moduleResolution": 100, + "paths": { + "@/*": [ + "./*" + ] + }, + "pathsBasePath": "/project/packages/app", + "configFilePath": "/project/packages/app/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/packages/app 1 undefined Config: /project/packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/packages/app 1 undefined Config: /project/packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/packages/app/node_modules 1 undefined Project: /project/packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/packages/app/node_modules 1 undefined Project: /project/packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/packages/app/node_modules/@types 1 undefined Project: /project/packages/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/packages/app/node_modules/@types 1 undefined Project: /project/packages/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/packages/app/lib/index.ts SVC-1-0 "Tooltip" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + lib/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/packages/common/lib/index.tsx 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /project/packages/common/lib/index.tsx Text-1 "export function Tooltip {};" + + + ../common/lib/index.tsx + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/packages/app/lib/index.ts", + "configFile": "/project/packages/app/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /project/packages/app +Info seq [hh:mm:ss:mss] For info: /project/packages/app/tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/project/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/packages/common/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/packages/app/lib/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /project/packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/packages/app/package.json: *new* + {"pollingInterval":250} +/project/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/project/packages/common/lib/index.tsx: *new* + {"pollingInterval":500} +/project/packages/common/package.json: + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +/project/packages/app: *new* + {} +/project/packages/app/node_modules: *new* + {} +/project/packages/app/node_modules/@types: *new* + {} +/project/packages/common/node_modules: + {} +/project/packages/common/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/packages/app/lib/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/project/packages/app/lib/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'Tooltip'.", + "start": 0, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/project/packages/app/lib/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/project/packages/app/lib/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"@company/common\"", + "changes": [ + { + "fileName": "/project/packages/app/lib/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { Tooltip } from \"@company/common\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/packages/app/package.json: + {"pollingInterval":250} +/project/packages/app/tsconfig.json: + {"pollingInterval":2000} +/project/packages/common/lib/index.tsx: + {"pollingInterval":500} +/project/packages/common/package.json: + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +/project/node_modules: *new* + {} +/project/packages/app: + {} +/project/packages/app/node_modules: + {} +/project/packages/app/node_modules/@types: + {} +/project/packages/common/node_modules: + {} +/project/packages/common/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js new file mode 100644 index 00000000000..20541db885d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js @@ -0,0 +1,474 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/common/src/MyModule.ts] +export function square(n: number) { + return n * 2; +} + +//// [/common/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "composite": true + }, + "include": ["src"] +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/web/src/Helper.ts] +export function saveMe() { + square(2); +} + +//// [/web/src/MyApp.ts] +import { square } from "../../common/dist/src/MyModule"; + +//// [/web/tsconfig.json] +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node", + "noEmit": true, + "baseUrl": "." + }, + "include": ["src"], + "references": [{ "path": "../common" }] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/common/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /common +Info seq [hh:mm:ss:mss] For info: /common/tsconfig.json :: Config file name: /common/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /common/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /common/tsconfig.json 2000 undefined Project: /common/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/common/tsconfig.json", + "reason": "Creating possible configured project for /common/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /common/tsconfig.json : { + "rootNames": [ + "/common/src/MyModule.ts" + ], + "options": { + "module": 1, + "outDir": "/common/dist", + "composite": true, + "configFilePath": "/common/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /common/src 1 undefined Config: /common/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /common/src 1 undefined Config: /common/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /common/src/MyModule.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /common/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /common/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /common/src/MyModule.ts Text-1 "export function square(n: number) {\n return n * 2;\n}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + src/MyModule.ts + Matched by include pattern 'src' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/common/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/common/tsconfig.json", + "configFile": "/common/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /common/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"outDir\": \"dist\",\n \"composite\": true\n },\n \"include\": [\"src\"]\n}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /common/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/common/src/MyModule.ts: *new* + {"pollingInterval":500} +/common/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/common/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /web/src +Info seq [hh:mm:ss:mss] For info: /web/src/Helper.ts :: Config file name: /web/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /web/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /web/tsconfig.json 2000 undefined Project: /web/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/web/tsconfig.json", + "reason": "Creating possible configured project for /web/src/Helper.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /web/tsconfig.json : { + "rootNames": [ + "/web/src/Helper.ts", + "/web/src/MyApp.ts" + ], + "options": { + "module": 99, + "moduleResolution": 2, + "noEmit": true, + "baseUrl": "/web", + "configFilePath": "/web/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/common", + "originalPath": "../common" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /web/src 1 undefined Config: /web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /web/src 1 undefined Config: /web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /web/src/MyApp.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /web/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /common/dist/src 1 undefined Project: /web/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /common/dist/src 1 undefined Project: /web/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /web/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /web/src/Helper.ts SVC-1-0 "export function saveMe() {\n square(2);\n}" + /common/src/MyModule.ts Text-1 "export function square(n: number) {\n return n * 2;\n}" + /web/src/MyApp.ts Text-1 "import { square } from \"../../common/dist/src/MyModule\";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + src/Helper.ts + Matched by include pattern 'src' in 'tsconfig.json' + ../common/src/MyModule.ts + Imported via "../../common/dist/src/MyModule" from file 'src/MyApp.ts' + src/MyApp.ts + Matched by include pattern 'src' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/web/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/web/src/Helper.ts", + "configFile": "/web/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /common/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /web/src/Helper.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /web/tsconfig.json +After Request +watchedFiles:: +/common/src/MyModule.ts: + {"pollingInterval":500} +/common/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/web/src/MyApp.ts: *new* + {"pollingInterval":500} +/web/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/common/dist/src: *new* + {} +/common/src: + {} +/web/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "importModuleSpecifierPreference": "non-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'square'.", + "start": 29, + "length": 6, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 3 + }, + "endLocation": { + "line": 2, + "offset": 9 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "startLine": 2, + "startOffset": 3, + "endLine": 2, + "endOffset": 9, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"../../common/src/MyModule\"", + "changes": [ + { + "fileName": "/web/src/Helper.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { square } from \"../../common/src/MyModule\";\r\n\r\n" + } + ] + } + ] + }, + { + "fixName": "fixMissingFunctionDeclaration", + "description": "Add missing function declaration 'square'", + "changes": [ + { + "fileName": "/web/src/Helper.ts", + "textChanges": [ + { + "start": { + "line": 3, + "offset": 2 + }, + "end": { + "line": 3, + "offset": 2 + }, + "newText": "\r\n\r\nfunction square(arg0: number) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_sharedOutDir.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_sharedOutDir.js new file mode 100644 index 00000000000..a94adfbe45b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_sharedOutDir.js @@ -0,0 +1,446 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/index.ts] +dep + +//// [/packages/app/tsconfig.json] +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "../../dist/packages/app" }, + "references": [{ "path": "../dep" }] +} + +//// [/packages/app/utils.ts] +import "packages/dep"; + +//// [/packages/dep/index.ts] +import "./sub/folder"; + +//// [/packages/dep/sub/folder/index.ts] +export const dep = 0; + +//// [/packages/dep/tsconfig.json] +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "../../dist/packages/dep" } +} + +//// [/tsconfig.base.json] +{ + "compilerOptions": { + "module": "commonjs", + "baseUrl": ".", + "paths": { + "packages/*": ["./packages/*"] + } + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.base.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.base.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.base.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"baseUrl\": \".\",\n \"paths\": {\n \"packages/*\": [\"./packages/*\"]\n }\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.base.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.base.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/index.ts", + "/packages/app/utils.ts" + ], + "options": { + "module": 1, + "baseUrl": "/", + "paths": { + "packages/*": [ + "./packages/*" + ] + }, + "pathsBasePath": "/", + "outDir": "/dist/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.base.json 2000 undefined Config: /packages/app/tsconfig.json WatchType: Extended config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/index.ts", + "/packages/dep/sub/folder/index.ts" + ], + "options": { + "module": 1, + "baseUrl": "/", + "paths": { + "packages/*": [ + "./packages/*" + ] + }, + "pathsBasePath": "/", + "outDir": "/dist/packages/dep", + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/sub 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/sub 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (7) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/index.ts SVC-1-0 "dep" + /packages/dep/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/index.ts Text-1 "import \"./sub/folder\";" + /packages/app/utils.ts Text-1 "import \"packages/dep\";" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + ../dep/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/index.ts' + ../dep/index.ts + Imported via "packages/dep" from file 'utils.ts' + utils.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/index.ts", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 4, + "offset": 18 + }, + "end": { + "line": 4, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (7) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.base.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/app/utils.ts: *new* + {"pollingInterval":500} +/packages/dep/index.ts: *new* + {"pollingInterval":500} +/packages/dep/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.base.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/sub: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep'.", + "start": 0, + "length": 3, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 4, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"packages/dep/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep } from \"packages/dep/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep } from \"packages/dep/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js new file mode 100644 index 00000000000..719ea33f1d7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js @@ -0,0 +1,817 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/a.ts] +import "dep"; + +//// [/packages/app/src/index.ts] +dep1; + +//// [/packages/app/src/utils.ts] +dep2; + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "dep": ["../dep/src/main"], + "dep/*": ["../dep/src/*"] + } + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/main.js", "types": "dist/main.d.ts" } + +//// [/packages/dep/src/main.ts] +import "./sub/folder"; +export const dep1 = 0; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep2 = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/a.ts", + "/packages/app/src/index.ts", + "/packages/app/src/utils.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "paths": { + "dep": [ + "../dep/src/main" + ], + "dep/*": [ + "../dep/src/*" + ] + }, + "pathsBasePath": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/main.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts Text-1 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/main.ts' + ../dep/src/main.ts + Imported via "dep" from file 'src/a.ts' + src/a.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + src/utils.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/main.ts' + Matched by default include pattern '**/*' + src/main.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 12, + "offset": 3 + }, + "end": { + "line": 12, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/a.ts: *new* + {"pollingInterval":500} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/src/utils.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/main.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/src/utils.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep1'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep1 } from \"dep\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep1 } from \"dep\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/utils.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts SVC-2-2 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/utils.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/utils.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 10, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 12, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep2'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 14, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/utils.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep2 } from \"dep/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep2 } from \"dep/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js new file mode 100644 index 00000000000..57b600479fe --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js @@ -0,0 +1,817 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/a.ts] +import "dep"; + +//// [/packages/app/src/index.ts] +dep1; + +//// [/packages/app/src/utils.ts] +dep2; + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "dep": ["../dep/src/main"], + "dep/dist/*": ["../dep/src/*"] + } + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/main.js", "types": "dist/main.d.ts" } + +//// [/packages/dep/src/main.ts] +import "./sub/folder"; +export const dep1 = 0; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep2 = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/a.ts", + "/packages/app/src/index.ts", + "/packages/app/src/utils.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "paths": { + "dep": [ + "../dep/src/main" + ], + "dep/dist/*": [ + "../dep/src/*" + ] + }, + "pathsBasePath": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/main.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts Text-1 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/main.ts' + ../dep/src/main.ts + Imported via "dep" from file 'src/a.ts' + src/a.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + src/utils.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/main.ts' + Matched by default include pattern '**/*' + src/main.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 12, + "offset": 3 + }, + "end": { + "line": 12, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/a.ts: *new* + {"pollingInterval":500} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/src/utils.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/main.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/src/utils.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep1'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep1 } from \"dep\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep1 } from \"dep\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/utils.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts SVC-2-2 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/utils.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/utils.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 10, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 12, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep2'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 14, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/dist/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/utils.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep2 } from \"dep/dist/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep2 } from \"dep/dist/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js new file mode 100644 index 00000000000..4794c7e2aaa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js @@ -0,0 +1,481 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/common/src/MyModule.ts] +export function square(n: number) { + return n * 2; +} + +//// [/common/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "composite": true + }, + "include": ["src"] +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/web/src/Helper.ts] +export function saveMe() { + square(2); +} + +//// [/web/src/MyApp.ts] +import { square } from "@common/MyModule"; + +//// [/web/tsconfig.json] +{ + "compilerOptions": { + "module": "esnext", + "moduleResolution": "node", + "noEmit": true, + "paths": { + "@common/*": ["../common/dist/src/*"] + } + }, + "include": ["src"], + "references": [{ "path": "../common" }] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/common/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /common +Info seq [hh:mm:ss:mss] For info: /common/tsconfig.json :: Config file name: /common/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /common/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /common/tsconfig.json 2000 undefined Project: /common/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/common/tsconfig.json", + "reason": "Creating possible configured project for /common/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /common/tsconfig.json : { + "rootNames": [ + "/common/src/MyModule.ts" + ], + "options": { + "module": 1, + "outDir": "/common/dist", + "composite": true, + "configFilePath": "/common/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /common/src 1 undefined Config: /common/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /common/src 1 undefined Config: /common/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /common/src/MyModule.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /common/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /common/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /common/src/MyModule.ts Text-1 "export function square(n: number) {\n return n * 2;\n}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + src/MyModule.ts + Matched by include pattern 'src' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/common/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/common/tsconfig.json", + "configFile": "/common/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /common/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"outDir\": \"dist\",\n \"composite\": true\n },\n \"include\": [\"src\"]\n}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /common/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/common/src/MyModule.ts: *new* + {"pollingInterval":500} +/common/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/common/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /web/src +Info seq [hh:mm:ss:mss] For info: /web/src/Helper.ts :: Config file name: /web/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /web/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /web/tsconfig.json 2000 undefined Project: /web/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/web/tsconfig.json", + "reason": "Creating possible configured project for /web/src/Helper.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /web/tsconfig.json : { + "rootNames": [ + "/web/src/Helper.ts", + "/web/src/MyApp.ts" + ], + "options": { + "module": 99, + "moduleResolution": 2, + "noEmit": true, + "paths": { + "@common/*": [ + "../common/dist/src/*" + ] + }, + "pathsBasePath": "/web", + "configFilePath": "/web/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/common", + "originalPath": "../common" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /web/src 1 undefined Config: /web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /web/src 1 undefined Config: /web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /web/src/MyApp.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /web/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /common/dist/src 1 undefined Project: /web/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /common/dist/src 1 undefined Project: /web/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /web/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /web/src/Helper.ts SVC-1-0 "export function saveMe() {\n square(2);\n}" + /common/src/MyModule.ts Text-1 "export function square(n: number) {\n return n * 2;\n}" + /web/src/MyApp.ts Text-1 "import { square } from \"@common/MyModule\";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + src/Helper.ts + Matched by include pattern 'src' in 'tsconfig.json' + ../common/src/MyModule.ts + Imported via "@common/MyModule" from file 'src/MyApp.ts' + src/MyApp.ts + Matched by include pattern 'src' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/web/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/web/src/Helper.ts", + "configFile": "/web/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/common/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /common/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /web/src/Helper.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /web/tsconfig.json +After Request +watchedFiles:: +/common/src/MyModule.ts: + {"pollingInterval":500} +/common/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/web/src/MyApp.ts: *new* + {"pollingInterval":500} +/web/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/common/dist/src: *new* + {} +/common/src: + {} +/web/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "importModuleSpecifierPreference": "non-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'square'.", + "start": 29, + "length": 6, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 3 + }, + "endLocation": { + "line": 2, + "offset": 9 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/web/src/Helper.ts", + "startLine": 2, + "startOffset": 3, + "endLine": 2, + "endOffset": 9, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"@common/MyModule\"", + "changes": [ + { + "fileName": "/web/src/Helper.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { square } from \"@common/MyModule\";\r\n\r\n" + } + ] + } + ] + }, + { + "fixName": "fixMissingFunctionDeclaration", + "description": "Add missing function declaration 'square'", + "changes": [ + { + "fileName": "/web/src/Helper.ts", + "textChanges": [ + { + "start": { + "line": 3, + "offset": 2 + }, + "end": { + "line": 3, + "offset": 2 + }, + "newText": "\r\n\r\nfunction square(arg0: number) {\r\n throw new Error(\"Function not implemented.\");\r\n}\r\n" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js new file mode 100644 index 00000000000..df9cbd57193 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js @@ -0,0 +1,817 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/a.ts] +import "dep"; + +//// [/packages/app/src/index.ts] +dep1; + +//// [/packages/app/src/utils.ts] +dep2; + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "dep": ["../dep/src/main"], + "dep/*": ["../dep/*"] + } + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/main.js", "types": "dist/main.d.ts" } + +//// [/packages/dep/src/main.ts] +import "./sub/folder"; +export const dep1 = 0; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep2 = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/a.ts", + "/packages/app/src/index.ts", + "/packages/app/src/utils.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "paths": { + "dep": [ + "../dep/src/main" + ], + "dep/*": [ + "../dep/*" + ] + }, + "pathsBasePath": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/main.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/app/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts Text-1 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/main.ts' + ../dep/src/main.ts + Imported via "dep" from file 'src/a.ts' + src/a.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + src/utils.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/main.ts' + Matched by default include pattern '**/*' + src/main.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 12, + "offset": 3 + }, + "end": { + "line": 12, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/a.ts: *new* + {"pollingInterval":500} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/src/utils.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/main.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/src/utils.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep1'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep1 } from \"dep\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep1 } from \"dep\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/utils.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep2 = 0;" + /packages/dep/src/main.ts Text-1 "import \"./sub/folder\";\nexport const dep1 = 0;" + /packages/app/src/a.ts Text-1 "import \"dep\";" + /packages/app/src/index.ts SVC-2-2 "dep1;" + /packages/app/src/utils.ts Text-1 "dep2;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/utils.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/src/a.ts: + {"pollingInterval":500} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/main.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/utils.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 10, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 12, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep2'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 14, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/src/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/utils.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep2 } from \"dep/src/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep2 } from \"dep/src/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/packages/app/src/utils.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js new file mode 100644 index 00000000000..4eb94500c8e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js @@ -0,0 +1,588 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/node_modules/dep] symlink(/packages/dep) +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/index.ts] +dep + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "dep/*": ["../dep/src/*"] + } + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/index.js", "types": "dist/index.d.ts" } + +//// [/packages/dep/src/index.ts] +import "./sub/folder"; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/index.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "paths": { + "dep/*": [ + "../dep/src/*" + ] + }, + "pathsBasePath": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/index.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/src/index.ts Text-1 "dep" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/index.ts' + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 11, + "offset": 18 + }, + "end": { + "line": 11, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 11, + "offset": 3 + }, + "end": { + "line": 11, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/index.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep'.", + "start": 0, + "length": 3, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 4, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/index.ts' + ../dep/src/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep } from \"dep/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/app/node_modules: *new* + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep } from \"dep/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js new file mode 100644 index 00000000000..54f8477f75d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js @@ -0,0 +1,588 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/node_modules/dep] symlink(/packages/dep) +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/index.ts] +dep + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": ".", + "paths": { + "dep/dist/*": ["../dep/src/*"] + } + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/index.js", "types": "dist/index.d.ts" } + +//// [/packages/dep/src/index.ts] +import "./sub/folder"; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/index.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "paths": { + "dep/dist/*": [ + "../dep/src/*" + ] + }, + "pathsBasePath": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/index.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/src/index.ts Text-1 "dep" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/index.ts' + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 11, + "offset": 18 + }, + "end": { + "line": 11, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 11, + "offset": 3 + }, + "end": { + "line": 11, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/index.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep'.", + "start": 0, + "length": 3, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 4, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/index.ts' + ../dep/src/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/dist/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep } from \"dep/dist/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/app/node_modules: *new* + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep } from \"dep/dist/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js new file mode 100644 index 00000000000..110d8846dc3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js @@ -0,0 +1,579 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/node_modules/dep] symlink(/packages/dep) +//// [/packages/app/package.json] +{ "name": "app", "dependencies": { "dep": "*" } } + +//// [/packages/app/src/index.ts] +dep + +//// [/packages/app/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "baseUrl": "." + } + "references": [{ "path": "../dep" }] +} + +//// [/packages/dep/package.json] +{ "name": "dep", "main": "dist/index.js", "types": "dist/index.d.ts" } + +//// [/packages/dep/src/index.ts] +import "./sub/folder"; + +//// [/packages/dep/src/sub/folder/index.ts] +export const dep = 0; + +//// [/packages/dep/tsconfig.json] +{ + "compilerOptions": { "outDir": "dist", "rootDir": "src", "module": "commonjs" } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/app/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/app +Info seq [hh:mm:ss:mss] For info: /packages/app/package.json :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/app/tsconfig.json", + "reason": "Creating possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/app/tsconfig.json : { + "rootNames": [ + "/packages/app/src/index.ts" + ], + "options": { + "module": 1, + "outDir": "/packages/app/dist", + "rootDir": "/packages/app/src", + "baseUrl": "/packages/app", + "configFilePath": "/packages/app/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/dep", + "originalPath": "../dep" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app 1 undefined Config: /packages/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/dep/tsconfig.json : { + "rootNames": [ + "/packages/dep/src/index.ts", + "/packages/dep/src/sub/folder/index.ts" + ], + "options": { + "outDir": "/packages/dep/dist", + "rootDir": "/packages/dep/src", + "module": 1, + "configFilePath": "/packages/dep/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/tsconfig.json 2000 undefined Project: /packages/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep 1 undefined Config: /packages/dep/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/app/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/src/index.ts Text-1 "dep" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/app/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/dep/tsconfig.json", + "reason": "Creating project referenced in solution /packages/app/tsconfig.json to find possible configured project for /packages/app/package.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/dep/src/sub/folder/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/dep/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /packages/dep/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/dep/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/sub/folder/index.ts + Imported via "./sub/folder" from file 'src/index.ts' + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/dep/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/app/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 8, + "offset": 18 + }, + "end": { + "line": 8, + "offset": 38 + }, + "text": "Referenced project '/packages/dep' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + }, + { + "start": { + "line": 8, + "offset": 3 + }, + "end": { + "line": 8, + "offset": 15 + }, + "text": "',' expected.", + "code": 1005, + "category": "error", + "fileName": "/packages/app/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/app/package.json", + "configFile": "/packages/dep/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/app/package.json SVC-1-0 "{ \"name\": \"app\", \"dependencies\": { \"dep\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/package.json: *new* + {"pollingInterval":250} +/packages/app/src/index.ts: *new* + {"pollingInterval":500} +/packages/app/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/dep/src/index.ts: *new* + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: *new* + {"pollingInterval":500} +/packages/dep/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: *new* + {} +/packages/dep: *new* + {} +/packages/dep/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /packages/app/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /packages/app/src +Info seq [hh:mm:ss:mss] For info: /packages/app/src/index.ts :: Config file name: /packages/app/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/packages/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/dep/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/app/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/app/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/app/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/packages/app/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/dep: + {} +/packages/dep/src: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'dep'.", + "start": 0, + "length": 3, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 4, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/dep/src 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /packages/dep/src/sub/folder/index.ts Text-1 "export const dep = 0;" + /packages/dep/src/index.ts Text-1 "import \"./sub/folder\";" + + + ../dep/src/sub/folder/index.ts + Imported via "./sub/folder" from file '../dep/src/index.ts' + ../dep/src/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": [ + { + "fixName": "import", + "description": "Add import from \"dep/src/sub/folder\"", + "changes": [ + { + "fileName": "/packages/app/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { dep } from \"dep/src/sub/folder\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/package.json: + {"pollingInterval":250} +/packages/app/tsconfig.json: + {"pollingInterval":2000} +/packages/dep/src/index.ts: + {"pollingInterval":500} +/packages/dep/src/sub/folder/index.ts: + {"pollingInterval":500} +/packages/dep/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/app: + {} +/packages/app/node_modules: *new* + {} +/packages/dep: + {} +/packages/dep/src: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { dep } from \"dep/src/sub/folder\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/app/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportFileExcludePatterns1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportFileExcludePatterns1.js new file mode 100644 index 00000000000..c53853b686e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportFileExcludePatterns1.js @@ -0,0 +1,995 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/index.ts] +S3 + +//// [/project/node_modules/aws-sdk/clients/s3.d.ts] +export declare class S3 {} + +//// [/project/node_modules/aws-sdk/index.d.ts] +export * from "./clients/s3"; + +//// [/project/node_modules/aws-sdk/package.json] +{ "name": "aws-sdk", "version": "2.0.0", "main": "index.js" } + +//// [/project/package.json] +{ "dependencies": "aws-sdk" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/node_modules/aws-sdk/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project/node_modules/aws-sdk +Info seq [hh:mm:ss:mss] For info: /project/node_modules/aws-sdk/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/node_modules/aws-sdk/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/node_modules/aws-sdk/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/node_modules/aws-sdk/package.json SVC-1-0 "{ \"name\": \"aws-sdk\", \"version\": \"2.0.0\", \"main\": \"index.js\" }" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/node_modules/aws-sdk/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/project/node_modules/aws-sdk/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/index.ts SVC-1-0 "S3" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/node_modules/aws-sdk/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/package.json: *new* + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +/project/node_modules/aws-sdk/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "autoImportFileExcludePatterns": [ + "/**/node_modules/aws-sdk" + ] + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "line": 1, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 3 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "autoImportFileExcludePatterns": [ + "/**/node_modules/aws-sdk" + ] + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "autoImportFileExcludePatterns": [ + "/**/node_modules/aws-sdk" + ] + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 7, + "success": true, + "body": [ + { + "message": "Cannot find name 'S3'.", + "start": 0, + "length": 2, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 3 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 3, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 9, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportNodeModuleSymlinkRenamed.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportNodeModuleSymlinkRenamed.js new file mode 100644 index 00000000000..357a7ea8ecd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportNodeModuleSymlinkRenamed.js @@ -0,0 +1,451 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@monorepo/utils] symlink(/packages/utils) +//// [/node_modules/utils] symlink(/packages/utils) +//// [/node_modules/web] symlink(/packages/web) +//// [/package.json] +{ + "name": "monorepo", + "workspaces": ["packages/*"] +} + +//// [/packages/utils/package.json] +{ + "name": "utils", + "version": "1.0.0", + "exports": "./dist/index.js" +} + +//// [/packages/utils/src/index.ts] +export function gainUtility() { return 0; } + +//// [/packages/utils/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "module": "nodenext", + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"] +} + +//// [/packages/web/package.json] +{ + "name": "web", + "version": "1.0.0", + "dependencies": { + "@monorepo/utils": "file:../utils" + } +} + +//// [/packages/web/src/index.ts] +gainUtility + +//// [/packages/web/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "bundler", + "rootDir": "src", + "outDir": "dist", + "emitDeclarationOnly": true + }, + "include": ["src"], + "references": [ + { "path": "../utils" } + ] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /package.json SVC-1-0 "{\n \"name\": \"monorepo\",\n \"workspaces\": [\"packages/*\"]\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/web/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/web/src +Info seq [hh:mm:ss:mss] For info: /packages/web/src/index.ts :: Config file name: /packages/web/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/web/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/web/tsconfig.json 2000 undefined Project: /packages/web/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/web/tsconfig.json", + "reason": "Creating possible configured project for /packages/web/src/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/web/tsconfig.json : { + "rootNames": [ + "/packages/web/src/index.ts" + ], + "options": { + "composite": true, + "module": 99, + "moduleResolution": 100, + "rootDir": "/packages/web/src", + "outDir": "/packages/web/dist", + "emitDeclarationOnly": true, + "configFilePath": "/packages/web/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/utils", + "originalPath": "../utils" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/web/src 1 undefined Config: /packages/web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/web/src 1 undefined Config: /packages/web/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/web/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/utils/tsconfig.json : { + "rootNames": [ + "/packages/utils/src/index.ts" + ], + "options": { + "composite": true, + "module": 199, + "rootDir": "/packages/utils/src", + "outDir": "/packages/utils/dist", + "configFilePath": "/packages/utils/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/utils/tsconfig.json 2000 undefined Project: /packages/web/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/utils/src 1 undefined Config: /packages/utils/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/utils/src 1 undefined Config: /packages/utils/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/web/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/web/src/index.ts SVC-1-0 "gainUtility" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/index.ts + Matched by include pattern 'src' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/web/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/utils/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /packages/utils/src/index.ts Text-1 "export function gainUtility() { return 0; }" + + + ../utils/src/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/web/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/web/src/index.ts", + "configFile": "/packages/web/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /packages/web +Info seq [hh:mm:ss:mss] For info: /packages/web/tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/packages/web/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/web/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/web/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/utils/src/index.ts: *new* + {"pollingInterval":500} +/packages/utils/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/web/package.json: *new* + {"pollingInterval":250} +/packages/web/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/utils/src: *new* + {} +/packages/web/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/web/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/web/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'gainUtility'.", + "start": 0, + "length": 11, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 12 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/web/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/web/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 12, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"@monorepo/utils\"", + "changes": [ + { + "fileName": "/packages/web/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { gainUtility } from \"@monorepo/utils\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/utils/src/index.ts: + {"pollingInterval":500} +/packages/utils/tsconfig.json: + {"pollingInterval":2000} +/packages/web/package.json: + {"pollingInterval":250} +/packages/web/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules: *new* + {} +/packages/utils/src: + {} +/packages/web/src: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider1.js new file mode 100644 index 00000000000..382bea72c3c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider1.js @@ -0,0 +1,446 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +PatternValidator + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@angular/forms/forms.d.ts] +export class PatternValidator {} + +//// [/node_modules/@angular/forms/package.json] +{ "name": "@angular/forms", "typings": "./forms.d.ts" } + +//// [/package.json] +{ "dependencies": { "@angular/forms": "*" } } + +//// [/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@angular/forms/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/@angular/forms +Info seq [hh:mm:ss:mss] For info: /node_modules/@angular/forms/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@angular/forms/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@angular/forms/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@angular/forms/package.json SVC-1-0 "{ \"name\": \"@angular/forms\", \"typings\": \"./forms.d.ts\" }" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@angular/forms/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/@angular/forms/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "PatternValidator" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@angular/forms/forms.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/@angular/forms/forms.d.ts Text-1 "export class PatternValidator {}" + + + node_modules/@angular/forms/forms.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/index.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@angular/forms/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@angular/forms/forms.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/node_modules/@angular/forms/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [ + { + "message": "Cannot find name 'PatternValidator'.", + "start": 0, + "length": 16, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 17 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 17, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 7, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"@angular/forms\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { PatternValidator } from \"@angular/forms\";\n\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@angular/forms/forms.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} +/node_modules/@angular/forms/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { PatternValidator } from \"@angular/forms\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider2.js new file mode 100644 index 00000000000..50173b3fc7d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider2.js @@ -0,0 +1,375 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +IndirectDependency + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/direct-dependency/index.d.ts] +import "indirect-dependency"; +export declare class DirectDependency {} + +//// [/node_modules/direct-dependency/package.json] +{ "name": "direct-dependency", "dependencies": { "indirect-dependency": "*" } } + +//// [/node_modules/indirect-dependency/index.d.ts] +export declare class IndirectDependency + +//// [/node_modules/indirect-dependency/package.json] +{ "name": "indirect-dependency" } + +//// [/package.json] +{ "dependencies": { "direct-dependency": "*" } } + +//// [/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/direct-dependency/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/direct-dependency +Info seq [hh:mm:ss:mss] For info: /node_modules/direct-dependency/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/direct-dependency/package.json SVC-1-0 "{ \"name\": \"direct-dependency\", \"dependencies\": { \"indirect-dependency\": \"*\" } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/direct-dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "IndirectDependency" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/direct-dependency/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/indirect-dependency/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/indirect-dependency/index.d.ts Text-1 "export declare class IndirectDependency" + /node_modules/direct-dependency/index.d.ts Text-1 "import \"indirect-dependency\";\nexport declare class DirectDependency {}" + + + node_modules/indirect-dependency/index.d.ts + Imported via "indirect-dependency" from file 'node_modules/direct-dependency/index.d.ts' + node_modules/direct-dependency/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/index.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/direct-dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/direct-dependency/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/indirect-dependency/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [ + { + "message": "Cannot find name 'IndirectDependency'.", + "start": 0, + "length": 18, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 19 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 19, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 7, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider3.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider3.js new file mode 100644 index 00000000000..4eda5b5265d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider3.js @@ -0,0 +1,776 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/common-dependency/index.d.ts] +export declare class CommonDependency {} + +//// [/node_modules/common-dependency/package.json] +{ "name": "common-dependency" } + +//// [/node_modules/package-dependency/index.d.ts] +export declare class PackageDependency + +//// [/node_modules/package-dependency/package.json] +{ "name": "package-dependency" } + +//// [/package.json] +{ "private": true, "dependencies": { "common-dependency": "*" } } + +//// [/packages/a/index.ts] + + +//// [/packages/a/package.json] +{ "peerDependencies": { "package-dependency": "*" } } + +//// [/packages/a/tsconfig.json] +{ "compilerOptions": { "target": "esnext", "composite": true } } + +//// [/tsconfig.json] +{ "files": [], "references": [{ "path": "packages/a" }] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/common-dependency/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/common-dependency +Info seq [hh:mm:ss:mss] For info: /node_modules/common-dependency/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/common-dependency/package.json SVC-1-0 "{ \"name\": \"common-dependency\" }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/common-dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/a/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/a +Info seq [hh:mm:ss:mss] For info: /packages/a/index.ts :: Config file name: /packages/a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/a/tsconfig.json 2000 undefined Project: /packages/a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/a/tsconfig.json", + "reason": "Creating possible configured project for /packages/a/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/a/tsconfig.json : { + "rootNames": [ + "/packages/a/index.ts" + ], + "options": { + "target": 99, + "composite": true, + "configFilePath": "/packages/a/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/a 1 undefined Config: /packages/a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/a 1 undefined Config: /packages/a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.esnext.full.d.ts 500 undefined Project: /packages/a/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + /packages/a/index.ts SVC-1-0 "" + + + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/a/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 2 root files in 2 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/package-dependency/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/common-dependency/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/package-dependency/index.d.ts Text-1 "export declare class PackageDependency" + /node_modules/common-dependency/index.d.ts Text-1 "export declare class CommonDependency {}" + + + ../../node_modules/package-dependency/index.d.ts + Root file specified for compilation + ../../node_modules/common-dependency/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/a/index.ts", + "configFile": "/packages/a/tsconfig.json", + "diagnostics": [ + { + "text": "File '/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 34 + }, + "end": { + "line": 1, + "offset": 42 + }, + "file": "/packages/a/tsconfig.json" + }, + "message": "File is default library for target specified here.", + "category": "message", + "code": 1426 + } + ] + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Search path: /packages/a +Info seq [hh:mm:ss:mss] For info: /packages/a/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/packages/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/common-dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/a/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/node_modules/common-dependency/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/package-dependency/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/packages/a/package.json: *new* + {"pollingInterval":250} +/packages/a/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/a: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/packages/a/index.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "CommonDependency", + "kind": "class", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/common-dependency/index", + "isPackageJsonImport": true, + "data": { + "exportName": "CommonDependency", + "exportMapKey": "16 * CommonDependency ", + "fileName": "/node_modules/common-dependency/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "PackageDependency", + "kind": "class", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/package-dependency/index", + "isPackageJsonImport": true, + "data": { + "exportName": "PackageDependency", + "exportMapKey": "17 * PackageDependency ", + "fileName": "/node_modules/package-dependency/index.d.ts", + "isPackageJsonImport": true + } + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js new file mode 100644 index 00000000000..d01ba11e79a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js @@ -0,0 +1,590 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/index.ts] +new Shape + +//// [/a/node_modules/b] symlink(/b) +//// [/a/package.json] +{ "dependencies": { "b": "*" } } + +//// [/a/tsconfig.json] +{ "compilerOptions": { "module": "commonjs", "target": "esnext" }, "references": [{ "path": "../b" }] } + +//// [/b/index.ts] +export class Shape {} + +//// [/b/package.json] +{ "types": "out/index.d.ts" } + +//// [/b/tsconfig.json] +{ "compilerOptions": { "outDir": "out", "composite": true } } + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/package.json :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/index.ts" + ], + "options": { + "module": 1, + "target": 99, + "configFilePath": "/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/b", + "originalPath": "../b" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /a 1 undefined Config: /a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /a 1 undefined Config: /a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/index.ts" + ], + "options": { + "outDir": "/b/out", + "composite": true, + "configFilePath": "/b/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /b 1 undefined Config: /b/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /b 1 undefined Config: /b/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.esnext.full.d.ts 500 undefined Project: /a/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + /a/index.ts Text-1 "new Shape" + + + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating project referenced in solution /a/tsconfig.json to find possible configured project for /a/package.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "export class Shape {}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/package.json", + "configFile": "/a/tsconfig.json", + "diagnostics": [ + { + "text": "File '/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 56 + }, + "end": { + "line": 1, + "offset": 64 + }, + "file": "/a/tsconfig.json" + }, + "message": "File is default library for target specified here.", + "category": "message", + "code": 1426 + } + ] + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/package.json", + "configFile": "/b/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/package.json SVC-1-0 "{ \"dependencies\": { \"b\": \"*\" } }" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /b/index.ts Text-1 "export class Shape {}" + + + ../b/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a/index.ts: *new* + {"pollingInterval":500} +/a/package.json: *new* + {"pollingInterval":250} +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/b/index.ts: *new* + {"pollingInterval":500} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: *new* + {} +/b: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/index.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +After Request +watchedFiles:: +/a/package.json: + {"pollingInterval":250} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/a/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: + {} +/b: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'Shape'.", + "start": 4, + "length": 5, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 5 + }, + "endLocation": { + "line": 1, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "startLine": 1, + "startOffset": 5, + "endLine": 1, + "endOffset": 10, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /b/index.ts Text-1 "export class Shape {}" + + + ../b/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": [ + { + "fixName": "import", + "description": "Add import from \"b\"", + "changes": [ + { + "fileName": "/a/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { Shape } from \"b\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/a/package.json: + {"pollingInterval":250} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: + {} +/a/node_modules: *new* + {} +/b: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { Shape } from \"b\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider5.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider5.js new file mode 100644 index 00000000000..c0645cdd2aa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider5.js @@ -0,0 +1,410 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +useForm + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/react-hook-form/dist/index.d.ts] +export * from "./useForm"; + +//// [/node_modules/react-hook-form/dist/useForm.d.ts] +export declare function useForm(): void; + +//// [/node_modules/react-hook-form/package.json] +{ "types": "dist/index.d.ts" } + +//// [/package.json] +{ "dependencies": { "react-hook-form": "*" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /package.json SVC-1-0 "{ \"dependencies\": { \"react-hook-form\": \"*\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react-hook-form/dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react-hook-form/dist/useForm.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/react-hook-form/dist/useForm.d.ts Text-1 "export declare function useForm(): void;" + /node_modules/react-hook-form/dist/index.d.ts Text-1 "export * from \"./useForm\";" + + + node_modules/react-hook-form/dist/useForm.d.ts + Imported via "./useForm" from file 'node_modules/react-hook-form/dist/index.d.ts' + node_modules/react-hook-form/dist/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/react-hook-form/dist/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/react-hook-form/dist/useForm.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "useForm" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/react-hook-form/dist/useForm.d.ts Text-1 "export declare function useForm(): void;" + /node_modules/react-hook-form/dist/index.d.ts Text-1 "export * from \"./useForm\";" + + + node_modules/react-hook-form/dist/useForm.d.ts + Imported via "./useForm" from file 'node_modules/react-hook-form/dist/index.d.ts' + node_modules/react-hook-form/dist/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'useForm'.", + "start": 0, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"react-hook-form\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { useForm } from \"react-hook-form\";\r\n\r\n" + } + ] + } + ] + }, + { + "fixName": "import", + "description": "Add import from \"react-hook-form/dist/useForm\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { useForm } from \"react-hook-form/dist/useForm\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/react-hook-form/dist/index.d.ts: + {"pollingInterval":500} +/node_modules/react-hook-form/dist/useForm.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +/node_modules: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { useForm } from \"react-hook-form\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { useForm } from \"react-hook-form/dist/useForm\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js new file mode 100644 index 00000000000..c615e7a719e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js @@ -0,0 +1,1434 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +Component + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/lib.es2015.collection.d.ts] +lib.es2015.collection.d.ts-Text + +//// [/lib.es2015.core.d.ts] +lib.es2015.core.d.ts-Text + +//// [/lib.es2015.d.ts] +lib.es2015.d.ts-Text + +//// [/lib.es2015.generator.d.ts] +lib.es2015.generator.d.ts-Text + +//// [/lib.es2015.iterable.d.ts] +lib.es2015.iterable.d.ts-Text + +//// [/lib.es2015.promise.d.ts] +lib.es2015.promise.d.ts-Text + +//// [/lib.es2015.proxy.d.ts] +lib.es2015.proxy.d.ts-Text + +//// [/lib.es2015.reflect.d.ts] +lib.es2015.reflect.d.ts-Text + +//// [/lib.es2015.symbol.d.ts] +lib.es2015.symbol.d.ts-Text + +//// [/lib.es2015.symbol.wellknown.d.ts] +lib.es2015.symbol.wellknown.d.ts-Text + +//// [/lib.es2016.array.include.d.ts] +lib.es2016.array.include.d.ts-Text + +//// [/lib.es2016.d.ts] +lib.es2016.d.ts-Text + +//// [/lib.es2017.d.ts] +lib.es2017.d.ts-Text + +//// [/lib.es2017.date.d.ts] +lib.es2017.date.d.ts-Text + +//// [/lib.es2017.intl.d.ts] +lib.es2017.intl.d.ts-Text + +//// [/lib.es2017.object.d.ts] +lib.es2017.object.d.ts-Text + +//// [/lib.es2017.sharedmemory.d.ts] +lib.es2017.sharedmemory.d.ts-Text + +//// [/lib.es2017.string.d.ts] +lib.es2017.string.d.ts-Text + +//// [/lib.es2017.typedarrays.d.ts] +lib.es2017.typedarrays.d.ts-Text + +//// [/lib.es2018.asyncgenerator.d.ts] +lib.es2018.asyncgenerator.d.ts-Text + +//// [/lib.es2018.asynciterable.d.ts] +lib.es2018.asynciterable.d.ts-Text + +//// [/lib.es2018.d.ts] +lib.es2018.d.ts-Text + +//// [/lib.es2018.intl.d.ts] +lib.es2018.intl.d.ts-Text + +//// [/lib.es2018.promise.d.ts] +lib.es2018.promise.d.ts-Text + +//// [/lib.es2018.regexp.d.ts] +lib.es2018.regexp.d.ts-Text + +//// [/lib.es2019.array.d.ts] +lib.es2019.array.d.ts-Text + +//// [/lib.es2019.d.ts] +lib.es2019.d.ts-Text + +//// [/lib.es2019.intl.d.ts] +lib.es2019.intl.d.ts-Text + +//// [/lib.es2019.object.d.ts] +lib.es2019.object.d.ts-Text + +//// [/lib.es2019.string.d.ts] +lib.es2019.string.d.ts-Text + +//// [/lib.es2019.symbol.d.ts] +lib.es2019.symbol.d.ts-Text + +//// [/lib.es5.d.ts] +lib.d.ts-Text + +//// [/node_modules/@types/react/index.d.ts] +export declare function Component(): void; + +//// [/node_modules/antd/index.d.ts] +import "react"; + +//// [/package.json] +{ "dependencies": { "antd": "*", "react": "*" } } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs", "lib": ["es2019"] } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/lib.es2015.collection.d.ts", + "/lib.es2015.core.d.ts", + "/lib.es2015.d.ts", + "/lib.es2015.generator.d.ts", + "/lib.es2015.iterable.d.ts", + "/lib.es2015.promise.d.ts", + "/lib.es2015.proxy.d.ts", + "/lib.es2015.reflect.d.ts", + "/lib.es2015.symbol.d.ts", + "/lib.es2015.symbol.wellknown.d.ts", + "/lib.es2016.array.include.d.ts", + "/lib.es2016.d.ts", + "/lib.es2017.d.ts", + "/lib.es2017.date.d.ts", + "/lib.es2017.intl.d.ts", + "/lib.es2017.object.d.ts", + "/lib.es2017.sharedmemory.d.ts", + "/lib.es2017.string.d.ts", + "/lib.es2017.typedarrays.d.ts", + "/lib.es2018.asyncgenerator.d.ts", + "/lib.es2018.asynciterable.d.ts", + "/lib.es2018.d.ts", + "/lib.es2018.intl.d.ts", + "/lib.es2018.promise.d.ts", + "/lib.es2018.regexp.d.ts", + "/lib.es2019.array.d.ts", + "/lib.es2019.d.ts", + "/lib.es2019.intl.d.ts", + "/lib.es2019.object.d.ts", + "/lib.es2019.string.d.ts", + "/lib.es2019.symbol.d.ts", + "/lib.es5.d.ts" + ], + "options": { + "module": 1, + "lib": [ + "lib.es2019.d.ts" + ], + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.collection.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.core.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.generator.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.iterable.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.promise.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.proxy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.reflect.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.symbol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2015.symbol.wellknown.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2016.array.include.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2016.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.date.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.intl.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.object.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.sharedmemory.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.string.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2017.typedarrays.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.asyncgenerator.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.asynciterable.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.intl.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.promise.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2018.regexp.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.array.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.intl.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.object.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.string.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2019.symbol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es5.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (37) + /lib.es5.d.ts Text-1 lib.d.ts-Text + /lib.es2015.generator.d.ts Text-1 lib.es2015.generator.d.ts-Text + /lib.es2015.iterable.d.ts Text-1 lib.es2015.iterable.d.ts-Text + /lib.es2015.promise.d.ts Text-1 lib.es2015.promise.d.ts-Text + /lib.es2015.proxy.d.ts Text-1 lib.es2015.proxy.d.ts-Text + /lib.es2015.reflect.d.ts Text-1 lib.es2015.reflect.d.ts-Text + /lib.es2015.symbol.d.ts Text-1 lib.es2015.symbol.d.ts-Text + /lib.es2015.symbol.wellknown.d.ts Text-1 lib.es2015.symbol.wellknown.d.ts-Text + /lib.es2017.date.d.ts Text-1 lib.es2017.date.d.ts-Text + /lib.es2017.object.d.ts Text-1 lib.es2017.object.d.ts-Text + /lib.es2017.sharedmemory.d.ts Text-1 lib.es2017.sharedmemory.d.ts-Text + /lib.es2017.string.d.ts Text-1 lib.es2017.string.d.ts-Text + /lib.es2017.intl.d.ts Text-1 lib.es2017.intl.d.ts-Text + /lib.es2017.typedarrays.d.ts Text-1 lib.es2017.typedarrays.d.ts-Text + /lib.es2018.asynciterable.d.ts Text-1 lib.es2018.asynciterable.d.ts-Text + /lib.es2018.intl.d.ts Text-1 lib.es2018.intl.d.ts-Text + /lib.es2018.promise.d.ts Text-1 lib.es2018.promise.d.ts-Text + /lib.es2018.regexp.d.ts Text-1 lib.es2018.regexp.d.ts-Text + /lib.es2019.object.d.ts Text-1 lib.es2019.object.d.ts-Text + /lib.es2019.string.d.ts Text-1 lib.es2019.string.d.ts-Text + /lib.es2019.symbol.d.ts Text-1 lib.es2019.symbol.d.ts-Text + /lib.es2019.intl.d.ts Text-1 lib.es2019.intl.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "Component" + /lib.d.ts Text-1 lib.d.ts-Text + /lib.es2015.collection.d.ts Text-1 lib.es2015.collection.d.ts-Text + /lib.es2015.core.d.ts Text-1 lib.es2015.core.d.ts-Text + /lib.es2015.d.ts Text-1 lib.es2015.d.ts-Text + /lib.es2016.array.include.d.ts Text-1 lib.es2016.array.include.d.ts-Text + /lib.es2016.d.ts Text-1 lib.es2016.d.ts-Text + /lib.es2017.d.ts Text-1 lib.es2017.d.ts-Text + /lib.es2018.asyncgenerator.d.ts Text-1 lib.es2018.asyncgenerator.d.ts-Text + /lib.es2018.d.ts Text-1 lib.es2018.d.ts-Text + /lib.es2019.array.d.ts Text-1 lib.es2019.array.d.ts-Text + /lib.es2019.d.ts Text-1 lib.es2019.d.ts-Text + /node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + lib.es5.d.ts + Library referenced via 'es5' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + lib.es2015.generator.d.ts + Library referenced via 'es2015.generator' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + lib.es2015.iterable.d.ts + Library referenced via 'es2015.iterable' from file 'lib.es2015.d.ts' + Library referenced via 'es2015.iterable' from file 'lib.es2015.generator.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'es2015.iterable' from file 'lib.es2018.asynciterable.d.ts' + Library referenced via 'es2015.iterable' from file 'lib.es2019.object.d.ts' + lib.es2015.promise.d.ts + Library referenced via 'es2015.promise' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + lib.es2015.proxy.d.ts + Library referenced via 'es2015.proxy' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + lib.es2015.reflect.d.ts + Library referenced via 'es2015.reflect' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + lib.es2015.symbol.d.ts + Library referenced via 'es2015.symbol' from file 'lib.es2015.iterable.d.ts' + Library referenced via 'es2015.symbol' from file 'lib.es2015.d.ts' + Library referenced via 'es2015.symbol' from file 'lib.es2015.symbol.wellknown.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'es2015.symbol' from file 'lib.es2017.sharedmemory.d.ts' + Library referenced via 'es2015.symbol' from file 'lib.es2018.asynciterable.d.ts' + lib.es2015.symbol.wellknown.d.ts + Library referenced via 'es2015.symbol.wellknown' from file 'lib.es2015.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'es2015.symbol.wellknown' from file 'lib.es2017.sharedmemory.d.ts' + lib.es2017.date.d.ts + Library referenced via 'es2017.date' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2017.object.d.ts + Library referenced via 'es2017.object' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2017.sharedmemory.d.ts + Library referenced via 'es2017.sharedmemory' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2017.string.d.ts + Library referenced via 'es2017.string' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2017.intl.d.ts + Library referenced via 'es2017.intl' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2017.typedarrays.d.ts + Library referenced via 'es2017.typedarrays' from file 'lib.es2017.d.ts' + Matched by default include pattern '**/*' + lib.es2018.asynciterable.d.ts + Library referenced via 'es2018.asynciterable' from file 'lib.es2018.asyncgenerator.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'es2018.asynciterable' from file 'lib.es2018.d.ts' + lib.es2018.intl.d.ts + Library referenced via 'es2018.intl' from file 'lib.es2018.d.ts' + Matched by default include pattern '**/*' + lib.es2018.promise.d.ts + Library referenced via 'es2018.promise' from file 'lib.es2018.d.ts' + Matched by default include pattern '**/*' + lib.es2018.regexp.d.ts + Library referenced via 'es2018.regexp' from file 'lib.es2018.d.ts' + Matched by default include pattern '**/*' + lib.es2019.object.d.ts + Library referenced via 'es2019.object' from file 'lib.es2019.d.ts' + Matched by default include pattern '**/*' + lib.es2019.string.d.ts + Library referenced via 'es2019.string' from file 'lib.es2019.d.ts' + Matched by default include pattern '**/*' + lib.es2019.symbol.d.ts + Library referenced via 'es2019.symbol' from file 'lib.es2019.d.ts' + Matched by default include pattern '**/*' + lib.es2019.intl.d.ts + Library referenced via 'es2019.intl' from file 'lib.es2019.d.ts' + Matched by default include pattern '**/*' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'decorators' from file 'lib.es5.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + Library referenced via 'decorators.legacy' from file 'lib.es5.d.ts' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + lib.es2015.collection.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2015.collection' from file 'lib.es2015.d.ts' + lib.es2015.core.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2015.core' from file 'lib.es2015.d.ts' + lib.es2015.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2015' from file 'lib.es2016.d.ts' + lib.es2016.array.include.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2016.array.include' from file 'lib.es2016.d.ts' + lib.es2016.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2016' from file 'lib.es2017.d.ts' + lib.es2017.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2017' from file 'lib.es2018.d.ts' + lib.es2018.asyncgenerator.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2018.asyncgenerator' from file 'lib.es2018.d.ts' + lib.es2018.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2018' from file 'lib.es2019.d.ts' + lib.es2019.array.d.ts + Matched by default include pattern '**/*' + Library referenced via 'es2019.array' from file 'lib.es2019.d.ts' + lib.es2019.d.ts + Matched by default include pattern '**/*' + node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\", \"lib\": [\"es2019\"] } }" + /node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (37) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.collection.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.core.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.generator.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.iterable.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.promise.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.proxy.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.reflect.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.symbol.d.ts: *new* + {"pollingInterval":500} +/lib.es2015.symbol.wellknown.d.ts: *new* + {"pollingInterval":500} +/lib.es2016.array.include.d.ts: *new* + {"pollingInterval":500} +/lib.es2016.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.date.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.intl.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.object.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.sharedmemory.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.string.d.ts: *new* + {"pollingInterval":500} +/lib.es2017.typedarrays.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.asyncgenerator.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.asynciterable.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.intl.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.promise.d.ts: *new* + {"pollingInterval":500} +/lib.es2018.regexp.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.array.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.intl.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.object.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.string.d.ts: *new* + {"pollingInterval":500} +/lib.es2019.symbol.d.ts: *new* + {"pollingInterval":500} +/lib.es5.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/react/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (37) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.es2015.collection.d.ts: + {"pollingInterval":500} +/lib.es2015.core.d.ts: + {"pollingInterval":500} +/lib.es2015.d.ts: + {"pollingInterval":500} +/lib.es2015.generator.d.ts: + {"pollingInterval":500} +/lib.es2015.iterable.d.ts: + {"pollingInterval":500} +/lib.es2015.promise.d.ts: + {"pollingInterval":500} +/lib.es2015.proxy.d.ts: + {"pollingInterval":500} +/lib.es2015.reflect.d.ts: + {"pollingInterval":500} +/lib.es2015.symbol.d.ts: + {"pollingInterval":500} +/lib.es2015.symbol.wellknown.d.ts: + {"pollingInterval":500} +/lib.es2016.array.include.d.ts: + {"pollingInterval":500} +/lib.es2016.d.ts: + {"pollingInterval":500} +/lib.es2017.d.ts: + {"pollingInterval":500} +/lib.es2017.date.d.ts: + {"pollingInterval":500} +/lib.es2017.intl.d.ts: + {"pollingInterval":500} +/lib.es2017.object.d.ts: + {"pollingInterval":500} +/lib.es2017.sharedmemory.d.ts: + {"pollingInterval":500} +/lib.es2017.string.d.ts: + {"pollingInterval":500} +/lib.es2017.typedarrays.d.ts: + {"pollingInterval":500} +/lib.es2018.asyncgenerator.d.ts: + {"pollingInterval":500} +/lib.es2018.asynciterable.d.ts: + {"pollingInterval":500} +/lib.es2018.d.ts: + {"pollingInterval":500} +/lib.es2018.intl.d.ts: + {"pollingInterval":500} +/lib.es2018.promise.d.ts: + {"pollingInterval":500} +/lib.es2018.regexp.d.ts: + {"pollingInterval":500} +/lib.es2019.array.d.ts: + {"pollingInterval":500} +/lib.es2019.d.ts: + {"pollingInterval":500} +/lib.es2019.intl.d.ts: + {"pollingInterval":500} +/lib.es2019.object.d.ts: + {"pollingInterval":500} +/lib.es2019.string.d.ts: + {"pollingInterval":500} +/lib.es2019.symbol.d.ts: + {"pollingInterval":500} +/lib.es5.d.ts: + {"pollingInterval":500} +/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 10 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Atomics", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Map", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Promise", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Proxy", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Reflect", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Set", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "SharedArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Symbol", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "WeakMap", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "WeakSet", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Component", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "Component", + "exportMapKey": "9 * Component ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js new file mode 100644 index 00000000000..bf659d12c68 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js @@ -0,0 +1,1273 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/mylib] symlink(/packages/mylib) +//// [/package.json] +{ "dependencies": { "mylib": "file:packages/mylib" } } + +//// [/packages/mylib/index.ts] +export * from "./mySubDir"; + +//// [/packages/mylib/mySubDir/index.ts] +export * from "./myClass"; +export * from "./myClass2"; + +//// [/packages/mylib/mySubDir/myClass.ts] +export class MyClass {} + +//// [/packages/mylib/mySubDir/myClass2.ts] +export class MyClass2 {} + +//// [/packages/mylib/package.json] +{ "name": "mylib", "version": "1.0.0", "main": "index.js", "types": "index" } + +//// [/src/index.ts] + +const a = new MyClass(); +const b = new MyClass2(); + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/packages/mylib/index.ts", + "/packages/mylib/mySubDir/index.ts", + "/packages/mylib/mySubDir/myClass.ts", + "/packages/mylib/mySubDir/myClass2.ts", + "/src/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + /src/index.ts Text-1 "\nconst a = new MyClass();\nconst b = new MyClass2();" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass.ts + Imported via "./myClass" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass2.ts + Imported via "./myClass2" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/index.ts + Imported via "./mySubDir" from file 'packages/mylib/index.ts' + Matched by default include pattern '**/*' + packages/mylib/index.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + + + packages/mylib/mySubDir/myClass.ts + Imported via "./myClass" from file 'packages/mylib/mySubDir/index.ts' + packages/mylib/mySubDir/myClass2.ts + Imported via "./myClass2" from file 'packages/mylib/mySubDir/index.ts' + packages/mylib/mySubDir/index.ts + Imported via "./mySubDir" from file 'packages/mylib/index.ts' + packages/mylib/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/packages/mylib/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: *new* + {"pollingInterval":500} +/src/index.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/packages/mylib/mySubDir: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/mylib/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/packages/mylib/mySubDir: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 4 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 15 + }, + "end": { + "line": 2, + "offset": 22 + } + }, + "entries": [ + { + "name": "b", + "kind": "const", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "MyClass", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "mylib", + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass", + "exportMapKey": "7 * MyClass ", + "moduleSpecifier": "mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "MyClass2", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "mylib", + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass2", + "exportMapKey": "8 * MyClass2 ", + "moduleSpecifier": "mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/mylib/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} +/packages/mylib/mySubDir: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22, + "entryNames": [ + { + "name": "MyClass", + "source": "mylib", + "data": { + "exportName": "MyClass", + "fileName": "/packages/mylib/index.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 6, + "success": true, + "body": [ + { + "name": "MyClass", + "kindModifiers": "export", + "kind": "constructor", + "displayParts": [ + { + "text": "constructor", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"mylib\"", + "changes": [ + { + "fileName": "/src/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { MyClass } from \"mylib\";\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "mylib", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { MyClass } from \"mylib\";\n" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js new file mode 100644 index 00000000000..ed4a29586b0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js @@ -0,0 +1,1273 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/mylib] symlink(/packages/mylib) +//// [/package.json] +{ "dependencies": { "mylib": "file:packages/mylib" } } + +//// [/packages/mylib/index.ts] +export * from "./mySubDir"; + +//// [/packages/mylib/mySubDir/index.ts] +export * from "./myClass"; +export * from "./myClass2"; + +//// [/packages/mylib/mySubDir/myClass.ts] +export class MyClass {} + +//// [/packages/mylib/mySubDir/myClass2.ts] +export class MyClass2 {} + +//// [/packages/mylib/package.json] +{ "name": "mylib", "version": "1.0.0" } + +//// [/src/index.ts] + +const a = new MyClass(); +const b = new MyClass2(); + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/packages/mylib/index.ts", + "/packages/mylib/mySubDir/index.ts", + "/packages/mylib/mySubDir/myClass.ts", + "/packages/mylib/mySubDir/myClass2.ts", + "/src/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + /src/index.ts Text-1 "\nconst a = new MyClass();\nconst b = new MyClass2();" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass.ts + Imported via "./myClass" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass2.ts + Imported via "./myClass2" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/index.ts + Imported via "./mySubDir" from file 'packages/mylib/index.ts' + Matched by default include pattern '**/*' + packages/mylib/index.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /dev/null/autoImportProviderProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + + + packages/mylib/mySubDir/myClass.ts + Imported via "./myClass" from file 'packages/mylib/mySubDir/index.ts' + packages/mylib/mySubDir/myClass2.ts + Imported via "./myClass2" from file 'packages/mylib/mySubDir/index.ts' + packages/mylib/mySubDir/index.ts + Imported via "./mySubDir" from file 'packages/mylib/index.ts' + packages/mylib/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/packages/mylib/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: *new* + {"pollingInterval":500} +/src/index.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/packages/mylib/mySubDir: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/mylib/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/packages/mylib/mySubDir: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 4 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 15 + }, + "end": { + "line": 2, + "offset": 22 + } + }, + "entries": [ + { + "name": "b", + "kind": "const", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "MyClass", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "mylib", + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass", + "exportMapKey": "7 * MyClass ", + "moduleSpecifier": "mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "MyClass2", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "mylib", + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass2", + "exportMapKey": "8 * MyClass2 ", + "moduleSpecifier": "mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/packages/mylib/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} +/packages/mylib/mySubDir: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22, + "entryNames": [ + { + "name": "MyClass", + "source": "mylib", + "data": { + "exportName": "MyClass", + "fileName": "/packages/mylib/index.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 6, + "success": true, + "body": [ + { + "name": "MyClass", + "kindModifiers": "export", + "kind": "constructor", + "displayParts": [ + { + "text": "constructor", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"mylib\"", + "changes": [ + { + "fileName": "/src/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { MyClass } from \"mylib\";\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "mylib", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { MyClass } from \"mylib\";\n" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js new file mode 100644 index 00000000000..da0959a3e1a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js @@ -0,0 +1,1043 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + ".": { + "types": "./lib/index.d.ts" + }, + "./lol": { + "types": "./lib/lol.d.ts" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 2 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /node_modules/dependency/lib/lol.d.ts Text-1 "export function fooFromLol(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 2 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js new file mode 100644 index 00000000000..c1cc6b41030 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js @@ -0,0 +1,1034 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "types": "./lib/index.d.ts" + }, + "./lol": { + "types": "./lib/lol.d.ts" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js new file mode 100644 index 00000000000..495d159dbe1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js @@ -0,0 +1,1038 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "name": "dependency", + "version": "1.0.0", + "main": "./lib/index.js", + "exports": "./lib/lol.d.ts" +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 2 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /node_modules/dependency/lib/lol.d.ts Text-1 "export function fooFromLol(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/dependency/package.json' does not have field "type" + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/dependency/package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js new file mode 100644 index 00000000000..0144a7524bb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js @@ -0,0 +1,1010 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + "types": "./lib/index.d.ts", + "require": "./lib/lol.js" + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js new file mode 100644 index 00000000000..3ee8301f7bf --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js @@ -0,0 +1,1077 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/dependency/lib/index.d.ts] +export declare function fooFromIndex(): void; + +//// [/node_modules/@types/dependency/lib/lol.d.ts] +export declare function fooFromLol(): void; + +//// [/node_modules/@types/dependency/package.json] +{ + "type": "module", + "name": "@types/dependency", + "version": "1.0.0", + "exports": { + ".": "./lib/index.d.ts", + "./lol": "./lib/lol.d.ts" + } +} + +//// [/node_modules/dependency/lib/index.js] +export function fooFromIndex() {} + +//// [/node_modules/dependency/lib/lol.js] +export function fooFromLol() {} + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + ".": "./lib/index.js", + "./lol": "./lib/lol.js" + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/lib/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + /node_modules/@types/dependency/lib/index.d.ts Text-1 "export declare function fooFromIndex(): void;" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + node_modules/@types/dependency/lib/index.d.ts + Entry point for implicit type library 'dependency' with packageId '@types/dependency/lib/index.d.ts@1.0.0' + File is ECMAScript module because 'node_modules/@types/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/node_modules/@types/dependency/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/lib/package.json: + {"pollingInterval":2000} +/node_modules/@types/dependency/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/@types/dependency/lib/lol.d.ts Text-1 "export declare function fooFromLol(): void;" + + + node_modules/@types/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/@types/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 2 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/@types/dependency/lib/index.d.ts" + } + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/@types/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/dependency/lib/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/node_modules/@types/dependency/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js new file mode 100644 index 00000000000..a80633575ae --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js @@ -0,0 +1,1084 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/dependency/lib/index.d.ts] +export declare function fooFromAtTypesIndex(): void; + +//// [/node_modules/@types/dependency/lib/lol.d.ts] +export declare function fooFromAtTypesLol(): void; + +//// [/node_modules/@types/dependency/package.json] +{ + "type": "module", + "name": "@types/dependency", + "version": "1.0.0", + "exports": { + ".": "./lib/index.d.ts", + "./lol": "./lib/lol.d.ts" + } +} + +//// [/node_modules/dependency/lib/index.d.ts] +export declare function fooFromIndex(): void + +//// [/node_modules/dependency/lib/index.js] +export function fooFromIndex() {} + +//// [/node_modules/dependency/lib/lol.d.ts] +export declare function fooFromLol(): void + +//// [/node_modules/dependency/lib/lol.js] +export function fooFromLol() {} + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + ".": "./lib/index.js", + "./lol": "./lib/lol.js" + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + }, + "devDependencies": { + "@types/dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/foo.ts Text-1 "fooFrom" + /node_modules/dependency/lib/index.d.ts Text-1 "export declare function fooFromIndex(): void" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + node_modules/dependency/lib/index.d.ts + Entry point for implicit type library 'dependency' with packageId 'dependency/lib/index.d.ts@1.0.0' + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/dependency/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/lol.d.ts Text-1 "export declare function fooFromLol(): void" + + + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 2 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/index.d.ts" + } + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/dependency/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js new file mode 100644 index 00000000000..703baaf30d4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js @@ -0,0 +1,1066 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + ".": { + "types": "./lib/index.d.ts" + }, + "./lol": { + "types": "./lib/lol.d.ts" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/bar.ts] +import { fooFromIndex } from "dependency"; + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/bar.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/bar.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /src/bar.ts Text-1 "import { fooFromIndex } from \"dependency\";" + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + node_modules/dependency/lib/index.d.ts + Imported via "dependency" from file 'src/bar.ts' with packageId 'dependency/lib/index.d.ts@1.0.0' + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + src/bar.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/src/bar.ts: *new* + {"pollingInterval":500} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/lol.d.ts Text-1 "export function fooFromLol(): void;" + + + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 2 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency", + "sourceDisplay": [ + { + "text": "dependency", + "kind": "text" + } + ], + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency", + "fileName": "/node_modules/dependency/lib/index.d.ts" + } + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js new file mode 100644 index 00000000000..ce53878bb5e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js @@ -0,0 +1,1883 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + "./lol": { + "import": "./lib/index.js", + "require": "./lib/lol.js" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/bar.ts] +import { fooFromIndex } from "dependency"; + +//// [/src/foo.cts] +fooFrom + +//// [/src/foo.mts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/bar.ts", + "/src/foo.cts", + "/src/foo.mts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/bar.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.cts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/bar.ts Text-1 "import { fooFromIndex } from \"dependency\";" + /src/foo.cts Text-1 "fooFrom" + /src/foo.mts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/bar.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/foo.cts + Matched by default include pattern '**/*' + src/foo.mts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/bar.ts: *new* + {"pollingInterval":500} +/src/foo.cts: *new* + {"pollingInterval":500} +/src/foo.mts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.cts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.cts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.cts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.cts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/src/foo.mts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.cts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.cts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 2 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /node_modules/dependency/lib/lol.d.ts Text-1 "export function fooFromLol(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromLol", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromLol", + "exportMapKey": "10 * fooFromLol ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/lol.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/src/foo.mts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/foo.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.mts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.cts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /src/foo.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.mts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/src/foo.mts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/node_modules: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js new file mode 100644 index 00000000000..e80f2ff86cd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js @@ -0,0 +1,1024 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + "./lol": ["./lib/index.js", "./lib/lol.js"] + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/bar.ts] +import { fooFromIndex } from "dependency"; + +//// [/src/foo.ts] +fooFrom + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/src/bar.ts", + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/bar.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /src/bar.ts Text-1 "import { fooFromIndex } from \"dependency\";" + /src/foo.ts Text-1 "fooFrom" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + src/bar.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/foo.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/src/bar.ts: *new* + {"pollingInterval":500} +/src/foo.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/foo.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 8 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 8 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "fooFromIndex", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "dependency/lol", + "sourceDisplay": [ + { + "text": "dependency/lol", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "fooFromIndex", + "exportMapKey": "12 * fooFromIndex ", + "moduleSpecifier": "dependency/lol", + "fileName": "/node_modules/dependency/lib/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/src/bar.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_globalTypingsCache.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_globalTypingsCache.js new file mode 100644 index 00000000000..7d3041aa5ba --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_globalTypingsCache.js @@ -0,0 +1,951 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts] +export class BrowserRouterFromDts {} + +//// [/Library/Caches/typescript/node_modules/@types/react-router-dom/package.json] +{ "name": "@types/react-router-dom", "version": "16.8.4", "types": "index.d.ts" } + +//// [/project/index.js] +BrowserRouter + +//// [/project/node_modules/react-router-dom/BrowserRouter.js] +export const BrowserRouterFromJs = () => null; + +//// [/project/node_modules/react-router-dom/index.js] +import "./BrowserRouter"; +export {}; + +//// [/project/node_modules/react-router-dom/package.json] +{ "name": "react-router-dom", "version": "16.8.4", "main": "index.js" } + +//// [/project/package.json] +{ "dependencies": { "react-router-dom": "*" } } + +//// [/project/tsconfig.json] +{ "compilerOptions": { "module": "commonjs", "allowJs": true, "checkJs": true, "maxNodeModuleJsDepth": 2 }, "typeAcquisition": { "enable": true } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/Library/Caches/typescript/node_modules/@types/react-router-dom/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /Library/Caches/typescript/node_modules/@types/react-router-dom +Info seq [hh:mm:ss:mss] For info: /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /Library/Caches/typescript/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json SVC-1-0 "{ \"name\": \"@types/react-router-dom\", \"version\": \"16.8.4\", \"types\": \"index.d.ts\" }" + /Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts Text-1 "export class BrowserRouterFromDts {}" + + + ../../../../../../lib.d.ts + Default library for target 'es5' + ../../../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../../../lib.d.ts' + ../../../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../../../lib.d.ts' + package.json + Root file specified for compilation + index.d.ts + Entry point for implicit type library 'react-router-dom' with packageId '@types/react-router-dom/index.d.ts@16.8.4' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/Library/Caches/typescript/node_modules/@types/jsconfig.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/jsconfig.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/package.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/tsconfig.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/tsconfig.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/jsconfig.json: *new* + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/Library/Caches/typescript/node_modules: *new* + {} +/Library/Caches/typescript/node_modules/@types: *new* + {} +/Library/Caches/typescript/node_modules/@types/node_modules/@types: *new* + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules: *new* + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules/@types: *new* + {} +/Library/Caches/typescript/node_modules/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/index.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/index.js :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/tsconfig.json 2000 undefined Project: /project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/tsconfig.json", + "reason": "Creating possible configured project for /project/index.js to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/tsconfig.json : { + "rootNames": [ + "/project/index.js" + ], + "options": { + "module": 1, + "allowJs": true, + "checkJs": true, + "maxNodeModuleJsDepth": 2, + "configFilePath": "/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/index.js SVC-1-0 "BrowserRouter" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.js + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts Text-1 "export class BrowserRouterFromDts {}" + + + ../Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/index.js", + "configFile": "/project/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot write file '/project/index.js' because it would overwrite input file.", + "code": 5055, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /Library/Caches/typescript/node_modules/@types/react-router-dom/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/index.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /project/tsconfig.json +After Request +watchedFiles:: +/Library/Caches/typescript/node_modules/@types/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/package.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/tsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/tsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/package.json: *new* + {"pollingInterval":250} +/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/Library/Caches/typescript/node_modules: + {} +/Library/Caches/typescript/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/@types/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules: + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/node_modules/@types: + {} +/project: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "allowIncompleteCompletions": true, + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/index.js", + "line": 1, + "offset": 14 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /library/caches/typescript/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /library/caches/typescript/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 14 + } + }, + "entries": [ + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "BrowserRouterFromDts", + "kind": "class", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "react-router-dom", + "sourceDisplay": [ + { + "text": "react-router-dom", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "BrowserRouterFromDts", + "exportMapKey": "20 * BrowserRouterFromDts ", + "moduleSpecifier": "react-router-dom", + "fileName": "/Library/Caches/typescript/node_modules/@types/react-router-dom/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/Library/Caches/typescript/node_modules/@types/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/package.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/react-router-dom/tsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/@types/tsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/jsconfig.json: + {"pollingInterval":2000} +/Library/Caches/typescript/node_modules/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/package.json: + {"pollingInterval":250} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/Library/Caches/typescript/node_modules: + {} +/Library/Caches/typescript/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/@types/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules: + {} +/Library/Caches/typescript/node_modules/@types/react-router-dom/node_modules/@types: + {} +/Library/Caches/typescript/node_modules/node_modules/@types: + {} +/library/caches/typescript/node_modules: *new* + {} +/project: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js new file mode 100644 index 00000000000..f0978308548 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js @@ -0,0 +1,1183 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +type A = { name: string } + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/fp-ts/index.d.ts] +export * as string from "./lib/string"; + +//// [/node_modules/fp-ts/lib/string.d.ts] +export declare const fromString: (s: string) => string; +export type SafeString = string; + +//// [/node_modules/fp-ts/package.json] +{ "name": "fp-ts", "version": "0.10.4" } + +//// [/package.json] +{ "dependencies": { "fp-ts": "^0.10.4" } } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/fp-ts/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/fp-ts +Info seq [hh:mm:ss:mss] For info: /node_modules/fp-ts/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/fp-ts/package.json SVC-1-0 "{ \"name\": \"fp-ts\", \"version\": \"0.10.4\" }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/fp-ts/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "type A = { name: string }" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/fp-ts/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/fp-ts/lib/string.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/fp-ts/lib/string.d.ts Text-1 "export declare const fromString: (s: string) => string;\nexport type SafeString = string;" + /node_modules/fp-ts/index.d.ts Text-1 "export * as string from \"./lib/string\";" + + + node_modules/fp-ts/lib/string.d.ts + Imported via "./lib/string" from file 'node_modules/fp-ts/index.d.ts' with packageId 'fp-ts/lib/string.d.ts@0.10.4' + node_modules/fp-ts/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/index.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/fp-ts/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/fp-ts/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/fp-ts/lib/string.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 2 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "A", + "kind": "type", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBufferConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBufferLike", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBufferTypes", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBufferView", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayLike", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Awaited", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "BooleanConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "CallableFunction", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Capitalize", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassAccessorDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassAccessorDecoratorResult", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassAccessorDecoratorTarget", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassDecorator", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassFieldDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassGetterDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassMemberDecoratorContext", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassMethodDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ClassSetterDecoratorContext", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ConcatArray", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ConstructorParameters", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DataViewConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DateConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DecoratorContext", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DecoratorMetadata", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "DecoratorMetadataObject", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Exclude", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Extract", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float32ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "FunctionConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "IArguments", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ImportAssertions", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ImportAttributes", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ImportCallOptions", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ImportMeta", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "InstanceType", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int16ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Lowercase", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "MethodDecorator", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NewableFunction", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NonNullable", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NumberConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ObjectConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Omit", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "OmitThisParameter", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ParameterDecorator", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Parameters", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Partial", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Pick", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Promise", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PromiseConstructorLike", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PromiseLike", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PropertyDecorator", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PropertyDescriptor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PropertyDescriptorMap", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "PropertyKey", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Readonly", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReadonlyArray", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Record", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExpConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExpExecArray", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExpMatchArray", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Required", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReturnType", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "StringConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Symbol", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "SyntaxErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "TemplateStringsArray", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ThisParameterType", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ThisType", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypedPropertyDescriptor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "TypeErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint16ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArrayConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uncapitalize", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uppercase", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "URIErrorConstructor", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "WeakKey", + "kind": "type", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "WeakKeyTypes", + "kind": "interface", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "SafeString", + "kind": "type", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "fp-ts/lib/string", + "sourceDisplay": [ + { + "text": "fp-ts/lib/string", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "SafeString", + "exportMapKey": "10 * SafeString ", + "moduleSpecifier": "fp-ts/lib/string", + "fileName": "/node_modules/fp-ts/lib/string.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "string", + "kind": "alias", + "kindModifiers": "declare", + "sortText": "16", + "hasAction": true, + "source": "fp-ts", + "sourceDisplay": [ + { + "text": "fp-ts", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "string", + "exportMapKey": "6 * string ", + "moduleSpecifier": "fp-ts", + "fileName": "/node_modules/fp-ts/index.d.ts", + "isPackageJsonImport": true + } + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/fp-ts/index.d.ts: + {"pollingInterval":500} +/node_modules/fp-ts/lib/string.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js new file mode 100644 index 00000000000..d9fe9fefef4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js @@ -0,0 +1,439 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +autorun + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts] +export declare function autorun(): void; + +//// [/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/package.json] +{ "types": "dist/mobx.d.ts" } + +//// [/node_modules/mobx] symlink(/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx) +//// [/package.json] +{ "dependencies": { "mobx": "*" } } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "autorun" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts Text-1 "export declare function autorun(): void;" + + + node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'autorun'.", + "start": 0, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts Text-1 "export declare function autorun(): void;" + + + node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": [ + { + "fixName": "import", + "description": "Add import from \"mobx\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { autorun } from \"mobx\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { autorun } from \"mobx\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js new file mode 100644 index 00000000000..51a267a3580 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js @@ -0,0 +1,602 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/index.d.ts] +declare class A { +} +//# sourceMappingURL=index.d.ts.map + +//// [/a/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,CAAC;CAAG"} + +//// [/a/index.ts] +class A {} + +//// [/a/package.json] +{} + +//// [/a/tsconfig.json] +{} + +//// [/b/b.ts] +/// +new A(); + +//// [/b/tsconfig.json] +{ + "compilerOptions": { "disableSourceOfProjectReferenceRedirect": true }, + "references": [{ "path": "../a" }] +} + +//// [/c/index.ts] +export {}; + +//// [/c/node_modules/a] symlink(/a) +//// [/c/package.json] +{ "dependencies": { "a": "*" } } + +//// [/c/tsconfig.json] +{ "references" [{ "path": "../a" }] } + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/package.json :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/package.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/index.ts" + ], + "options": { + "configFilePath": "/a/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /a 1 undefined Config: /a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /a 1 undefined Config: /a/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/index.ts Text-1 "class A {}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/package.json", + "configFile": "/a/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/package.json SVC-1-0 "{}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a/index.ts: *new* + {"pollingInterval":500} +/a/package.json: *new* + {"pollingInterval":250} +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/c/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /c/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/tsconfig.json 2000 undefined Project: /c/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/c/tsconfig.json", + "reason": "Creating possible configured project for /c/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /c/tsconfig.json : { + "rootNames": [ + "/c/index.ts" + ], + "options": { + "configFilePath": "/c/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/a", + "originalPath": "../a" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /c 1 undefined Config: /c/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /c 1 undefined Config: /c/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /c/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /c/index.ts SVC-1-0 "export {};" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /a/index.ts Text-1 "class A {}" + + + ../a/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/c/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/c/index.ts", + "configFile": "/c/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 1, + "offset": 17 + }, + "end": { + "line": 1, + "offset": 35 + }, + "text": "Referenced project '/a' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/c/tsconfig.json" + }, + { + "start": { + "line": 1, + "offset": 16 + }, + "end": { + "line": 1, + "offset": 17 + }, + "text": "':' expected.", + "code": 1005, + "category": "error", + "fileName": "/c/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /c/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /c/tsconfig.json +After Request +watchedFiles:: +/a/index.ts: + {"pollingInterval":500} +/a/package.json: + {"pollingInterval":250} +/a/tsconfig.json: + {"pollingInterval":2000} +/c/package.json: *new* + {"pollingInterval":250} +/c/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: + {} +/c: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/b/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/b.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /b/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating possible configured project for /b/b.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/b.ts" + ], + "options": { + "disableSourceOfProjectReferenceRedirect": true, + "configFilePath": "/b/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/a", + "originalPath": "../a" + } + ] +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /b 1 undefined Config: /b/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /b 1 undefined Config: /b/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/index.d.ts Text-1 "declare class A {\n}\n//# sourceMappingURL=index.d.ts.map" + /b/b.ts SVC-1-0 "/// \nnew A();" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../a/index.d.ts + Referenced via '../a/index.d.ts' from file 'b.ts' + b.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/b/b.ts", + "configFile": "/b/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 3, + "offset": 18 + }, + "end": { + "line": 3, + "offset": 36 + }, + "text": "Referenced project '/a' must have setting \"composite\": true.", + "code": 6306, + "category": "error", + "fileName": "/b/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /c/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /c/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /b/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: *new* + {"pollingInterval":500} +/a/index.ts: + {"pollingInterval":500} +/a/package.json: + {"pollingInterval":250} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/c/package.json: + {"pollingInterval":250} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: + {} +/b: *new* + {} +/c: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/b/b.ts", + "line": 2, + "offset": 6 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/b.ts position 46 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/index.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/index.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 10 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 3, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "class", + "name": "class A", + "textSpan": { + "start": 10, + "length": 1 + }, + "displayParts": [ + { + "text": "class", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A", + "kind": "className" + } + ], + "contextSpan": { + "start": 0, + "length": 10 + } + }, + "references": [ + { + "textSpan": { + "start": 45, + "length": 1 + }, + "fileName": "/b/b.ts", + "isWriteAccess": false + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":500} +/a/index.d.ts.map: *new* + {"pollingInterval":500} +/a/index.ts: + {"pollingInterval":500} +/a/package.json: + {"pollingInterval":250} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/package.json: + {"pollingInterval":250} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/a: + {} +/b: + {} +/c: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports1.js new file mode 100644 index 00000000000..c20647bf14f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports1.js @@ -0,0 +1,1130 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/main.ts] + + +//// [/node_modules/pkg/a/a1.d.ts] +export const a1: number; + +//// [/node_modules/pkg/b/b1.d.ts] +export const b1: number; + +//// [/node_modules/pkg/b/b2.d.mts] +export const NOT_REACHABLE: number; + +//// [/node_modules/pkg/c/c1.d.ts] +export const c1: number; + +//// [/node_modules/pkg/c/subfolder/c2.d.mts] +export const c2: number; + +//// [/node_modules/pkg/d/d1.d.mts] +export const d1: number; + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "1.0.0", + "exports": { + "./*": "./a/*.js", + "./b/*.js": "./b/*.js", + "./c/*": "./c/*", + "./d/*": { + "import": "./d/*.mjs" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "pkg": "1.0.0" + } +} + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/pkg/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/pkg +Info seq [hh:mm:ss:mss] For info: /node_modules/pkg/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/pkg/package.json SVC-1-0 "{\n \"name\": \"pkg\",\n \"version\": \"1.0.0\",\n \"exports\": {\n \"./*\": \"./a/*.js\",\n \"./b/*.js\": \"./b/*.js\",\n \"./c/*\": \"./c/*\",\n \"./d/*\": {\n \"import\": \"./d/*.mjs\"\n }\n }\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/pkg/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/main.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /main.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /main.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/main.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /main.ts SVC-1-0 "" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + main.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 5 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/a/a1.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/b/b1.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/c/c1.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/c/subfolder/c2.d.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/d/d1.d.mts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/a/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/b/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/c/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (5) + /node_modules/pkg/a/a1.d.ts Text-1 "export const a1: number;" + /node_modules/pkg/b/b1.d.ts Text-1 "export const b1: number;" + /node_modules/pkg/c/c1.d.ts Text-1 "export const c1: number;" + /node_modules/pkg/c/subfolder/c2.d.mts Text-1 "export const c2: number;" + /node_modules/pkg/d/d1.d.mts Text-1 "export const d1: number;" + + + node_modules/pkg/a/a1.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/pkg/package.json' does not have field "type" + node_modules/pkg/b/b1.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/pkg/package.json' does not have field "type" + node_modules/pkg/c/c1.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/pkg/package.json' does not have field "type" + node_modules/pkg/c/subfolder/c2.d.mts + Root file specified for compilation + node_modules/pkg/d/d1.d.mts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/main.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/pkg/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /main.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/pkg/a/a1.d.ts: *new* + {"pollingInterval":500} +/node_modules/pkg/a/package.json: *new* + {"pollingInterval":2000} +/node_modules/pkg/b/b1.d.ts: *new* + {"pollingInterval":500} +/node_modules/pkg/b/package.json: *new* + {"pollingInterval":2000} +/node_modules/pkg/c/c1.d.ts: *new* + {"pollingInterval":500} +/node_modules/pkg/c/package.json: *new* + {"pollingInterval":2000} +/node_modules/pkg/c/subfolder/c2.d.mts: *new* + {"pollingInterval":500} +/node_modules/pkg/d/d1.d.mts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/main.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 5 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "a1", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/a1", + "sourceDisplay": [ + { + "text": "pkg/a1", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "a1", + "exportMapKey": "2 * a1 ", + "moduleSpecifier": "pkg/a1", + "fileName": "/node_modules/pkg/a/a1.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "b1", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/b/b1.js", + "sourceDisplay": [ + { + "text": "pkg/b/b1.js", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "b1", + "exportMapKey": "2 * b1 ", + "moduleSpecifier": "pkg/b/b1.js", + "fileName": "/node_modules/pkg/b/b1.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "c1", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/c/c1.js", + "sourceDisplay": [ + { + "text": "pkg/c/c1.js", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "c1", + "exportMapKey": "2 * c1 ", + "moduleSpecifier": "pkg/c/c1.js", + "fileName": "/node_modules/pkg/c/c1.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "c2", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/c/subfolder/c2.mjs", + "sourceDisplay": [ + { + "text": "pkg/c/subfolder/c2.mjs", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "c2", + "exportMapKey": "2 * c2 ", + "moduleSpecifier": "pkg/c/subfolder/c2.mjs", + "fileName": "/node_modules/pkg/c/subfolder/c2.d.mts", + "isPackageJsonImport": true + } + }, + { + "name": "d1", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/d/d1", + "sourceDisplay": [ + { + "text": "pkg/d/d1", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "d1", + "exportMapKey": "2 * d1 ", + "moduleSpecifier": "pkg/d/d1", + "fileName": "/node_modules/pkg/d/d1.d.mts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/pkg/a/a1.d.ts: + {"pollingInterval":500} +/node_modules/pkg/a/package.json: + {"pollingInterval":2000} +/node_modules/pkg/b/b1.d.ts: + {"pollingInterval":500} +/node_modules/pkg/b/package.json: + {"pollingInterval":2000} +/node_modules/pkg/c/c1.d.ts: + {"pollingInterval":500} +/node_modules/pkg/c/package.json: + {"pollingInterval":2000} +/node_modules/pkg/c/subfolder/c2.d.mts: + {"pollingInterval":500} +/node_modules/pkg/d/d1.d.mts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports2.js new file mode 100644 index 00000000000..2db32a7bd9a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports2.js @@ -0,0 +1,986 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/main.ts] + + +//// [/node_modules/pkg/lib/core/test.d.ts] +export function test(): void; + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "1.0.0", + "exports": { + "./core/*": { + "types": "./lib/core/*.d.ts", + "default": "./lib/core/*.js" + } + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "pkg": "1.0.0" + } +} + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/pkg/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/pkg +Info seq [hh:mm:ss:mss] For info: /node_modules/pkg/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/pkg/package.json SVC-1-0 "{\n \"name\": \"pkg\",\n \"version\": \"1.0.0\",\n \"exports\": {\n \"./core/*\": {\n \"types\": \"./lib/core/*.d.ts\",\n \"default\": \"./lib/core/*.js\"\n }\n }\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/pkg/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/main.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /main.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /main.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/main.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /main.ts SVC-1-0 "" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + main.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/lib/core/test.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/lib/core/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /node_modules/pkg/lib/core/test.d.ts Text-1 "export function test(): void;" + + + node_modules/pkg/lib/core/test.d.ts + Root file specified for compilation + File is CommonJS module because 'node_modules/pkg/package.json' does not have field "type" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/main.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/pkg/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /main.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/pkg/lib/core/package.json: *new* + {"pollingInterval":2000} +/node_modules/pkg/lib/core/test.d.ts: *new* + {"pollingInterval":500} +/node_modules/pkg/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/main.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "test", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "pkg/core/test", + "sourceDisplay": [ + { + "text": "pkg/core/test", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "test", + "exportMapKey": "4 * test ", + "moduleSpecifier": "pkg/core/test", + "fileName": "/node_modules/pkg/lib/core/test.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/pkg/lib/core/package.json: + {"pollingInterval":2000} +/node_modules/pkg/lib/core/test.d.ts: + {"pollingInterval":500} +/node_modules/pkg/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js new file mode 100644 index 00000000000..01c9a473045 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js @@ -0,0 +1,1140 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +access + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/fs-extra/index.d.ts] +export * from "fs"; + +//// [/node_modules/@types/node/index.d.ts] +declare module "fs" { + export function accessSync(path: string): void; +} + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/fs-extra/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "access" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/fs-extra/index.d.ts Text-1 "export * from \"fs\";" + /node_modules/@types/node/index.d.ts Text-1 "declare module \"fs\" {\n export function accessSync(path: string): void;\n}" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + node_modules/@types/fs-extra/index.d.ts + Entry point for implicit type library 'fs-extra' + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n }\n}" + /node_modules/@types/fs-extra/index.d.ts Text-1 "export * from \"fs\";" + /node_modules/@types/node/index.d.ts Text-1 "declare module \"fs\" {\n export function accessSync(path: string): void;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/@types/fs-extra/index.d.ts + Entry point for implicit type library 'fs-extra' + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/fs-extra/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/fs-extra/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 7 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "accessSync", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "fs", + "sourceDisplay": [ + { + "text": "fs", + "kind": "text" + } + ], + "data": { + "exportName": "accessSync", + "exportMapKey": "10 * accessSync fs", + "moduleSpecifier": "fs", + "ambientModuleName": "fs" + } + }, + { + "name": "accessSync", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "fs-extra", + "sourceDisplay": [ + { + "text": "fs-extra", + "kind": "text" + } + ], + "data": { + "exportName": "accessSync", + "exportMapKey": "10 * accessSync ", + "moduleSpecifier": "fs-extra", + "fileName": "/node_modules/@types/fs-extra/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/fs-extra/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "entryNames": [ + { + "name": "accessSync", + "source": "fs-extra", + "data": { + "exportName": "accessSync", + "fileName": "/node_modules/@types/fs-extra/index.d.ts", + "moduleSpecifier": "fs-extra" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 4, + "success": true, + "body": [ + { + "name": "accessSync", + "kindModifiers": "export,declare", + "kind": "function", + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "accessSync", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "path", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"fs-extra\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { accessSync } from \"fs-extra\";\r\n\r\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "fs-extra", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "fs-extra", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { accessSync } from \"fs-extra\";\r\n\r\n" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js new file mode 100644 index 00000000000..a129eed2212 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js @@ -0,0 +1,417 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/app/dist/index.d.ts] +import {} from "utils"; +export const app: number; + +//// [/packages/app/node_modules/utils] symlink(/packages/utils) +//// [/packages/utils/dist/index.d.ts] +export const x: number; + +//// [/packages/utils/package.json] +{ "name": "utils", "version": "1.0.0", "main": "dist/index.js" } + +//// [/script.ts] +import {} from "./packages/app/dist/index.js"; +x + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/script.ts", + "/packages/app/dist/index.d.ts", + "/packages/utils/dist/index.d.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /script.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/utils/dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app/dist 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app/dist 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/utils/dist/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/app/dist/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/utils/dist/index.d.ts Text-1 "export const x: number;" + /packages/app/dist/index.d.ts Text-1 "import {} from \"utils\";\nexport const app: number;" + /script.ts Text-1 "import {} from \"./packages/app/dist/index.js\";\nx" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + packages/utils/dist/index.d.ts + Imported via "utils" from file 'packages/app/dist/index.d.ts' with packageId 'utils/dist/index.d.ts@1.0.0' + Matched by default include pattern '**/*' + File is CommonJS module because 'packages/utils/package.json' does not have field "type" + packages/app/dist/index.d.ts + Imported via "./packages/app/dist/index.js" from file 'script.ts' + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' was not found + script.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' was not found + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/app/dist/index.d.ts: *new* + {"pollingInterval":500} +/packages/app/dist/package.json: *new* + {"pollingInterval":2000} +/packages/utils/dist/index.d.ts: *new* + {"pollingInterval":500} +/packages/utils/dist/package.json: *new* + {"pollingInterval":2000} +/script.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/packages/app/dist: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/script.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /script.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /script.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /script.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/dist/index.d.ts: + {"pollingInterval":500} +/packages/app/dist/package.json: + {"pollingInterval":2000} +/packages/utils/dist/index.d.ts: + {"pollingInterval":500} +/packages/utils/dist/package.json: + {"pollingInterval":2000} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/script.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/packages/app/dist: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/script.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/script.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'x'.", + "start": 47, + "length": 1, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 1 + }, + "endLocation": { + "line": 2, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/script.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/script.ts", + "startLine": 2, + "startOffset": 1, + "endLine": 2, + "endOffset": 2, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/app/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"./packages/utils/dist/index.js\"", + "changes": [ + { + "fileName": "/script.ts", + "textChanges": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 1 + }, + "newText": "import { x } from \"./packages/utils/dist/index.js\";\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/app/dist/index.d.ts: + {"pollingInterval":500} +/packages/app/dist/package.json: + {"pollingInterval":2000} +/packages/utils/dist/index.d.ts: + {"pollingInterval":500} +/packages/utils/dist/package.json: + {"pollingInterval":2000} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/packages/app/dist: + {} +/packages/app/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js new file mode 100644 index 00000000000..e5a6e15b825 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js @@ -0,0 +1,811 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/a/index.js] +packageB + +//// [/packages/a/node_modules/package-b] symlink(/packages/b) +//// [/packages/a/package.json] +{ + "name": "package-a", + "dependencies": { + "package-b": "*" + } +} + +//// [/packages/b/index.js] +export const packageB = "package-b"; + +//// [/packages/b/package.json] +{ "name": "package-b", "main": "index.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/packages/a/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/a +Info seq [hh:mm:ss:mss] For info: /packages/a/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/a/package.json SVC-1-0 "{\n \"name\": \"package-a\",\n \"dependencies\": {\n \"package-b\": \"*\"\n }\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/a/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/a/package.json: *new* + {"pollingInterval":250} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "options": { + "module": "commonjs", + "allowJs": true, + "maxNodeModulesJsDepth": 2 + } + }, + "command": "compilerOptionsForInferredProjects" + } +Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "compilerOptionsForInferredProjects", + "request_seq": 1, + "success": true, + "body": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/packages/a/index.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/a +Info seq [hh:mm:ss:mss] For info: /packages/a/index.js :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/a/index.js SVC-1-0 "packageB" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + index.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/b/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + /packages/b/index.js Text-1 "export const packageB = \"package-b\";" + + + ../b/index.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /packages/a/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/a/index.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/a/package.json: + {"pollingInterval":250} +/packages/b/index.js: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/packages/a/index.js", + "line": 1, + "offset": 9 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 9 + } + }, + "entries": [ + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "packageB", + "kind": "const", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "package-b", + "sourceDisplay": [ + { + "text": "package-b", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "packageB", + "exportMapKey": "8 * packageB ", + "moduleSpecifier": "package-b", + "fileName": "/packages/b/index.js", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/a/package.json: + {"pollingInterval":250} +/packages/b/index.js: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/packages/a/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/brace01.js b/tests/baselines/reference/tsserver/fourslashServer/brace01.js new file mode 100644 index 00000000000..2e951c101a8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/brace01.js @@ -0,0 +1,1518 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/brace01.ts] +//curly braces +module Foo { + class Bar { + private f() { + } + + private f2() { + if (true) { } { }; + } + } +} + +//parenthesis +class FooBar { + private f() { + return ((1 + 1)); + } + + private f2() { + if (true) { } + } +} + +//square brackets +class Baz { + private f() { + var a: any[] = [[1, 2], [3, 4], 5]; + } +} + +// angular brackets +class TemplateTest { + public foo(a, b) { + return a; + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/brace01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/brace01.ts SVC-1-0 "//curly braces\nmodule Foo {\n class Bar {\n private f() {\n }\n\n private f2() {\n if (true) { } { };\n }\n }\n}\n\n//parenthesis\nclass FooBar {\n private f() {\n return ((1 + 1));\n }\n\n private f2() {\n if (true) { }\n }\n}\n\n//square brackets\nclass Baz {\n private f() {\n var a: any[] = [[1, 2], [3, 4], 5];\n }\n}\n\n// angular brackets\nclass TemplateTest {\n public foo(a, b) {\n return a;\n }\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + brace01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/brace01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 2, + "offset": 12 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 1, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 12 + }, + "end": { + "line": 2, + "offset": 13 + } + }, + { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 11, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 11, + "offset": 1 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 2, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 12 + }, + "end": { + "line": 2, + "offset": 13 + } + }, + { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 11, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 3, + "offset": 15 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 3, + "success": true, + "body": [ + { + "start": { + "line": 3, + "offset": 15 + }, + "end": { + "line": 3, + "offset": 16 + } + }, + { + "start": { + "line": 10, + "offset": 5 + }, + "end": { + "line": 10, + "offset": 6 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 10, + "offset": 5 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 4, + "success": true, + "body": [ + { + "start": { + "line": 3, + "offset": 15 + }, + "end": { + "line": 3, + "offset": 16 + } + }, + { + "start": { + "line": 10, + "offset": 5 + }, + "end": { + "line": 10, + "offset": 6 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 4, + "offset": 21 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 5, + "success": true, + "body": [ + { + "start": { + "line": 4, + "offset": 21 + }, + "end": { + "line": 4, + "offset": 22 + } + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 5, + "offset": 9 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 6, + "success": true, + "body": [ + { + "start": { + "line": 4, + "offset": 21 + }, + "end": { + "line": 4, + "offset": 22 + } + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 7, + "offset": 22 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 7, + "success": true, + "body": [ + { + "start": { + "line": 7, + "offset": 22 + }, + "end": { + "line": 7, + "offset": 23 + } + }, + { + "start": { + "line": 9, + "offset": 9 + }, + "end": { + "line": 9, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 9, + "offset": 9 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 8, + "success": true, + "body": [ + { + "start": { + "line": 7, + "offset": 22 + }, + "end": { + "line": 7, + "offset": 23 + } + }, + { + "start": { + "line": 9, + "offset": 9 + }, + "end": { + "line": 9, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 8, + "offset": 23 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 9, + "success": true, + "body": [ + { + "start": { + "line": 8, + "offset": 23 + }, + "end": { + "line": 8, + "offset": 24 + } + }, + { + "start": { + "line": 8, + "offset": 25 + }, + "end": { + "line": 8, + "offset": 26 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 8, + "offset": 25 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 10, + "success": true, + "body": [ + { + "start": { + "line": 8, + "offset": 23 + }, + "end": { + "line": 8, + "offset": 24 + } + }, + { + "start": { + "line": 8, + "offset": 25 + }, + "end": { + "line": 8, + "offset": 26 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 8, + "offset": 27 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 11, + "success": true, + "body": [ + { + "start": { + "line": 8, + "offset": 27 + }, + "end": { + "line": 8, + "offset": 28 + } + }, + { + "start": { + "line": 8, + "offset": 29 + }, + "end": { + "line": 8, + "offset": 30 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 8, + "offset": 29 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 12, + "success": true, + "body": [ + { + "start": { + "line": 8, + "offset": 27 + }, + "end": { + "line": 8, + "offset": 28 + } + }, + { + "start": { + "line": 8, + "offset": 29 + }, + "end": { + "line": 8, + "offset": 30 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 15, + "offset": 14 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 13, + "success": true, + "body": [ + { + "start": { + "line": 15, + "offset": 14 + }, + "end": { + "line": 15, + "offset": 15 + } + }, + { + "start": { + "line": 15, + "offset": 15 + }, + "end": { + "line": 15, + "offset": 16 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 15, + "offset": 15 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 14, + "success": true, + "body": [ + { + "start": { + "line": 15, + "offset": 14 + }, + "end": { + "line": 15, + "offset": 15 + } + }, + { + "start": { + "line": 15, + "offset": 15 + }, + "end": { + "line": 15, + "offset": 16 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 16, + "offset": 16 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 15, + "success": true, + "body": [ + { + "start": { + "line": 16, + "offset": 16 + }, + "end": { + "line": 16, + "offset": 17 + } + }, + { + "start": { + "line": 16, + "offset": 24 + }, + "end": { + "line": 16, + "offset": 25 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 16, + "offset": 24 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 16, + "success": true, + "body": [ + { + "start": { + "line": 16, + "offset": 16 + }, + "end": { + "line": 16, + "offset": 17 + } + }, + { + "start": { + "line": 16, + "offset": 24 + }, + "end": { + "line": 16, + "offset": 25 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 16, + "offset": 17 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 17, + "success": true, + "body": [ + { + "start": { + "line": 16, + "offset": 17 + }, + "end": { + "line": 16, + "offset": 18 + } + }, + { + "start": { + "line": 16, + "offset": 23 + }, + "end": { + "line": 16, + "offset": 24 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 16, + "offset": 23 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 18, + "success": true, + "body": [ + { + "start": { + "line": 16, + "offset": 17 + }, + "end": { + "line": 16, + "offset": 18 + } + }, + { + "start": { + "line": 16, + "offset": 23 + }, + "end": { + "line": 16, + "offset": 24 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 19, + "offset": 15 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 19, + "success": true, + "body": [ + { + "start": { + "line": 19, + "offset": 15 + }, + "end": { + "line": 19, + "offset": 16 + } + }, + { + "start": { + "line": 19, + "offset": 16 + }, + "end": { + "line": 19, + "offset": 17 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 19, + "offset": 16 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 20, + "success": true, + "body": [ + { + "start": { + "line": 19, + "offset": 15 + }, + "end": { + "line": 19, + "offset": 16 + } + }, + { + "start": { + "line": 19, + "offset": 16 + }, + "end": { + "line": 19, + "offset": 17 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 20, + "offset": 12 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 21, + "success": true, + "body": [ + { + "start": { + "line": 20, + "offset": 12 + }, + "end": { + "line": 20, + "offset": 13 + } + }, + { + "start": { + "line": 20, + "offset": 17 + }, + "end": { + "line": 20, + "offset": 18 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 20, + "offset": 17 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 22, + "success": true, + "body": [ + { + "start": { + "line": 20, + "offset": 12 + }, + "end": { + "line": 20, + "offset": 13 + } + }, + { + "start": { + "line": 20, + "offset": 17 + }, + "end": { + "line": 20, + "offset": 18 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 19 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 23, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 19 + }, + "end": { + "line": 27, + "offset": 20 + } + }, + { + "start": { + "line": 27, + "offset": 20 + }, + "end": { + "line": 27, + "offset": 21 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 20 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 24, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 19 + }, + "end": { + "line": 27, + "offset": 20 + } + }, + { + "start": { + "line": 27, + "offset": 20 + }, + "end": { + "line": 27, + "offset": 21 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 24 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 25, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 24 + }, + "end": { + "line": 27, + "offset": 25 + } + }, + { + "start": { + "line": 27, + "offset": 42 + }, + "end": { + "line": 27, + "offset": 43 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 42 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 26, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 24 + }, + "end": { + "line": 27, + "offset": 25 + } + }, + { + "start": { + "line": 27, + "offset": 42 + }, + "end": { + "line": 27, + "offset": 43 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 25 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 27, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 25 + }, + "end": { + "line": 27, + "offset": 26 + } + }, + { + "start": { + "line": 27, + "offset": 30 + }, + "end": { + "line": 27, + "offset": 31 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 30 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 28, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 25 + }, + "end": { + "line": 27, + "offset": 26 + } + }, + { + "start": { + "line": 27, + "offset": 30 + }, + "end": { + "line": 27, + "offset": 31 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 33 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 29, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 33 + }, + "end": { + "line": 27, + "offset": 34 + } + }, + { + "start": { + "line": 27, + "offset": 38 + }, + "end": { + "line": 27, + "offset": 39 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 27, + "offset": 38 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 30, + "success": true, + "body": [ + { + "start": { + "line": 27, + "offset": 33 + }, + "end": { + "line": 27, + "offset": 34 + } + }, + { + "start": { + "line": 27, + "offset": 38 + }, + "end": { + "line": 27, + "offset": 39 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 32, + "offset": 20 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 31, + "success": true, + "body": [ + { + "start": { + "line": 32, + "offset": 20 + }, + "end": { + "line": 32, + "offset": 21 + } + }, + { + "start": { + "line": 32, + "offset": 41 + }, + "end": { + "line": 32, + "offset": 42 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 32, + "offset": 41 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 32, + "success": true, + "body": [ + { + "start": { + "line": 32, + "offset": 20 + }, + "end": { + "line": 32, + "offset": 21 + } + }, + { + "start": { + "line": 32, + "offset": 41 + }, + "end": { + "line": 32, + "offset": 42 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 34, + "offset": 16 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 33, + "success": true, + "body": [ + { + "start": { + "line": 34, + "offset": 16 + }, + "end": { + "line": 34, + "offset": 17 + } + }, + { + "start": { + "line": 34, + "offset": 20 + }, + "end": { + "line": 34, + "offset": 21 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/brace01.ts", + "line": 34, + "offset": 20 + }, + "command": "brace" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "brace", + "request_seq": 34, + "success": true, + "body": [ + { + "start": { + "line": 34, + "offset": 16 + }, + "end": { + "line": 34, + "offset": 17 + } + }, + { + "start": { + "line": 34, + "offset": 20 + }, + "end": { + "line": 34, + "offset": 21 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/callHierarchyContainerNameServer.js b/tests/baselines/reference/tsserver/fourslashServer/callHierarchyContainerNameServer.js new file mode 100644 index 00000000000..13baaada2a8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/callHierarchyContainerNameServer.js @@ -0,0 +1,580 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts] +function f() {} + +class A { + static sameName() { + f(); + } +} + +class B { + sameName() { + A.sameName(); + } +} + +const Obj = { + get sameName() { + return new B().sameName; + } +}; + +namespace Foo { + function sameName() { + return Obj.sameName; + } + + export class C { + constructor() { + sameName(); + } + } +} + +module Foo.Bar { + const sameName = () => new Foo.C(); +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts SVC-1-0 "function f() {}\n\nclass A {\n static sameName() {\n f();\n }\n}\n\nclass B {\n sameName() {\n A.sameName();\n }\n}\n\nconst Obj = {\n get sameName() {\n return new B().sameName;\n }\n};\n\nnamespace Foo {\n function sameName() {\n return Obj.sameName;\n }\n\n export class C {\n constructor() {\n sameName();\n }\n }\n}\n\nmodule Foo.Bar {\n const sameName = () => new Foo.C();\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + callHierarchyContainerNameServer.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 1, + "offset": 10 + }, + "command": "prepareCallHierarchy" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "prepareCallHierarchy", + "request_seq": 1, + "success": true, + "body": { + "name": "f", + "kind": "function", + "kindModifiers": "", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "span": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 16 + } + }, + "selectionSpan": { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 1, + "offset": 10 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 2, + "success": true, + "body": [ + { + "from": { + "name": "sameName", + "kind": "method", + "kindModifiers": "static", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "A", + "span": { + "start": { + "line": 4, + "offset": 3 + }, + "end": { + "line": 6, + "offset": 4 + } + }, + "selectionSpan": { + "start": { + "line": 4, + "offset": 10 + }, + "end": { + "line": 4, + "offset": 18 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 5, + "offset": 5 + }, + "end": { + "line": 5, + "offset": 6 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 1, + "offset": 10 + }, + "command": "provideCallHierarchyOutgoingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyOutgoingCalls", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 4, + "offset": 10 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 4, + "success": true, + "body": [ + { + "from": { + "name": "sameName", + "kind": "method", + "kindModifiers": "", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "B", + "span": { + "start": { + "line": 10, + "offset": 3 + }, + "end": { + "line": 12, + "offset": 4 + } + }, + "selectionSpan": { + "start": { + "line": 10, + "offset": 3 + }, + "end": { + "line": 10, + "offset": 11 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 11, + "offset": 7 + }, + "end": { + "line": 11, + "offset": 15 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 10, + "offset": 3 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 5, + "success": true, + "body": [ + { + "from": { + "name": "sameName", + "kind": "getter", + "kindModifiers": "", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "Obj", + "span": { + "start": { + "line": 16, + "offset": 3 + }, + "end": { + "line": 18, + "offset": 4 + } + }, + "selectionSpan": { + "start": { + "line": 16, + "offset": 7 + }, + "end": { + "line": 16, + "offset": 15 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 17, + "offset": 20 + }, + "end": { + "line": 17, + "offset": 28 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 16, + "offset": 7 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 6, + "success": true, + "body": [ + { + "from": { + "name": "sameName", + "kind": "function", + "kindModifiers": "", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "Foo", + "span": { + "start": { + "line": 22, + "offset": 3 + }, + "end": { + "line": 24, + "offset": 4 + } + }, + "selectionSpan": { + "start": { + "line": 22, + "offset": 12 + }, + "end": { + "line": 22, + "offset": 20 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 23, + "offset": 16 + }, + "end": { + "line": 23, + "offset": 24 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 22, + "offset": 12 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 7, + "success": true, + "body": [ + { + "from": { + "name": "C", + "kind": "class", + "kindModifiers": "export", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "Foo", + "span": { + "start": { + "line": 26, + "offset": 3 + }, + "end": { + "line": 30, + "offset": 4 + } + }, + "selectionSpan": { + "start": { + "line": 26, + "offset": 16 + }, + "end": { + "line": 26, + "offset": 17 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 28, + "offset": 7 + }, + "end": { + "line": 28, + "offset": 15 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 26, + "offset": 16 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 8, + "success": true, + "body": [ + { + "from": { + "name": "sameName", + "kind": "function", + "kindModifiers": "", + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "containerName": "Bar", + "span": { + "start": { + "line": 34, + "offset": 20 + }, + "end": { + "line": 34, + "offset": 37 + } + }, + "selectionSpan": { + "start": { + "line": 34, + "offset": 9 + }, + "end": { + "line": 34, + "offset": 17 + } + } + }, + "fromSpans": [ + { + "start": { + "line": 34, + "offset": 34 + }, + "end": { + "line": 34, + "offset": 35 + } + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/callHierarchyContainerNameServer.ts", + "line": 34, + "offset": 9 + }, + "command": "provideCallHierarchyIncomingCalls" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "provideCallHierarchyIncomingCalls", + "request_seq": 9, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles01.js b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles01.js new file mode 100644 index 00000000000..00a194e0284 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles01.js @@ -0,0 +1,1146 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.js] +/** + * Modify the parameter + * @param {string} p1 + */ +var foo = function (p1) { } +exports.foo = foo; +fo + +//// [/tests/cases/fourslash/server/b.ts] +import a = require("./a"); +a.fo + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.js SVC-1-0 "/**\n * Modify the parameter\n * @param {string} p1\n */\nvar foo = function (p1) { }\nexports.foo = foo;\nfo" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "line": 7, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 7, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 3 + } + }, + "entries": [ + { + "name": "foo", + "kind": "var", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "exports", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p1", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "line": 7, + "offset": 3, + "entryNames": [ + { + "name": "foo" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "foo", + "kindModifiers": "", + "kind": "var", + "displayParts": [ + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foo", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "p1", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=>", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Modify the parameter", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": "p1" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.js SVC-1-0 "/**\n * Modify the parameter\n * @param {string} p1\n */\nvar foo = function (p1) { }\nexports.foo = foo;\nfo" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import a = require(\"./a\");\na.fo" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Imported via "./a" from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/a.js + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectories:: +/tests/cases/fourslash/server: *new* + {} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/a: *new* + {} +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 5 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 3 + }, + "end": { + "line": 2, + "offset": 5 + } + }, + "entries": [ + { + "name": "foo", + "kind": "alias", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 5, + "entryNames": [ + { + "name": "foo" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 7, + "success": true, + "body": [ + { + "name": "foo", + "kindModifiers": "", + "kind": "alias", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foo", + "kind": "aliasName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "p1", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=>", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "a", + "kind": "aliasName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "aliasName" + } + ], + "documentation": [ + { + "text": "Modify the parameter", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": "p1" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles02.js b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles02.js new file mode 100644 index 00000000000..38806f9f947 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles02.js @@ -0,0 +1,1152 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.js] +/** + * Modify the parameter + * @param {string} p1 + */ +var foo = function (p1) { } +module.exports.foo = foo; +fo + +//// [/tests/cases/fourslash/server/b.ts] +import a = require("./a"); +a.fo + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.js SVC-1-0 "/**\n * Modify the parameter\n * @param {string} p1\n */\nvar foo = function (p1) { }\nmodule.exports.foo = foo;\nfo" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "line": 7, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 7, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 3 + } + }, + "entries": [ + { + "name": "foo", + "kind": "var", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "module", + "kind": "var", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "exports", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p1", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "line": 7, + "offset": 3, + "entryNames": [ + { + "name": "foo" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "foo", + "kindModifiers": "", + "kind": "var", + "displayParts": [ + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foo", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "p1", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=>", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Modify the parameter", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": "p1" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.js SVC-1-0 "/**\n * Modify the parameter\n * @param {string} p1\n */\nvar foo = function (p1) { }\nmodule.exports.foo = foo;\nfo" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import a = require(\"./a\");\na.fo" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Imported via "./a" from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/a.js + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectories:: +/tests/cases/fourslash/server: *new* + {} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/a: *new* + {} +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 5 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 3 + }, + "end": { + "line": 2, + "offset": 5 + } + }, + "entries": [ + { + "name": "foo", + "kind": "alias", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 5, + "entryNames": [ + { + "name": "foo" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 7, + "success": true, + "body": [ + { + "name": "foo", + "kindModifiers": "", + "kind": "alias", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "foo", + "kind": "aliasName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "p1", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=>", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "a", + "kind": "aliasName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "foo", + "kind": "aliasName" + } + ], + "documentation": [ + { + "text": "Modify the parameter", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": "p1" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completions01.js b/tests/baselines/reference/tsserver/fourslashServer/completions01.js new file mode 100644 index 00000000000..5cea208af3f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions01.js @@ -0,0 +1,712 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/completions01.ts] +var x: string[] = []; +x.forEach(function (y) { y +x.forEach(y => y + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/completions01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions01.ts SVC-1-0 "var x: string[] = [];\nx.forEach(function (y) { y\nx.forEach(y => y" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + completions01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/completions01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 27, + "endLine": 2, + "endOffset": 27, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 27, + "endLine": 2, + "endOffset": 27, + "insertString": "." + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 28, + "key": "." + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 28 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions01.ts SVC-1-2 "var x: string[] = [];\nx.forEach(function (y) { y.\nx.forEach(y => y" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 28, + "endLine": 2, + "endOffset": 28, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 28, + "endLine": 2, + "endOffset": 28, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 29, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 19 + }, + "end": { + "line": 2, + "offset": 20 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 19, + "endLine": 2, + "endOffset": 20, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 28, + "endLine": 2, + "endOffset": 28, + "insertString": ")" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 29, + "key": ")" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 29, + "endLine": 2, + "endOffset": 29, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 2, + "offset": 30, + "key": ";" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 3, + "offset": 17, + "endLine": 3, + "endOffset": 17, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 3, + "offset": 17, + "endLine": 3, + "endOffset": 17, + "insertString": "." + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 3, + "offset": 18, + "key": "." + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 17, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions01.ts", + "line": 3, + "offset": 18 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions01.ts SVC-1-9 "var x: string[] = [];\nx.forEach(function(y) { y.});\nx.forEach(y => y." + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 18, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completions02.js b/tests/baselines/reference/tsserver/fourslashServer/completions02.js new file mode 100644 index 00000000000..c64216a3999 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions02.js @@ -0,0 +1,682 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/completions02.ts] +class Foo { +} +module Foo { + export var x: number; +} +Foo. + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/completions02.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions02.ts SVC-1-0 "class Foo {\n}\nmodule Foo {\n export var x: number;\n}\nFoo." + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + completions02.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/completions02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "apply", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "arguments", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "bind", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "call", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "caller", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "prototype", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "x", + "kind": "var", + "kindModifiers": "export", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "entryNames": [ + { + "name": "arguments" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "arguments", + "kindModifiers": "declare", + "kind": "property", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Function", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "arguments", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "documentation": [], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "entryNames": [ + { + "name": "x" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 4, + "success": true, + "body": [ + { + "name": "x", + "kindModifiers": "export", + "kind": "var", + "displayParts": [ + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "endLine": 6, + "endOffset": 5, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "endLine": 6, + "endOffset": 5, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 6, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 7, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "endLine": 6, + "endOffset": 6, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 9, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions02.ts SVC-1-3 "class Foo {\n}\nmodule Foo {\n export var x: number;\n}\nFoo." + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 10, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "apply", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "arguments", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "bind", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "call", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "caller", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "prototype", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "x", + "kind": "var", + "kindModifiers": "export", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "entryNames": [ + { + "name": "arguments" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 11, + "success": true, + "body": [ + { + "name": "arguments", + "kindModifiers": "declare", + "kind": "property", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Function", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "arguments", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "documentation": [], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions02.ts", + "line": 6, + "offset": 5, + "entryNames": [ + { + "name": "x" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 12, + "success": true, + "body": [ + { + "name": "x", + "kindModifiers": "export", + "kind": "var", + "displayParts": [ + { + "text": "var", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Foo", + "kind": "className" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "x", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [], + "tags": [] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completions03.js b/tests/baselines/reference/tsserver/fourslashServer/completions03.js new file mode 100644 index 00000000000..8ba03998240 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions03.js @@ -0,0 +1,155 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/completions03.ts] +interface Foo { + one: any; + two: any; + three: any; +} + +let x: Foo = { + get one() { return "" }, + set two(t) {}, + +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions03.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/completions03.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/completions03.ts SVC-1-0 "interface Foo {\n one: any;\n two: any;\n three: any;\n}\n\nlet x: Foo = {\n get one() { return \"\" },\n set two(t) {},\n \n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + completions03.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/completions03.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/completions03.ts", + "line": 10, + "offset": 5 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "three", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js new file mode 100644 index 00000000000..134e566fd92 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js @@ -0,0 +1,3135 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/mylib] symlink(/packages/mylib) +//// [/packages/mylib/index.ts] +export * from "./mySubDir"; + +//// [/packages/mylib/mySubDir/index.ts] +export * from "./myClass"; +export * from "./myClass2"; + +//// [/packages/mylib/mySubDir/myClass.ts] +export class MyClass {} + +//// [/packages/mylib/mySubDir/myClass2.ts] +export class MyClass2 {} + +//// [/packages/mylib/package.json] +{ "name": "mylib", "version": "1.0.0", "main": "index.js" } + +//// [/src/index.ts] + +const a = new MyClass(); +const b = new MyClass2(); + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/packages/mylib/index.ts", + "/packages/mylib/mySubDir/index.ts", + "/packages/mylib/mySubDir/myClass.ts", + "/packages/mylib/mySubDir/myClass2.ts", + "/src/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir/myClass2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/mylib/mySubDir 1 undefined Project: /tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + /src/index.ts Text-1 "\nconst a = new MyClass();\nconst b = new MyClass2();" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass.ts + Imported via "./myClass" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/myClass2.ts + Imported via "./myClass2" from file 'packages/mylib/mySubDir/index.ts' + Matched by default include pattern '**/*' + packages/mylib/mySubDir/index.ts + Imported via "./mySubDir" from file 'packages/mylib/index.ts' + Matched by default include pattern '**/*' + packages/mylib/index.ts + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/mylib/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: *new* + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: *new* + {"pollingInterval":500} +/src/index.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/packages/mylib/mySubDir: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/mylib/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/index.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass.ts: + {"pollingInterval":500} +/packages/mylib/mySubDir/myClass2.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/packages/mylib/mySubDir: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 4 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 9, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 15 + }, + "end": { + "line": 2, + "offset": 22 + } + }, + "entries": [ + { + "name": "b", + "kind": "const", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "MyClass", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "../packages/mylib", + "sourceDisplay": [ + { + "text": "../packages/mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass", + "exportMapKey": "7 * MyClass ", + "moduleSpecifier": "../packages/mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "MyClass2", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "../packages/mylib", + "sourceDisplay": [ + { + "text": "../packages/mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass2", + "exportMapKey": "8 * MyClass2 ", + "moduleSpecifier": "../packages/mylib", + "fileName": "/packages/mylib/index.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 2, + "offset": 22, + "entryNames": [ + { + "name": "MyClass", + "source": "../packages/mylib", + "data": { + "exportName": "MyClass", + "fileName": "/packages/mylib/index.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 6, + "success": true, + "body": [ + { + "name": "MyClass", + "kindModifiers": "export", + "kind": "constructor", + "displayParts": [ + { + "text": "constructor", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "MyClass", + "kind": "className" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"../packages/mylib\"", + "changes": [ + { + "fileName": "/src/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { MyClass } from \"../packages/mylib\";\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "../packages/mylib", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "../packages/mylib", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { MyClass } from \"../packages/mylib\";\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + /src/index.ts SVC-2-1 "import { MyClass } from \"../packages/mylib\";\n\nconst a = new MyClass();\nconst b = new MyClass2();" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 45, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 2, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 3, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 3, + "endLine": 1, + "endOffset": 3, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 4, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 15, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 4, + "endLine": 1, + "endOffset": 4, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 5, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 17, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 6, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 7, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 7, + "endLine": 1, + "endOffset": 7, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 8, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 8, + "endLine": 1, + "endOffset": 8, + "insertString": "{" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 9, + "key": "{" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 10, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "M" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 11, + "key": "M" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 11, + "endLine": 1, + "endOffset": 11, + "insertString": "y" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 12, + "key": "y" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 12, + "endLine": 1, + "endOffset": 12, + "insertString": "C" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 13, + "key": "C" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 13, + "endLine": 1, + "endOffset": 13, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 14, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 15, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 16, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 16, + "endLine": 1, + "endOffset": 16, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 17, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 17, + "endLine": 1, + "endOffset": 17, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 18, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 19, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 20, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 21, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 49, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 22, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 51, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 23, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 53, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 24, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 55, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 25, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 57, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 26, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 59, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 27, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 61, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "y" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 28, + "key": "y" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 63, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 29, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 65, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 30, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 67, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 31, + "key": "b" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 69, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 32, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 71, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 33, + "key": ";" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 73, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 74, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 4, + "offset": 23 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /packages/mylib/mySubDir/myClass.ts Text-1 "export class MyClass {}" + /packages/mylib/mySubDir/myClass2.ts Text-1 "export class MyClass2 {}" + /packages/mylib/mySubDir/index.ts Text-1 "export * from \"./myClass\";\nexport * from \"./myClass2\";" + /packages/mylib/index.ts Text-1 "export * from \"./mySubDir\";" + /src/index.ts SVC-2-34 "import { MyClass } from \"mylib\";\n\nconst a = new MyClass();\nconst b = new MyClass2();" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 3 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 75, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 4, + "offset": 15 + }, + "end": { + "line": 4, + "offset": 23 + } + }, + "entries": [ + { + "name": "a", + "kind": "const", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "MyClass", + "kind": "alias", + "kindModifiers": "export", + "sortText": "11" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "MyClass2", + "kind": "class", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "mylib", + "sourceDisplay": [ + { + "text": "mylib", + "kind": "text" + } + ], + "data": { + "exportName": "MyClass2", + "exportMapKey": "8 * MyClass2 ", + "moduleSpecifier": "mylib", + "fileName": "/packages/mylib/mySubDir/myClass2.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js new file mode 100644 index 00000000000..d895532ceb5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js @@ -0,0 +1,1742 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +I + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/node/index.d.ts] +declare module "process" { + global { + var process: NodeJS.Process; + namespace NodeJS { + interface Process { + argv: string[]; + } + } + } + export = process; +} + +//// [/node_modules/@types/ts-node/index.d.ts] +export {}; +declare const REGISTER_INSTANCE: unique symbol; +declare global { + namespace NodeJS { + interface Process { + [REGISTER_INSTANCE]?: Service; + } + } +} + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/ts-node/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "I" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module \"process\" {\n global {\n var process: NodeJS.Process;\n namespace NodeJS {\n interface Process {\n argv: string[];\n }\n }\n }\n export = process;\n}" + /node_modules/@types/ts-node/index.d.ts Text-1 "export {};\ndeclare const REGISTER_INSTANCE: unique symbol;\ndeclare global {\n namespace NodeJS {\n interface Process {\n [REGISTER_INSTANCE]?: Service;\n }\n }\n}" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + node_modules/@types/ts-node/index.d.ts + Entry point for implicit type library 'ts-node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + /node_modules/@types/node/index.d.ts Text-1 "declare module \"process\" {\n global {\n var process: NodeJS.Process;\n namespace NodeJS {\n interface Process {\n argv: string[];\n }\n }\n }\n export = process;\n}" + /node_modules/@types/ts-node/index.d.ts Text-1 "export {};\ndeclare const REGISTER_INSTANCE: unique symbol;\ndeclare global {\n namespace NodeJS {\n interface Process {\n [REGISTER_INSTANCE]?: Service;\n }\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + node_modules/@types/ts-node/index.d.ts + Entry point for implicit type library 'ts-node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/ts-node/index.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/ts-node/index.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "process", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "N" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "key": "N" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-2-2 "IN" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module \"process\" {\n global {\n var process: NodeJS.Process;\n namespace NodeJS {\n interface Process {\n argv: string[];\n }\n }\n }\n export = process;\n}" + /node_modules/@types/ts-node/index.d.ts Text-1 "export {};\ndeclare const REGISTER_INSTANCE: unique symbol;\ndeclare global {\n namespace NodeJS {\n interface Process {\n [REGISTER_INSTANCE]?: Service;\n }\n }\n}" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 8, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 3 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "process", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js new file mode 100644 index 00000000000..9811c6e7a29 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js @@ -0,0 +1,1013 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +someMo + +//// [/someModule.ts] +export const someModule = 0; +export default 1; + +//// [/tsconfig.json] +{ "compilerOptions": { "noLib": true } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/someModule.ts" + ], + "options": { + "noLib": true, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /someModule.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /index.ts Text-1 "someMo" + /someModule.ts Text-1 "export const someModule = 0;\nexport default 1;" + + + index.ts + Matched by default include pattern '**/*' + someModule.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (1) + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"noLib\": true } }" + + + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/someModule.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/someModule.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 7 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "someModule", + "kind": "property", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "/someModule", + "data": { + "exportName": "default", + "exportMapKey": "10 * someModule ", + "fileName": "/someModule.ts" + } + }, + { + "name": "someModule", + "kind": "const", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "/someModule", + "data": { + "exportName": "someModule", + "exportMapKey": "10 * someModule ", + "fileName": "/someModule.ts" + } + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "entryNames": [ + { + "name": "someModule", + "source": "/someModule", + "data": { + "exportName": "default", + "exportMapKey": "10 * someModule ", + "fileName": "/someModule.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 4, + "success": true, + "body": [ + { + "name": "default", + "kindModifiers": "export", + "kind": "property", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "default", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "1", + "kind": "stringLiteral" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"./someModule\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import someModule from \"./someModule\";\r\n\r\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "./someModule", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "./someModule", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "entryNames": [ + { + "name": "someModule", + "source": "/someModule", + "data": { + "exportName": "someModule", + "exportMapKey": "10 * someModule ", + "fileName": "/someModule.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 5, + "success": true, + "body": [ + { + "name": "someModule", + "kindModifiers": "export", + "kind": "const", + "displayParts": [ + { + "text": "const", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "someModule", + "kind": "localName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "0", + "kind": "stringLiteral" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"./someModule\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { someModule } from \"./someModule\";\r\n\r\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "./someModule", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "./someModule", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "entryNames": [ + { + "name": "someModule", + "source": "/someModule", + "data": { + "exportName": "default", + "fileName": "/someModule.ts" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 6, + "success": true, + "body": [ + { + "name": "default", + "kindModifiers": "export", + "kind": "property", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "default", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "1", + "kind": "stringLiteral" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"./someModule\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import someModule from \"./someModule\";\r\n\r\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "./someModule", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "./someModule", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import someModule from \"./someModule\";\r\n\r\n" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js new file mode 100644 index 00000000000..ca41b2b2a63 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js @@ -0,0 +1,1975 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] + + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/third_party/marked/src/defaults.js] +function getDefaults() { + return { + baseUrl: null, + }; +} + +function changeDefaults(newDefaults) { + module.exports.defaults = newDefaults; +} + +module.exports = { + defaults: getDefaults(), + getDefaults, + changeDefaults +}; + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs", "allowJs": true } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/third_party/marked/src/defaults.js" + ], + "options": { + "module": 1, + "allowJs": true, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /third_party/marked/src/defaults.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "" + /lib.d.ts Text-1 lib.d.ts-Text + /third_party/marked/src/defaults.js Text-1 "function getDefaults() {\n return {\n baseUrl: null,\n };\n}\n\nfunction changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n}\n\nmodule.exports = {\n defaults: getDefaults(),\n getDefaults,\n changeDefaults\n};" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + third_party/marked/src/defaults.js + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot write file '/third_party/marked/src/defaults.js' because it would overwrite input file.", + "code": 5055, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\", \"allowJs\": true } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/third_party/marked/src/defaults.js: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/third_party/marked/src/defaults.js: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 3 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "changeDefaults", + "kind": "property", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "changeDefaults", + "exportMapKey": "14 * changeDefaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "defaults", + "kind": "alias", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "defaults", + "exportMapKey": "8 * defaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "getDefaults", + "kind": "property", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "getDefaults", + "exportMapKey": "11 * getDefaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 7, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 8, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-2-2 "d" + /lib.d.ts Text-1 lib.d.ts-Text + /third_party/marked/src/defaults.js Text-1 "function getDefaults() {\n return {\n baseUrl: null,\n };\n}\n\nfunction changeDefaults(newDefaults) {\n module.exports.defaults = newDefaults;\n}\n\nmodule.exports = {\n defaults: getDefaults(),\n getDefaults,\n changeDefaults\n};" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 3 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 9, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "changeDefaults", + "kind": "property", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "changeDefaults", + "exportMapKey": "14 * changeDefaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "defaults", + "kind": "alias", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "defaults", + "exportMapKey": "8 * defaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "getDefaults", + "kind": "property", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "getDefaults", + "exportMapKey": "11 * getDefaults ", + "fileName": "/third_party/marked/src/defaults.js" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "entryNames": [ + { + "name": "defaults", + "source": "/third_party/marked/src/defaults", + "data": { + "exportName": "defaults", + "fileName": "/third_party/marked/src/defaults.js" + } + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 10, + "success": true, + "body": [ + { + "name": "defaults", + "kindModifiers": "", + "kind": "alias", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "parameter", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "defaults", + "kind": "aliasName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "defaults", + "kind": "aliasName" + } + ], + "documentation": [], + "tags": [], + "codeActions": [ + { + "description": "Add import from \"./third_party/marked/src/defaults\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "span": { + "start": 0, + "length": 0 + }, + "newText": "import { defaults } from \"./third_party/marked/src/defaults\";\n\n" + } + ] + } + ] + } + ], + "source": [ + { + "text": "./third_party/marked/src/defaults", + "kind": "text" + } + ], + "sourceDisplay": [ + { + "text": "./third_party/marked/src/defaults", + "kind": "text" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { defaults } from \"./third_party/marked/src/defaults\";\n\n" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js new file mode 100644 index 00000000000..bf62ab39c73 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js @@ -0,0 +1,1864 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +C + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@jest/types/Config.d.ts] +export interface ConfigGlobals { + [K: string]: unknown; +} + +//// [/node_modules/@jest/types/index.d.ts] +import type * as Config from "./Config"; +export type { Config }; + +//// [/node_modules/@jest/types/package.json] +{ "name": "@jest/types" } + +//// [/node_modules/ts-jest/index.d.ts] +export {}; +declare module "@jest/types" { + namespace Config { + interface ConfigGlobals { + 'ts-jest': any; + } + } +} + +//// [/package.json] +{ "dependencies": { "@jest/types": "*", "ts-jest": "*" } } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "C" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@jest/types/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@jest/types/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@jest/types/Config.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/@jest/types/Config.d.ts Text-1 "export interface ConfigGlobals {\n [K: string]: unknown;\n}" + /node_modules/@jest/types/index.d.ts Text-1 "import type * as Config from \"./Config\";\nexport type { Config };" + + + node_modules/@jest/types/Config.d.ts + Imported via "./Config" from file 'node_modules/@jest/types/index.d.ts' + node_modules/@jest/types/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@jest/types/Config.d.ts: *new* + {"pollingInterval":500} +/node_modules/@jest/types/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@jest/types/package.json: *new* + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/Config.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/index.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@jest/types/package.json 2000 undefined Project: /dev/null/autoImportProviderProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/@jest/types/Config.d.ts Text-1 "export interface ConfigGlobals {\n [K: string]: unknown;\n}" + /node_modules/@jest/types/index.d.ts Text-1 "import type * as Config from \"./Config\";\nexport type { Config };" + + + node_modules/@jest/types/Config.d.ts + Imported via "./Config" from file 'node_modules/@jest/types/index.d.ts' + node_modules/@jest/types/index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": *, + "createAutoImportProviderProgramDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Config", + "kind": "alias", + "kindModifiers": "declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@jest/types/index", + "isPackageJsonImport": true, + "data": { + "exportName": "Config", + "exportMapKey": "6 * Config ", + "fileName": "/node_modules/@jest/types/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/Config.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/index.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-2-2 "Co" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject2*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 8, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 9, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 3 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Config", + "kind": "alias", + "kindModifiers": "declare", + "sortText": "16", + "hasAction": true, + "source": "@jest/types", + "sourceDisplay": [ + { + "text": "@jest/types", + "kind": "text" + } + ], + "isPackageJsonImport": true, + "data": { + "exportName": "Config", + "exportMapKey": "6 * Config ", + "moduleSpecifier": "@jest/types", + "fileName": "/node_modules/@jest/types/index.d.ts", + "isPackageJsonImport": true + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/Config.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/index.d.ts: + {"pollingInterval":500} +/node_modules/@jest/types/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} +/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js new file mode 100644 index 00000000000..b0436bd517c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js @@ -0,0 +1,1029 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/main.ts] +normalize + +//// [/tests/cases/fourslash/server/path.d.ts] +declare module "path/posix" { + export function normalize(p: string): string; +} +declare module "path/win32" { + export function normalize(p: string): string; +} +declare module "path" { + export function normalize(p: string): string; +} + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/main.ts", + "/tests/cases/fourslash/server/path.d.ts" + ], + "options": { + "module": 1, + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 1 undefined Config: /tests/cases/fourslash/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 1 undefined Config: /tests/cases/fourslash/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/path.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/main.ts Text-1 "normalize" + /tests/cases/fourslash/server/path.d.ts Text-1 "declare module \"path/posix\" {\n export function normalize(p: string): string;\n}\ndeclare module \"path/win32\" {\n export function normalize(p: string): string;\n}\ndeclare module \"path\" {\n export function normalize(p: string): string;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + main.ts + Matched by default include pattern '**/*' + path.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/main.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/path.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/main.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/main.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/main.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/path.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/main.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server: + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeCompletionsWithInsertText": true, + "allowIncompleteCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/main.ts", + "line": 1, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 3 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 10 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "normalize", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "path", + "sourceDisplay": [ + { + "text": "path", + "kind": "text" + } + ], + "data": { + "exportName": "normalize", + "exportMapKey": "9 * normalize path", + "moduleSpecifier": "path", + "ambientModuleName": "path" + } + }, + { + "name": "normalize", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "path/posix", + "sourceDisplay": [ + { + "text": "path/posix", + "kind": "text" + } + ], + "data": { + "exportName": "normalize", + "exportMapKey": "9 * normalize path/posix", + "moduleSpecifier": "path/posix", + "ambientModuleName": "path/posix" + } + }, + { + "name": "normalize", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "path/win32", + "sourceDisplay": [ + { + "text": "path/win32", + "kind": "text" + } + ], + "data": { + "exportName": "normalize", + "exportMapKey": "9 * normalize path/win32", + "moduleSpecifier": "path/win32", + "ambientModuleName": "path/win32" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js b/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js new file mode 100644 index 00000000000..ae78c95b063 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js @@ -0,0 +1,629 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/classes.ts] +import { Component } from "./utils.js"; + +export class MyComponent extends Component { + render +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "nodenext" + } +} + +//// [/utils.ts] +export class Element { + // ... +} + +export abstract class Component { + abstract render(): Element; +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/classes.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/utils.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /classes.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /utils.ts Text-1 "export class Element {\n // ...\n}\n\nexport abstract class Component {\n abstract render(): Element;\n}" + /classes.ts Text-1 "import { Component } from \"./utils.js\";\n\nexport class MyComponent extends Component {\n render\n}" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + utils.ts + Imported via "./utils.js" from file 'classes.ts' + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' was not found + classes.ts + Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' was not found + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"nodenext\"\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/classes.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} +/utils.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/classes.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /classes.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /classes.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /classes.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/utils.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/classes.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsWithInsertText": true, + "includeCompletionsWithSnippetText": true, + "includeCompletionsWithClassMemberSnippets": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/classes.ts", + "line": 4, + "offset": 11 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": true, + "optionalReplacementSpan": { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 11 + } + }, + "entries": [ + { + "name": "render", + "kind": "method", + "kindModifiers": "abstract", + "sortText": "11", + "insertText": "render(): Element {\r\n $0\r\n}", + "filterText": "render", + "isSnippet": true, + "hasAction": true, + "source": "ClassMemberSnippet/" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "accessor", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "constructor", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "get", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "override", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "private", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "protected", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "public", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "set", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "static", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/utils.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /utils.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /classes.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /utils.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/utils.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/classes.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /classes.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /utils.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/classes.ts", + "line": 4, + "offset": 10, + "endLine": 4, + "endOffset": 11, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsWithInsertText": true, + "includeCompletionsWithSnippetText": true, + "includeCompletionsWithClassMemberSnippets": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/classes.ts", + "line": 4, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /utils.ts Text-1 "export class Element {\n // ...\n}\n\nexport abstract class Component {\n abstract render(): Element;\n}" + /classes.ts SVC-2-1 "import { Component } from \"./utils.js\";\n\nexport class MyComponent extends Component {\n rende\n}" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 8, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": true, + "optionalReplacementSpan": { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 10 + } + }, + "entries": [ + { + "name": "render", + "kind": "method", + "kindModifiers": "abstract", + "sortText": "11", + "insertText": "render(): Element {\r\n $0\r\n}", + "filterText": "render", + "isSnippet": true, + "hasAction": true, + "source": "ClassMemberSnippet/" + }, + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "accessor", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "constructor", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "get", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "override", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "private", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "protected", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "public", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "set", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "static", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js b/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js new file mode 100644 index 00000000000..7dcb0088ed7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js @@ -0,0 +1,334 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +let x = [1, 2]; + + + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "plugins": [ + { "name": "configurable-diagnostic-adder" , "message": "configured error" } + ] + }, + "files": ["a.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts" + ], + "options": { + "plugins": [ + { + "name": "configurable-diagnostic-adder", + "message": "configured error" + } + ], + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Enabling plugin configurable-diagnostic-adder from candidate paths: /../../.. +Info seq [hh:mm:ss:mss] Loading configurable-diagnostic-adder from /../../.. (resolved to /../../../node_modules) +Info seq [hh:mm:ss:mss] Plugin validation succeeded +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "let x = [1, 2];\n\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"plugins\": [\n { \"name\": \"configurable-diagnostic-adder\" , \"message\": \"configured error\" }\n ]\n },\n \"files\": [\"a.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [ + { + "message": "configured error", + "start": 0, + "length": 3, + "category": "error", + "code": 9999, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "pluginName": "configurable-diagnostic-adder", + "configuration": { + "message": "new error" + } + }, + "command": "configurePlugin" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configurePlugin", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "new error", + "start": 0, + "length": 3, + "category": "error", + "code": 9999, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server1.js b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server1.js new file mode 100644 index 00000000000..66566de83ab --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server1.js @@ -0,0 +1,244 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/test123.js] +// Comment +function fn() { + this.baz = 10; +} +fn.prototype.bar = function () { + console.log('hello world'); +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test123.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test123.js SVC-1-0 "// Comment\nfunction fn() {\n this.baz = 10;\n}\nfn.prototype.bar = function () {\n console.log('hello world');\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + test123.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test123.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "This constructor function may be converted to a class declaration.", + "start": 20, + "length": 2, + "category": "suggestion", + "code": 80002, + "startLocation": { + "line": 2, + "offset": 10 + }, + "endLocation": { + "line": 2, + "offset": 12 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "startLine": 2, + "startOffset": 10, + "endLine": 2, + "endOffset": 12, + "errorCodes": [ + 80002 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 5, + "success": true, + "body": [ + { + "fixName": "convertFunctionToEs6Class", + "description": "Convert function to an ES2015 class", + "changes": [ + { + "fileName": "/tests/cases/fourslash/server/test123.js", + "textChanges": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 2 + }, + "newText": "class fn {\r\n constructor() {\r\n this.baz = 10;\r\n }\r\n bar() {\r\n console.log('hello world');\r\n }\r\n}" + }, + { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 2 + }, + "newText": "" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server2.js b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server2.js new file mode 100644 index 00000000000..e87485dbaee --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server2.js @@ -0,0 +1,246 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/test123.js] +/** + * JSDoc Comment + */ +function fn() { + this.baz = 10; +} +fn.prototype.bar = function () { + console.log('hello world'); +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test123.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test123.js SVC-1-0 "/**\n * JSDoc Comment\n */\nfunction fn() {\n this.baz = 10;\n}\nfn.prototype.bar = function () {\n console.log('hello world');\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + test123.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test123.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "This constructor function may be converted to a class declaration.", + "start": 34, + "length": 2, + "category": "suggestion", + "code": 80002, + "startLocation": { + "line": 4, + "offset": 10 + }, + "endLocation": { + "line": 4, + "offset": 12 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test123.js", + "startLine": 4, + "startOffset": 10, + "endLine": 4, + "endOffset": 12, + "errorCodes": [ + 80002 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 5, + "success": true, + "body": [ + { + "fixName": "convertFunctionToEs6Class", + "description": "Convert function to an ES2015 class", + "changes": [ + { + "fileName": "/tests/cases/fourslash/server/test123.js", + "textChanges": [ + { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 2 + }, + "newText": "class fn {\r\n constructor() {\r\n this.baz = 10;\r\n }\r\n bar() {\r\n console.log('hello world');\r\n }\r\n}" + }, + { + "start": { + "line": 7, + "offset": 1 + }, + "end": { + "line": 9, + "offset": 2 + }, + "newText": "" + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapGoToDefinition.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapGoToDefinition.js new file mode 100644 index 00000000000..8902b7b1145 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapGoToDefinition.js @@ -0,0 +1,305 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): void {} + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/tests/cases/fourslash/server/indexdef.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): void; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=indexdef.d.ts.map + +//// [/tests/cases/fourslash/server/indexdef.d.ts.map] +{"version":3,"file":"indexdef.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IACpC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/tests/cases/fourslash/server/mymodule.ts] +import * as mod from "./indexdef"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/index.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/index.ts SVC-1-0 "export class Foo {\n member: string;\n methodName(propName: SomeType): void {}\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/mymodule.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server 0 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/indexdef.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/indexdef.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): void;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=indexdef.d.ts.map" + /tests/cases/fourslash/server/mymodule.ts SVC-1-0 "import * as mod from \"./indexdef\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + indexdef.d.ts + Imported via "./indexdef" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/indexdef.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectories:: +/tests/cases/fourslash/server: *new* + {} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} + {} *new* +/tests/cases/fourslash/server/node_modules: + {} + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/indexdef.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 2, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/indexdef.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/indexdef.d.ts.map: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectories:: +/tests/cases/fourslash/server: + {} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js new file mode 100644 index 00000000000..dd28dc7c023 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js @@ -0,0 +1,552 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/dist/index.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): SomeType; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=index.d.ts.map + +//// [/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Foo = void 0; +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.methodName = function (propName) { return propName; }; + Foo.prototype.otherMethod = function () { + if (Math.random() > 0.5) { + return { x: 42 }; + } + return { y: "yes" }; + }; + return Foo; +}()); +exports.Foo = Foo; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUcifQ== + +//// [/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): SomeType { return propName; } + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/mymodule.ts] +import * as mod from "/dist/index"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dist", + "inlineSourceMap": true, + "declaration": true, + "declarationMap": true, + "newLine": "lf", + }, + "files": ["/index.ts"], +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "outDir": "/dist", + "inlineSourceMap": true, + "declaration": true, + "declarationMap": true, + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "export class Foo {\n member: string;\n methodName(propName: SomeType): SomeType { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/index.ts\"],\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "emit-output" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "emit-output", + "request_seq": 2, + "success": true, + "body": { + "outputFiles": [ + { + "name": "/dist/index.js", + "writeByteOrderMark": false, + "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUcifQ==" + }, + { + "name": "/dist/index.d.ts.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../index.ts\"],\"names\":[],\"mappings\":\"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB\"}" + }, + { + "name": "/dist/index.d.ts", + "writeByteOrderMark": false, + "text": "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + } + ], + "emitSkipped": false, + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /mymodule.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/mymodule.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /dist/index.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + /mymodule.ts SVC-1-0 "import * as mod from \"/dist/index\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + dist/index.d.ts + Imported via "/dist/index" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/dist/index.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } +After Request +watchedFiles:: +/dist/index.d.ts: + {"pollingInterval":500} +/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 5, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 26 + }, + "contextStart": { + "line": 12, + "offset": 1 + }, + "contextEnd": { + "line": 14, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 6, + "success": true, + "body": { + "definitions": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 7, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js new file mode 100644 index 00000000000..8695f03692b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js @@ -0,0 +1,554 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/dist/index.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): SomeType; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=index.d.ts.map + +//// [/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Foo = void 0; +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.methodName = function (propName) { return propName; }; + Foo.prototype.otherMethod = function () { + if (Math.random() > 0.5) { + return { x: 42 }; + } + return { y: "yes" }; + }; + return Foo; +}()); +exports.Foo = Foo; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUciLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19 + +//// [/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): SomeType { return propName; } + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/mymodule.ts] +import * as mod from "/dist/index"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dist", + "inlineSourceMap": true, + "inlineSources": true, + "declaration": true, + "declarationMap": true, + "newLine": "lf", + }, + "files": ["/index.ts"], +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "outDir": "/dist", + "inlineSourceMap": true, + "inlineSources": true, + "declaration": true, + "declarationMap": true, + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "export class Foo {\n member: string;\n methodName(propName: SomeType): SomeType { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"inlineSourceMap\": true,\n \"inlineSources\": true,\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/index.ts\"],\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "emit-output" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "emit-output", + "request_seq": 2, + "success": true, + "body": { + "outputFiles": [ + { + "name": "/dist/index.js", + "writeByteOrderMark": false, + "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsT0FBTyxFQUFDLENBQUMsRUFBRSxFQUFFLEVBQUMsQ0FBQztRQUNuQixDQUFDO1FBQ0QsT0FBTyxFQUFDLENBQUMsRUFBRSxLQUFLLEVBQUMsQ0FBQztJQUN0QixDQUFDO0lBQ0wsVUFBQztBQUFELENBQUMsQUFURCxJQVNDO0FBVFksa0JBQUciLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgRm9vIHtcbiAgICBtZW1iZXI6IHN0cmluZztcbiAgICBtZXRob2ROYW1lKHByb3BOYW1lOiBTb21lVHlwZSk6IFNvbWVUeXBlIHsgcmV0dXJuIHByb3BOYW1lOyB9XG4gICAgb3RoZXJNZXRob2QoKSB7XG4gICAgICAgIGlmIChNYXRoLnJhbmRvbSgpID4gMC41KSB7XG4gICAgICAgICAgICByZXR1cm4ge3g6IDQyfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4ge3k6IFwieWVzXCJ9O1xuICAgIH1cbn1cblxuZXhwb3J0IGludGVyZmFjZSBTb21lVHlwZSB7XG4gICAgbWVtYmVyOiBudW1iZXI7XG59Il19" + }, + { + "name": "/dist/index.d.ts.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../index.ts\"],\"names\":[],\"mappings\":\"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB\"}" + }, + { + "name": "/dist/index.d.ts", + "writeByteOrderMark": false, + "text": "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + } + ], + "emitSkipped": false, + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /mymodule.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/mymodule.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /dist/index.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + /mymodule.ts SVC-1-0 "import * as mod from \"/dist/index\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + dist/index.d.ts + Imported via "/dist/index" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/dist/index.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } +After Request +watchedFiles:: +/dist/index.d.ts: + {"pollingInterval":500} +/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 5, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 26 + }, + "contextStart": { + "line": 12, + "offset": 1 + }, + "contextEnd": { + "line": 14, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 6, + "success": true, + "body": { + "definitions": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 7, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js new file mode 100644 index 00000000000..115692d9bf7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js @@ -0,0 +1,550 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/dist/index.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): SomeType; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=index.d.ts.map + +//// [/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Foo = void 0; +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.methodName = function (propName) { return propName; }; + Foo.prototype.otherMethod = function () { + if (Math.random() > 0.5) { + return { x: 42 }; + } + return { y: "yes" }; + }; + return Foo; +}()); +exports.Foo = Foo; + + +//// [/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): SomeType { return propName; } + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/mymodule.ts] +import * as mod from "/dist/index"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dist", + "declaration": true, + "declarationMap": true, + "newLine": "lf", + }, + "files": ["/index.ts"], +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "outDir": "/dist", + "declaration": true, + "declarationMap": true, + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "export class Foo {\n member: string;\n methodName(propName: SomeType): SomeType { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/index.ts\"],\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "emit-output" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "emit-output", + "request_seq": 2, + "success": true, + "body": { + "outputFiles": [ + { + "name": "/dist/index.js", + "writeByteOrderMark": false, + "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n" + }, + { + "name": "/dist/index.d.ts.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.d.ts\",\"sourceRoot\":\"\",\"sources\":[\"../index.ts\"],\"names\":[],\"mappings\":\"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB\"}" + }, + { + "name": "/dist/index.d.ts", + "writeByteOrderMark": false, + "text": "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + } + ], + "emitSkipped": false, + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /mymodule.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/mymodule.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /dist/index.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + /mymodule.ts SVC-1-0 "import * as mod from \"/dist/index\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + dist/index.d.ts + Imported via "/dist/index" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/dist/index.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } +After Request +watchedFiles:: +/dist/index.d.ts: + {"pollingInterval":500} +/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 5, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 26 + }, + "contextStart": { + "line": 12, + "offset": 1 + }, + "contextEnd": { + "line": 14, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 6, + "success": true, + "body": { + "definitions": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 7, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js new file mode 100644 index 00000000000..f8bddd45c39 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js @@ -0,0 +1,562 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/dist/index.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): SomeType; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=index.d.ts.map + +//// [/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Foo = void 0; +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.methodName = function (propName) { return propName; }; + Foo.prototype.otherMethod = function () { + if (Math.random() > 0.5) { + return { x: 42 }; + } + return { y: "yes" }; + }; + return Foo; +}()); +exports.Foo = Foo; +//# sourceMappingURL=index.js.map + +//// [/dist/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;AAAA;IAAA;IASA,CAAC;IAPG,wBAAU,GAAV,UAAW,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,yBAAW,GAAX;QACI,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;IACL,UAAC;AAAD,CAAC,AATD,IASC;AATY,kBAAG"} + +//// [/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): SomeType { return propName; } + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/mymodule.ts] +import * as mod from "/dist/index"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dist", + "sourceMap": true, + "sourceRoot": "/", + "declaration": true, + "declarationMap": true, + "newLine": "lf", + }, + "files": ["/index.ts"], +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "outDir": "/dist", + "sourceMap": true, + "sourceRoot": "/", + "declaration": true, + "declarationMap": true, + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "export class Foo {\n member: string;\n methodName(propName: SomeType): SomeType { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"sourceMap\": true,\n \"sourceRoot\": \"/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/index.ts\"],\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "emit-output" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "emit-output", + "request_seq": 2, + "success": true, + "body": { + "outputFiles": [ + { + "name": "/dist/index.js.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.js\",\"sourceRoot\":\"/\",\"sources\":[\"index.ts\"],\"names\":[],\"mappings\":\";;;AAAA;IAAA;IASA,CAAC;IAPG,wBAAU,GAAV,UAAW,QAAkB,IAAc,OAAO,QAAQ,CAAC,CAAC,CAAC;IAC7D,yBAAW,GAAX;QACI,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;QACnB,CAAC;QACD,OAAO,EAAC,CAAC,EAAE,KAAK,EAAC,CAAC;IACtB,CAAC;IACL,UAAC;AAAD,CAAC,AATD,IASC;AATY,kBAAG\"}" + }, + { + "name": "/dist/index.js", + "writeByteOrderMark": false, + "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n//# sourceMappingURL=index.js.map" + }, + { + "name": "/dist/index.d.ts.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.d.ts\",\"sourceRoot\":\"/\",\"sources\":[\"index.ts\"],\"names\":[],\"mappings\":\"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB\"}" + }, + { + "name": "/dist/index.d.ts", + "writeByteOrderMark": false, + "text": "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + } + ], + "emitSkipped": false, + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /mymodule.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/mymodule.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /dist/index.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + /mymodule.ts SVC-1-0 "import * as mod from \"/dist/index\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + dist/index.d.ts + Imported via "/dist/index" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/dist/index.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } +After Request +watchedFiles:: +/dist/index.d.ts: + {"pollingInterval":500} +/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 5, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 26 + }, + "contextStart": { + "line": 12, + "offset": 1 + }, + "contextEnd": { + "line": 14, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 6, + "success": true, + "body": { + "definitions": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 7, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js new file mode 100644 index 00000000000..8d94e0d4da6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js @@ -0,0 +1,582 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/dist/index.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): SomeType; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=index.d.ts.map + +//// [/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + +//// [/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Foo = void 0; +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.methodName = function (propName) { return propName; }; + Foo.prototype.otherMethod = function () { + if (Math.random() > 0.5) { + return { x: 42 }; + } + return { y: "yes" }; + }; + return Foo; +}()); +exports.Foo = Foo; + + +//// [/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): SomeType { return propName; } + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/mymodule.ts] +import * as mod from "/dist/index"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dist", + "sourceRoot": "/", + "declaration": true, + "declarationMap": true, + "newLine": "lf", + }, + "files": ["/index.ts"], +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "outDir": "/dist", + "sourceRoot": "/", + "declaration": true, + "declarationMap": true, + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "export class Foo {\n member: string;\n methodName(propName: SomeType): SomeType { return propName; }\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 4, + "offset": 9 + }, + "end": { + "line": 4, + "offset": 21 + }, + "text": "Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.", + "code": 5051, + "category": "error", + "fileName": "/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"outDir\": \"./dist\",\n \"sourceRoot\": \"/\",\n \"declaration\": true,\n \"declarationMap\": true,\n \"newLine\": \"lf\",\n },\n \"files\": [\"/index.ts\"],\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "emit-output" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "emit-output", + "request_seq": 2, + "success": true, + "body": { + "outputFiles": [ + { + "name": "/dist/index.js", + "writeByteOrderMark": false, + "text": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Foo = void 0;\nvar Foo = /** @class */ (function () {\n function Foo() {\n }\n Foo.prototype.methodName = function (propName) { return propName; };\n Foo.prototype.otherMethod = function () {\n if (Math.random() > 0.5) {\n return { x: 42 };\n }\n return { y: \"yes\" };\n };\n return Foo;\n}());\nexports.Foo = Foo;\n" + }, + { + "name": "/dist/index.d.ts.map", + "writeByteOrderMark": false, + "text": "{\"version\":3,\"file\":\"index.d.ts\",\"sourceRoot\":\"/\",\"sources\":[\"index.ts\"],\"names\":[],\"mappings\":\"AAAA,qBAAa,GAAG;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IACxC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB\"}" + }, + { + "name": "/dist/index.d.ts", + "writeByteOrderMark": false, + "text": "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + } + ], + "emitSkipped": false, + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /mymodule.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/mymodule.ts", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 4, + "offset": 9 + }, + "end": { + "line": 4, + "offset": 21 + }, + "text": "Option 'sourceRoot can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.", + "code": 5051, + "category": "error", + "fileName": "/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /dist/index.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): SomeType;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=index.d.ts.map" + /mymodule.ts SVC-1-0 "import * as mod from \"/dist/index\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + dist/index.d.ts + Imported via "/dist/index" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/dist/index.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } +After Request +watchedFiles:: +/dist/index.d.ts: + {"pollingInterval":500} +/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 5, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 12, + "offset": 18 + }, + "end": { + "line": 12, + "offset": 26 + }, + "contextStart": { + "line": 12, + "offset": 1 + }, + "contextEnd": { + "line": 14, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 6, + "success": true, + "body": { + "definitions": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 7, + "success": true, + "body": [ + { + "file": "/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionRelativeSourceRoot.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionRelativeSourceRoot.js new file mode 100644 index 00000000000..c7606c08bc6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionRelativeSourceRoot.js @@ -0,0 +1,301 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/index.ts] +export class Foo { + member: string; + methodName(propName: SomeType): void {} + otherMethod() { + if (Math.random() > 0.5) { + return {x: 42}; + } + return {y: "yes"}; + } +} + +export interface SomeType { + member: number; +} + +//// [/tests/cases/fourslash/server/mymodule.ts] +import * as mod from "./out/indexdef"; +const instance = new mod.Foo(); +instance.methodName({member: 12}); + +//// [/tests/cases/fourslash/server/out/indexdef.d.ts] +export declare class Foo { + member: string; + methodName(propName: SomeType): void; + otherMethod(): { + x: number; + y?: undefined; + } | { + y: string; + x?: undefined; + }; +} +export interface SomeType { + member: number; +} +//# sourceMappingURL=out/indexdef.d.ts.map + +//// [/tests/cases/fourslash/server/out/indexdef.d.ts.map] +{"version":3,"file":"indexdef.d.ts","sourceRoot":"../","sources":["index.ts"],"names":[],"mappings":"AAAA;IACI,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IACpC,WAAW;;;;;;;CAMd;AAED,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB"} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/index.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/index.ts SVC-1-0 "export class Foo {\n member: string;\n methodName(propName: SomeType): void {}\n otherMethod() {\n if (Math.random() > 0.5) {\n return {x: 42};\n }\n return {y: \"yes\"};\n }\n}\n\nexport interface SomeType {\n member: number;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/mymodule.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/mymodule.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/out 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/out 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/out/indexdef.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/out/indexdef.d.ts Text-1 "export declare class Foo {\n member: string;\n methodName(propName: SomeType): void;\n otherMethod(): {\n x: number;\n y?: undefined;\n } | {\n y: string;\n x?: undefined;\n };\n}\nexport interface SomeType {\n member: number;\n}\n//# sourceMappingURL=out/indexdef.d.ts.map" + /tests/cases/fourslash/server/mymodule.ts SVC-1-0 "import * as mod from \"./out/indexdef\";\nconst instance = new mod.Foo();\ninstance.methodName({member: 12});" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + out/indexdef.d.ts + Imported via "./out/indexdef" from file 'mymodule.ts' + mymodule.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/mymodule.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/out/indexdef.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} + {} *new* +/tests/cases/fourslash/server/node_modules: + {} + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} + {} *new* +/tests/cases/fourslash/server/out: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/mymodule.ts", + "line": 3, + "offset": 10 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/out/indexdef.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 2, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/index.ts", + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 5 + }, + "contextEnd": { + "line": 4, + "offset": 5 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 10 + }, + "end": { + "line": 3, + "offset": 20 + } + } + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/out/indexdef.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/out/indexdef.d.ts.map: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/out: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionSameNameDifferentDirectory.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionSameNameDifferentDirectory.js new file mode 100644 index 00000000000..fb002c8ebe2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionSameNameDifferentDirectory.js @@ -0,0 +1,484 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/BaseClass/Source.d.ts] +declare class Control { + constructor(); + /** this is a super var */ + myVar: boolean | 'yeah'; +} +//# sourceMappingURL=Source.d.ts.map + +//// [/tests/cases/fourslash/server/BaseClass/Source.d.ts.map] +{"version":3,"file":"Source.d.ts","sourceRoot":"","sources":["Source.ts"],"names":[],"mappings":"AAAA,cAAM,OAAO;;IAIT,0BAA0B;IACnB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAQ;CACzC"} + +//// [/tests/cases/fourslash/server/BaseClass/Source.ts] +class Control{ + constructor(){ + return; + } + /** this is a super var */ + public myVar: boolean | 'yeah' = true; +} + +//// [/tests/cases/fourslash/server/buttonClass/Source.ts] +// I cannot F12 navigate to Control +// vvvvvvv +class Button extends Control { + public myFunction() { + // I cannot F12 navigate to myVar + // vvvvv + if (typeof this.myVar === 'boolean') { + this.myVar; + } else { + this.myVar.toLocaleUpperCase(); + } + } +} + +//// [/tests/cases/fourslash/server/buttonClass/tsconfig.json] +{ + "extends": "../tsbase.json", + "compilerOptions": { + "outFile": "Source.js" + }, + "files": [ + "Source.ts" + ], + "include": [ + "../BaseClass/Source.d.ts" + ] + } + +//// [/tests/cases/fourslash/server/tsbase.json] +{ + "$schema": "http://json.schemastore.org/tsconfig", + "compileOnSave": true, + "compilerOptions": { + "sourceMap": true, + "declaration": true, + "declarationMap": true + } + } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/BaseClass/Source.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server/BaseClass +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/BaseClass/Source.d.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/BaseClass/Source.d.ts SVC-1-0 "declare class Control {\n constructor();\n /** this is a super var */\n myVar: boolean | 'yeah';\n}\n//# sourceMappingURL=Source.d.ts.map" + + + ../../../../../lib.d.ts + Default library for target 'es5' + ../../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../../lib.d.ts' + ../../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../../lib.d.ts' + Source.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/BaseClass/Source.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/BaseClass/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/BaseClass/tsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/BaseClass/node_modules: *new* + {} +/tests/cases/fourslash/server/BaseClass/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/buttonClass/Source.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server/buttonClass +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/buttonClass/Source.ts :: Config file name: /tests/cases/fourslash/server/buttonClass/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/buttonClass/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/buttonClass/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/buttonClass/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/buttonClass/Source.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/buttonClass/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/buttonClass/Source.ts", + "/tests/cases/fourslash/server/BaseClass/Source.d.ts" + ], + "options": { + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "outFile": "/tests/cases/fourslash/server/buttonClass/Source.js", + "configFilePath": "/tests/cases/fourslash/server/buttonClass/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsbase.json 2000 undefined Config: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Extended config file +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/buttonClass/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/buttonClass/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/buttonClass/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/buttonClass/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/buttonClass/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/buttonClass/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/buttonClass/Source.ts SVC-1-0 "// I cannot F12 navigate to Control\n// vvvvvvv\nclass Button extends Control {\n public myFunction() {\n // I cannot F12 navigate to myVar\n // vvvvv\n if (typeof this.myVar === 'boolean') {\n this.myVar;\n } else {\n this.myVar.toLocaleUpperCase();\n }\n }\n}" + /tests/cases/fourslash/server/BaseClass/Source.d.ts SVC-1-0 "declare class Control {\n constructor();\n /** this is a super var */\n myVar: boolean | 'yeah';\n}\n//# sourceMappingURL=Source.d.ts.map" + + + ../../../../../lib.d.ts + Default library for target 'es5' + ../../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../../lib.d.ts' + ../../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../../lib.d.ts' + Source.ts + Part of 'files' list in tsconfig.json + ../BaseClass/Source.d.ts + Matched by include pattern '../BaseClass/Source.d.ts' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/buttonClass/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/buttonClass/Source.ts", + "configFile": "/tests/cases/fourslash/server/buttonClass/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/BaseClass/Source.d.ts + + + ../../../../../lib.d.ts + Default library for target 'es5' + ../../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../../lib.d.ts' + ../../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../../lib.d.ts' + Source.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/BaseClass/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/buttonClass/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/BaseClass/Source.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/buttonClass/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/buttonClass/Source.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/buttonClass/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/buttonClass/tsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsbase.json: *new* + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/BaseClass/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/BaseClass/tsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/buttonClass/node_modules: *new* + {} +/tests/cases/fourslash/server/buttonClass/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/BaseClass/node_modules: + {} +/tests/cases/fourslash/server/BaseClass/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/buttonClass/Source.ts", + "line": 3, + "offset": 22 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/Source.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/BaseClass/Source.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 2, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/BaseClass/Source.ts", + "start": { + "line": 1, + "offset": 7 + }, + "end": { + "line": 1, + "offset": 14 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 7, + "offset": 2 + } + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 22 + }, + "end": { + "line": 3, + "offset": 29 + } + } + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/BaseClass/Source.d.ts.map: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/BaseClass/Source.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/buttonClass/tsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsbase.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/buttonClass/node_modules: + {} +/tests/cases/fourslash/server/buttonClass/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/buttonClass/Source.ts", + "line": 7, + "offset": 25 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 3, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/BaseClass/Source.ts", + "start": { + "line": 6, + "offset": 12 + }, + "end": { + "line": 6, + "offset": 17 + }, + "contextStart": { + "line": 6, + "offset": 12 + }, + "contextEnd": { + "line": 6, + "offset": 43 + } + } + ], + "textSpan": { + "start": { + "line": 7, + "offset": 25 + }, + "end": { + "line": 7, + "offset": 30 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsOutOfDateMapping.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsOutOfDateMapping.js new file mode 100644 index 00000000000..7f41a70406e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsOutOfDateMapping.js @@ -0,0 +1,225 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { Foo } from "a"; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/a/dist/index.d.ts] +export declare class Foo { + bar: any; +} +//# sourceMappingURL=index.d.ts.map + +//// [/node_modules/a/dist/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAa,GAAG;IACZ,GAAG,MAAC;CACP"} + +//// [/node_modules/a/package.json] +{ + "name": "a", + "version": "0.0.0", + "private": true, + "main": "dist", + "types": "dist" +} + +//// [/node_modules/a/src/index.ts] +export class Foo { +} + + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/a/dist/index.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/a/dist +Info seq [hh:mm:ss:mss] For info: /node_modules/a/dist/index.d.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/a/dist/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/a/dist/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/a/dist/index.d.ts SVC-1-0 "export declare class Foo {\n bar: any;\n}\n//# sourceMappingURL=index.d.ts.map" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/a/dist/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/a/dist/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/a/dist/index.d.ts SVC-1-0 "export declare class Foo {\n bar: any;\n}\n//# sourceMappingURL=index.d.ts.map" + /index.ts SVC-1-0 "import { Foo } from \"a\";" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/a/dist/index.d.ts + Imported via "a" from file 'index.ts' with packageId 'a/dist/index.d.ts@0.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /node_modules/a/dist/index.d.ts + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /node_modules/a/dist/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /node_modules/a/dist/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/a/dist/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive *deleted*:: +/node_modules/a/dist/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13 + }, + "command": "definition" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/a/dist/index.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/a/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definition", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/node_modules/a/src/index.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 17 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 1 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/a/dist/index.d.ts.map: *new* + {"pollingInterval":500} +/node_modules/a/src/index.ts: *new* + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/definition01.js b/tests/baselines/reference/tsserver/fourslashServer/definition01.js new file mode 100644 index 00000000000..8f7820e7de5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/definition01.js @@ -0,0 +1,143 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +export class Foo {} + +//// [/tests/cases/fourslash/server/b.ts] +import n = require('./a'); +var x = new n.Foo(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "export class Foo {}" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import n = require('./a');\nvar x = new n.Foo();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Imported via './a' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 1, + "offset": 24 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 1, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + } + } + ], + "textSpan": { + "start": { + "line": 1, + "offset": 20 + }, + "end": { + "line": 1, + "offset": 25 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/documentHighlights01.js b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights01.js new file mode 100644 index 00000000000..213caba0564 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights01.js @@ -0,0 +1,479 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +function f(x: typeof f) { + f(f); +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "function f(x: typeof f) {\n f(f);\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 1, + "offset": 10, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 1, + "offset": 22, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 2, + "offset": 5, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 6, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 2, + "offset": 7, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 8, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/documentHighlights02.js b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights02.js new file mode 100644 index 00000000000..eae36f49f20 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights02.js @@ -0,0 +1,505 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +function foo () { + return 1; +} +foo(); + +//// [/tests/cases/fourslash/server/b.ts] +/// +foo(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "function foo () {\n\treturn 1;\n}\nfoo();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "function foo () {\n\treturn 1;\n}\nfoo();" + /tests/cases/fourslash/server/b.ts SVC-1-0 "/// \nfoo();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Referenced via 'a.ts' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/a.ts + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 1, + "offset": 10, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 13 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 4 + }, + "kind": "reference" + } + ] + }, + { + "file": "/tests/cases/fourslash/server/b.ts", + "highlightSpans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 4 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 4, + "offset": 1, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 6, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 13 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 4 + }, + "kind": "reference" + } + ] + }, + { + "file": "/tests/cases/fourslash/server/b.ts", + "highlightSpans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 4 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 1, + "filesToSearch": [ + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 8, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 13 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 4 + }, + "kind": "reference" + } + ] + }, + { + "file": "/tests/cases/fourslash/server/b.ts", + "highlightSpans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 4 + }, + "kind": "reference" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/documentHighlightsTypeParameterInHeritageClause01.js b/tests/baselines/reference/tsserver/fourslashServer/documentHighlightsTypeParameterInHeritageClause01.js new file mode 100644 index 00000000000..3b2a192221d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlightsTypeParameterInHeritageClause01.js @@ -0,0 +1,324 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts] +interface I extends I, T { +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts SVC-1-0 "interface I extends I, T {\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + documentHighlightsTypeParameterInHeritageClause01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "line": 1, + "offset": 13, + "filesToSearch": [ + "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 13 + }, + "end": { + "line": 1, + "offset": 14 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 26 + }, + "end": { + "line": 1, + "offset": 27 + }, + "kind": "reference" + }, + { + "start": { + "line": 1, + "offset": 30 + }, + "end": { + "line": 1, + "offset": 31 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "line": 1, + "offset": 26, + "filesToSearch": [ + "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 13 + }, + "end": { + "line": 1, + "offset": 14 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 26 + }, + "end": { + "line": 1, + "offset": 27 + }, + "kind": "reference" + }, + { + "start": { + "line": 1, + "offset": 30 + }, + "end": { + "line": 1, + "offset": 31 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "line": 1, + "offset": 30, + "filesToSearch": [ + "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 6, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/documentHighlightsTypeParameterInHeritageClause01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 13 + }, + "end": { + "line": 1, + "offset": 14 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 26 + }, + "end": { + "line": 1, + "offset": 27 + }, + "kind": "reference" + }, + { + "start": { + "line": 1, + "offset": 30 + }, + "end": { + "line": 1, + "offset": 31 + }, + "kind": "reference" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/fixExtractToInnerFunctionDuplicaton.js b/tests/baselines/reference/tsserver/fourslashServer/fixExtractToInnerFunctionDuplicaton.js new file mode 100644 index 00000000000..0fcedaa5956 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/fixExtractToInnerFunctionDuplicaton.js @@ -0,0 +1,629 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts] +function foo(): void { console.log('a'); } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts SVC-1-0 "function foo(): void { console.log('a'); }" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + fixExtractToInnerFunctionDuplicaton.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 2, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 5, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 6, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 8, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 9, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 10, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 11, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 12, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 13, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 14, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 15, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 16, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/fixExtractToInnerFunctionDuplicaton.ts", + "startLine": 1, + "startOffset": 24, + "endLine": 1, + "endOffset": 41, + "triggerReason": "implicit" + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 17, + "success": true, + "body": [ + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to inner function in function 'foo'", + "name": "function_scope_0", + "kind": "refactor.extract.function" + }, + { + "description": "Extract to function in global scope", + "name": "function_scope_1", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + }, + { + "description": "Extract to constant in global scope", + "name": "constant_scope_1", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 18, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/format01.js b/tests/baselines/reference/tsserver/fourslashServer/format01.js new file mode 100644 index 00000000000..8bcf726c925 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/format01.js @@ -0,0 +1,312 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/format01.ts] +module Default{var x= ( { } ) ;} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/format01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/format01.ts SVC-1-0 "module Default{var x= ( { } ) ;}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + format01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/format01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 33 + }, + "command": "format" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "format", + "request_seq": 1, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 15 + }, + "end": { + "line": 1, + "offset": 15 + }, + "newText": " " + }, + { + "start": { + "line": 1, + "offset": 16 + }, + "end": { + "line": 1, + "offset": 16 + }, + "newText": " " + }, + { + "start": { + "line": 1, + "offset": 21 + }, + "end": { + "line": 1, + "offset": 21 + }, + "newText": " " + }, + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 25 + }, + "newText": "" + }, + { + "start": { + "line": 1, + "offset": 26 + }, + "end": { + "line": 1, + "offset": 27 + }, + "newText": "" + }, + { + "start": { + "line": 1, + "offset": 28 + }, + "end": { + "line": 1, + "offset": 29 + }, + "newText": "" + }, + { + "start": { + "line": 1, + "offset": 30 + }, + "end": { + "line": 1, + "offset": 31 + }, + "newText": "" + }, + { + "start": { + "line": 1, + "offset": 32 + }, + "end": { + "line": 1, + "offset": 32 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 17, + "endLine": 1, + "endOffset": 17, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 28, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 29, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 30, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 31, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/format01.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": " " + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/formatBracketInSwitchCase.js b/tests/baselines/reference/tsserver/fourslashServer/formatBracketInSwitchCase.js new file mode 100644 index 00000000000..cba3bd196c1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatBracketInSwitchCase.js @@ -0,0 +1,139 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/formatBracketInSwitchCase.ts] +switch (x) { + case[]: +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatBracketInSwitchCase.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/formatBracketInSwitchCase.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/formatBracketInSwitchCase.ts SVC-1-0 "switch (x) {\n case[]:\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + formatBracketInSwitchCase.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/formatBracketInSwitchCase.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatBracketInSwitchCase.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 2 + }, + "command": "format" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "format", + "request_seq": 1, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 9 + }, + "end": { + "line": 2, + "offset": 9 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatBracketInSwitchCase.ts", + "line": 2, + "offset": 9, + "endLine": 2, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/formatOnEnter.js b/tests/baselines/reference/tsserver/fourslashServer/formatOnEnter.js new file mode 100644 index 00000000000..bd5bdaf5865 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatOnEnter.js @@ -0,0 +1,215 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/formatOnEnter.ts] +function listAPIFiles (path : string): string[] { + + +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/formatOnEnter.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/formatOnEnter.ts SVC-1-0 "function listAPIFiles (path : string): string[] {\n \n \n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + formatOnEnter.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/formatOnEnter.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts", + "line": 2, + "offset": 5, + "key": "\n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] getIndentationAtPosition: getCurrentSourceFile: * +Info seq [hh:mm:ss:mss] getIndentationAtPosition: computeIndentation: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 1, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "newText": "" + }, + { + "start": { + "line": 1, + "offset": 28 + }, + "end": { + "line": 1, + "offset": 29 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 23, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 28, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts", + "line": 3, + "offset": 5, + "key": "\n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] getIndentationAtPosition: getCurrentSourceFile: * +Info seq [hh:mm:ss:mss] getIndentationAtPosition: computeIndentation: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 4, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 5 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatOnEnter.ts", + "line": 2, + "offset": 1, + "endLine": 2, + "endOffset": 5, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/formatSpaceBetweenFunctionAndArrayIndex.js b/tests/baselines/reference/tsserver/fourslashServer/formatSpaceBetweenFunctionAndArrayIndex.js new file mode 100644 index 00000000000..64b5dfedac7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatSpaceBetweenFunctionAndArrayIndex.js @@ -0,0 +1,143 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts] + +function test() { + return []; +} + +test() [0] + + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts SVC-1-0 "\nfunction test() {\n return [];\n}\n\ntest() [0]\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + formatSpaceBetweenFunctionAndArrayIndex.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts", + "line": 1, + "offset": 1, + "endLine": 7, + "endOffset": 1 + }, + "command": "format" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "format", + "request_seq": 1, + "success": true, + "body": [ + { + "start": { + "line": 6, + "offset": 7 + }, + "end": { + "line": 6, + "offset": 8 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatSpaceBetweenFunctionAndArrayIndex.ts", + "line": 6, + "offset": 7, + "endLine": 6, + "endOffset": 8, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/formatonkey01.js b/tests/baselines/reference/tsserver/fourslashServer/formatonkey01.js new file mode 100644 index 00000000000..a9ebed8e31b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatonkey01.js @@ -0,0 +1,169 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/formatonkey01.ts] +switch (1) { + case 1: + { + + break; +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatonkey01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/formatonkey01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/formatonkey01.ts SVC-1-0 "switch (1) {\n case 1:\n {\n \n break;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + formatonkey01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/formatonkey01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatonkey01.ts", + "line": 4, + "offset": 13, + "endLine": 4, + "endOffset": 13, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatonkey01.ts", + "line": 4, + "offset": 13, + "endLine": 4, + "endOffset": 13, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatonkey01.ts", + "line": 4, + "offset": 14, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 3, + "success": true, + "body": [ + { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 13 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/formatonkey01.ts", + "line": 4, + "offset": 1, + "endLine": 4, + "endOffset": 13, + "insertString": " " + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js new file mode 100644 index 00000000000..22fb6796e50 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js @@ -0,0 +1,433 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +export * from "./util"; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/test.ts] +import "./util"; + +//// [/tsconfig.build.json] +{ "compilerOptions": { "rootDir": "src", "outDir": "dist/build", "composite": true }, "files": ["index.ts"] } + +//// [/tsconfig.json] +{ "files": [], "references": [{ "path": "tsconfig.build.json" }, { "path": "tsconfig.test.json" }] } + +//// [/tsconfig.test.json] +{ "compilerOptions": { "rootDir": "src", "outDir": "dist/test", "composite": true }, "files": ["test.ts", "index.ts"] } + +//// [/util.ts] +export {} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [], + "options": { + "configFilePath": "/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/tsconfig.build.json", + "originalPath": "tsconfig.build.json" + }, + { + "path": "/tsconfig.test.json", + "originalPath": "tsconfig.test.json" + } + ] +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Config: /tsconfig.build.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "rootDir": "/src", + "outDir": "/dist/build", + "composite": true, + "configFilePath": "/tsconfig.build.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.build.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /tsconfig.test.json : { + "rootNames": [ + "/test.ts", + "/index.ts" + ], + "options": { + "rootDir": "/src", + "outDir": "/dist/test", + "composite": true, + "configFilePath": "/tsconfig.test.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.test.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.build.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.build.json", + "reason": "Creating project referenced in solution /tsconfig.json to find possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.build.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /util.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.build.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.build.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /util.ts Text-1 "export {}" + /index.ts Text-1 "export * from \"./util\";" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + util.ts + Imported via "./util" from file 'index.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.build.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.test.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.test.json", + "reason": "Creating project referenced in solution /tsconfig.json to find possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /test.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.test.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.test.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.test.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /util.ts Text-1 "export {}" + /test.ts Text-1 "import \"./util\";" + /index.ts Text-1 "export * from \"./util\";" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + util.ts + Imported via "./util" from file 'test.ts' + Imported via "./util" from file 'index.ts' + test.ts + Part of 'files' list in tsconfig.json + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.test.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.build.json", + "diagnostics": [ + { + "text": "File '/index.ts' is not under 'rootDir' '/src'. 'rootDir' is expected to contain all source files.\n The file is in the program because:\n Part of 'files' list in tsconfig.json", + "code": 6059, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 97 + }, + "end": { + "line": 1, + "offset": 107 + }, + "file": "/tsconfig.build.json" + }, + "message": "File is matched by 'files' list specified here.", + "category": "message", + "code": 1410 + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.test.json", + "diagnostics": [ + { + "text": "File '/index.ts' is not under 'rootDir' '/src'. 'rootDir' is expected to contain all source files.\n The file is in the program because:\n Part of 'files' list in tsconfig.json", + "code": 6059, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 107 + }, + "end": { + "line": 1, + "offset": 117 + }, + "file": "/tsconfig.test.json" + }, + "message": "File is matched by 'files' list specified here.", + "category": "message", + "code": 1410 + } + ] + }, + { + "text": "File '/test.ts' is not under 'rootDir' '/src'. 'rootDir' is expected to contain all source files.\n The file is in the program because:\n Part of 'files' list in tsconfig.json", + "code": 6059, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 96 + }, + "end": { + "line": 1, + "offset": 105 + }, + "file": "/tsconfig.test.json" + }, + "message": "File is matched by 'files' list specified here.", + "category": "message", + "code": 1410 + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"files\": [], \"references\": [{ \"path\": \"tsconfig.build.json\" }, { \"path\": \"tsconfig.test.json\" }] }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.build.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.test.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/test.ts: *new* + {"pollingInterval":500} +/tsconfig.build.json: *new* + {"pollingInterval":2000} +/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.test.json: *new* + {"pollingInterval":2000} +/util.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/util.ts" + }, + "command": "fileReferences" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "fileReferences", + "request_seq": 1, + "success": true, + "body": { + "refs": [ + { + "file": "/index.ts", + "start": { + "line": 1, + "offset": 16 + }, + "end": { + "line": 1, + "offset": 22 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 24 + }, + "lineText": "export * from \"./util\";", + "isWriteAccess": false + }, + { + "file": "/test.ts", + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 17 + }, + "lineText": "import \"./util\";", + "isWriteAccess": false + } + ], + "symbolName": "\"/util.ts\"" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js new file mode 100644 index 00000000000..3e41d73cda4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js @@ -0,0 +1,284 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/a.ts] +export const a = 0; + +//// [/project/b.ts] +import "./a"; + +//// [/project/c.ts] +import {} from "./a"; + +//// [/project/d.ts] +import { a } from "/project/a"; +type T = typeof import("./a").a; + +//// [/project/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/tsconfig.json :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/tsconfig.json 2000 undefined Project: /project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/tsconfig.json", + "reason": "Creating possible configured project for /project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/tsconfig.json : { + "rootNames": [ + "/project/a.ts", + "/project/b.ts", + "/project/c.ts", + "/project/d.ts" + ], + "options": { + "configFilePath": "/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/c.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (7) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/a.ts Text-1 "export const a = 0;" + /project/b.ts Text-1 "import \"./a\";" + /project/c.ts Text-1 "import {} from \"./a\";" + /project/d.ts Text-1 "import { a } from \"/project/a\";\ntype T = typeof import(\"./a\").a;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + a.ts + Matched by default include pattern '**/*' + Imported via "./a" from file 'b.ts' + Imported via "./a" from file 'c.ts' + Imported via "/project/a" from file 'd.ts' + Imported via "./a" from file 'd.ts' + b.ts + Matched by default include pattern '**/*' + c.ts + Matched by default include pattern '**/*' + d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/tsconfig.json", + "configFile": "/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/tsconfig.json SVC-1-0 "{}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (7) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/project/a.ts: *new* + {"pollingInterval":500} +/project/b.ts: *new* + {"pollingInterval":500} +/project/c.ts: *new* + {"pollingInterval":500} +/project/d.ts: *new* + {"pollingInterval":500} +/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/a.ts" + }, + "command": "fileReferences" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "fileReferences", + "request_seq": 1, + "success": true, + "body": { + "refs": [ + { + "file": "/project/b.ts", + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 12 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 14 + }, + "lineText": "import \"./a\";", + "isWriteAccess": false + }, + { + "file": "/project/c.ts", + "start": { + "line": 1, + "offset": 17 + }, + "end": { + "line": 1, + "offset": 20 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + }, + "lineText": "import {} from \"./a\";", + "isWriteAccess": false + }, + { + "file": "/project/d.ts", + "start": { + "line": 1, + "offset": 20 + }, + "end": { + "line": 1, + "offset": 30 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 32 + }, + "lineText": "import { a } from \"/project/a\";", + "isWriteAccess": false + }, + { + "file": "/project/d.ts", + "start": { + "line": 2, + "offset": 25 + }, + "end": { + "line": 2, + "offset": 28 + }, + "contextStart": { + "line": 2, + "offset": 1 + }, + "contextEnd": { + "line": 2, + "offset": 33 + }, + "lineText": "type T = typeof import(\"./a\").a;", + "isWriteAccess": false + } + ], + "symbolName": "\"/project/a.ts\"" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js new file mode 100644 index 00000000000..745781ae0ea --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js @@ -0,0 +1,503 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/client/index.ts] +import "@shared/referenced"; + +//// [/packages/client/tsconfig.json] +{ "compilerOptions": { "paths": { "@shared/*": ["../shared/src/*"] } }, "references": [{ "path": "../shared" }] } + +//// [/packages/server/index.js] +const mod = require("../shared/src/referenced"); + +//// [/packages/server/router.js] +const blah = require("../shared/dist/referenced"); + +//// [/packages/server/tsconfig.json] +{ "compilerOptions": { "checkJs": true }, "references": [{ "path": "../shared" }] } + +//// [/packages/shared/src/referenced.ts] +export {}; + +//// [/packages/shared/tsconfig.json] +{ "compilerOptions": { "rootDir": "src", "outDir": "dist", "composite": true } } + +//// [/tsconfig.json] +{ "files": [], "references": [{ "path": "packages/server" }, { "path": "packages/client" }] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [], + "options": { + "configFilePath": "/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/server", + "originalPath": "packages/server" + }, + { + "path": "/packages/client", + "originalPath": "packages/client" + } + ] +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/server/tsconfig.json : { + "rootNames": [ + "/packages/server/index.js", + "/packages/server/router.js" + ], + "options": { + "checkJs": true, + "configFilePath": "/packages/server/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/shared", + "originalPath": "../shared" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/server/tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/server 1 undefined Config: /packages/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/server 1 undefined Config: /packages/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Config: /packages/shared/tsconfig.json : { + "rootNames": [ + "/packages/shared/src/referenced.ts" + ], + "options": { + "rootDir": "/packages/shared/src", + "outDir": "/packages/shared/dist", + "composite": true, + "configFilePath": "/packages/shared/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/shared/tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/shared 1 undefined Config: /packages/shared/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/shared 1 undefined Config: /packages/shared/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Config: /packages/client/tsconfig.json : { + "rootNames": [ + "/packages/client/index.ts" + ], + "options": { + "paths": { + "@shared/*": [ + "../shared/src/*" + ] + }, + "pathsBasePath": "/packages/client", + "configFilePath": "/packages/client/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/shared", + "originalPath": "../shared" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/client/tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/client 1 undefined Config: /packages/client/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/client 1 undefined Config: /packages/client/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/server/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/server/tsconfig.json", + "reason": "Creating project referenced in solution /tsconfig.json to find possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/server/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/server/router.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/shared/src/referenced.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/shared/dist 1 undefined Project: /packages/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/shared/dist 1 undefined Project: /packages/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/shared/src/referenced.ts Text-1 "export {};" + /packages/server/index.js Text-1 "const mod = require(\"../shared/src/referenced\");" + /packages/server/router.js Text-1 "const blah = require(\"../shared/dist/referenced\");" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + ../shared/src/referenced.ts + Imported via "../shared/src/referenced" from file 'index.js' + Imported via "../shared/dist/referenced" from file 'router.js' + index.js + Matched by default include pattern '**/*' + router.js + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/shared/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/shared/tsconfig.json", + "reason": "Creating project referenced in solution /tsconfig.json to find possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/shared/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/shared/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/shared/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/shared/src/referenced.ts Text-1 "export {};" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/referenced.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/shared/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Creating configuration project /packages/client/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/client/tsconfig.json", + "reason": "Creating project referenced in solution /tsconfig.json to find possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/client/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/client/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/client/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/client/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/shared/src/referenced.ts Text-1 "export {};" + /packages/client/index.ts Text-1 "import \"@shared/referenced\";" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + ../shared/src/referenced.ts + Imported via "@shared/referenced" from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/client/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/packages/server/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot write file '/packages/server/index.js' because it would overwrite input file.", + "code": 5055, + "category": "error" + }, + { + "text": "Cannot write file '/packages/server/router.js' because it would overwrite input file.", + "code": 5055, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/packages/shared/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/packages/client/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"files\": [], \"references\": [{ \"path\": \"packages/server\" }, { \"path\": \"packages/client\" }] }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/shared/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/client/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/packages/client/index.ts: *new* + {"pollingInterval":500} +/packages/client/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/server/index.js: *new* + {"pollingInterval":500} +/packages/server/router.js: *new* + {"pollingInterval":500} +/packages/server/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/shared/src/referenced.ts: *new* + {"pollingInterval":500} +/packages/shared/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/client: *new* + {} +/packages/server: *new* + {} +/packages/shared: *new* + {} +/packages/shared/dist: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/packages/shared/src/referenced.ts" + }, + "command": "fileReferences" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "fileReferences", + "request_seq": 1, + "success": true, + "body": { + "refs": [ + { + "file": "/packages/server/index.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 46 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 49 + }, + "lineText": "const mod = require(\"../shared/src/referenced\");", + "isWriteAccess": false + }, + { + "file": "/packages/server/router.js", + "start": { + "line": 1, + "offset": 23 + }, + "end": { + "line": 1, + "offset": 48 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 51 + }, + "lineText": "const blah = require(\"../shared/dist/referenced\");", + "isWriteAccess": false + }, + { + "file": "/packages/client/index.ts", + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 27 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 29 + }, + "lineText": "import \"@shared/referenced\";", + "isWriteAccess": false + } + ], + "symbolName": "\"/packages/shared/src/referenced.ts\"" + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics01.js b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics01.js new file mode 100644 index 00000000000..abd901f57d7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics01.js @@ -0,0 +1,158 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.js] +var ===; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.js SVC-1-0 "var ===;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 1, + "success": true, + "body": [ + { + "message": "Variable declaration expected.", + "start": 4, + "length": 3, + "category": "error", + "code": 1134, + "startLocation": { + "line": 1, + "offset": 5 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + }, + { + "message": "Expression expected.", + "start": 7, + "length": 1, + "category": "error", + "code": 1109, + "startLocation": { + "line": 1, + "offset": 8 + }, + "endLocation": { + "line": 1, + "offset": 9 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.js", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics02.js b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics02.js new file mode 100644 index 00000000000..4c81eb09ae7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics02.js @@ -0,0 +1,206 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/b.js] +var a = "a"; +var b: boolean = true; +function foo(): string { } +var var = "c"; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/b.js SVC-1-0 "var a = \"a\";\nvar b: boolean = true;\nfunction foo(): string { }\nvar var = \"c\";" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + b.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.js", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 1, + "success": true, + "body": [ + { + "message": "Type annotations can only be used in TypeScript files.", + "start": 20, + "length": 7, + "category": "error", + "code": 8010, + "startLocation": { + "line": 2, + "offset": 8 + }, + "endLocation": { + "line": 2, + "offset": 15 + } + }, + { + "message": "Type annotations can only be used in TypeScript files.", + "start": 52, + "length": 6, + "category": "error", + "code": 8010, + "startLocation": { + "line": 3, + "offset": 17 + }, + "endLocation": { + "line": 3, + "offset": 23 + } + }, + { + "message": "'var' is not allowed as a variable declaration name.", + "start": 67, + "length": 3, + "category": "error", + "code": 1389, + "startLocation": { + "line": 4, + "offset": 5 + }, + "endLocation": { + "line": 4, + "offset": 8 + } + }, + { + "message": "Variable declaration expected.", + "start": 71, + "length": 1, + "category": "error", + "code": 1134, + "startLocation": { + "line": 4, + "offset": 9 + }, + "endLocation": { + "line": 4, + "offset": 10 + } + }, + { + "message": "Variable declaration expected.", + "start": 73, + "length": 3, + "category": "error", + "code": 1134, + "startLocation": { + "line": 4, + "offset": 11 + }, + "endLocation": { + "line": 4, + "offset": 14 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.js", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForComments.js b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForComments.js new file mode 100644 index 00000000000..5ec660302b4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForComments.js @@ -0,0 +1,171 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/getOutliningSpansForComments.ts] +/* + Block comment at the beginning of the file before module: + line one of the comment + line two of the comment + line three + line four + line five +*/ +declare module "m"; +// Single line comments at the start of the file +// line 2 +// line 3 +// line 4 +declare module "n"; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForComments.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/getOutliningSpansForComments.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/getOutliningSpansForComments.ts SVC-1-0 "/*\n Block comment at the beginning of the file before module:\n line one of the comment\n line two of the comment\n line three\n line four\n line five\n*/\ndeclare module \"m\";\n// Single line comments at the start of the file\n// line 2\n// line 3\n// line 4\ndeclare module \"n\";" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + getOutliningSpansForComments.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/getOutliningSpansForComments.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForComments.ts" + }, + "command": "getOutliningSpans" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getOutliningSpans", + "request_seq": 1, + "success": true, + "body": [ + { + "textSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 8, + "offset": 3 + } + }, + "hintSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 8, + "offset": 3 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + }, + { + "textSpan": { + "start": { + "line": 10, + "offset": 1 + }, + "end": { + "line": 13, + "offset": 10 + } + }, + "hintSpan": { + "start": { + "line": 10, + "offset": 1 + }, + "end": { + "line": 13, + "offset": 10 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegions.js b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegions.js new file mode 100644 index 00000000000..4887e4971ae --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegions.js @@ -0,0 +1,379 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/getOutliningSpansForRegions.ts] +// region without label +// #region + +// #endregion + +// region without label with trailing spaces +// #region + +// #endregion + +// region with label +// #region label1 + +// #endregion + +// region with extra whitespace in all valid locations + // #region label2 label3 + + // #endregion + +// No space before directive +//#region label4 + +//#endregion + +// Nested regions +// #region outer + +// #region inner + +// #endregion inner + +// #endregion outer + +// region delimiters not valid when there is preceding text on line + test // #region invalid1 + +test // #endregion + +// region delimiters not valid when in multiline comment +/* +// #region invalid2 +*/ + +/* +// #endregion +*/ + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForRegions.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/getOutliningSpansForRegions.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/getOutliningSpansForRegions.ts SVC-1-0 "// region without label\n// #region\n\n// #endregion\n\n// region without label with trailing spaces\n// #region\n\n// #endregion\n\n// region with label\n// #region label1\n\n// #endregion\n\n// region with extra whitespace in all valid locations\n // #region label2 label3\n\n // #endregion\n\n// No space before directive\n//#region label4\n\n//#endregion\n\n// Nested regions\n// #region outer\n\n// #region inner\n\n// #endregion inner\n\n// #endregion outer\n\n// region delimiters not valid when there is preceding text on line\n test // #region invalid1\n\ntest // #endregion\n\n// region delimiters not valid when in multiline comment\n/*\n// #region invalid2\n*/\n\n/*\n// #endregion\n*/" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + getOutliningSpansForRegions.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/getOutliningSpansForRegions.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForRegions.ts" + }, + "command": "getOutliningSpans" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getOutliningSpans", + "request_seq": 1, + "success": true, + "body": [ + { + "textSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 14 + } + }, + "hintSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 14 + } + }, + "bannerText": "#region", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 7, + "offset": 1 + }, + "end": { + "line": 9, + "offset": 14 + } + }, + "hintSpan": { + "start": { + "line": 7, + "offset": 1 + }, + "end": { + "line": 9, + "offset": 14 + } + }, + "bannerText": "#region", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 12, + "offset": 1 + }, + "end": { + "line": 14, + "offset": 14 + } + }, + "hintSpan": { + "start": { + "line": 12, + "offset": 1 + }, + "end": { + "line": 14, + "offset": 14 + } + }, + "bannerText": "label1", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 17, + "offset": 14 + }, + "end": { + "line": 19, + "offset": 29 + } + }, + "hintSpan": { + "start": { + "line": 17, + "offset": 14 + }, + "end": { + "line": 19, + "offset": 29 + } + }, + "bannerText": "label2 label3", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 22, + "offset": 1 + }, + "end": { + "line": 24, + "offset": 13 + } + }, + "hintSpan": { + "start": { + "line": 22, + "offset": 1 + }, + "end": { + "line": 24, + "offset": 13 + } + }, + "bannerText": "label4", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 27, + "offset": 1 + }, + "end": { + "line": 33, + "offset": 20 + } + }, + "hintSpan": { + "start": { + "line": 27, + "offset": 1 + }, + "end": { + "line": 33, + "offset": 20 + } + }, + "bannerText": "outer", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 29, + "offset": 1 + }, + "end": { + "line": 31, + "offset": 20 + } + }, + "hintSpan": { + "start": { + "line": 29, + "offset": 1 + }, + "end": { + "line": 31, + "offset": 20 + } + }, + "bannerText": "inner", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 41, + "offset": 1 + }, + "end": { + "line": 43, + "offset": 3 + } + }, + "hintSpan": { + "start": { + "line": 41, + "offset": 1 + }, + "end": { + "line": 43, + "offset": 3 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + }, + { + "textSpan": { + "start": { + "line": 45, + "offset": 1 + }, + "end": { + "line": 47, + "offset": 3 + } + }, + "hintSpan": { + "start": { + "line": 45, + "offset": 1 + }, + "end": { + "line": 47, + "offset": 3 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegionsNoSingleLineFolds.js b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegionsNoSingleLineFolds.js new file mode 100644 index 00000000000..6be5e7096ed --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegionsNoSingleLineFolds.js @@ -0,0 +1,272 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts] +//#region +function foo() { + +} +//these +//should +//#endregion not you +// be +// together + +//#region bla bla bla + +function bar() { } + +//#endregion + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts SVC-1-0 "//#region\nfunction foo() {\n\n}\n//these\n//should\n//#endregion not you\n// be\n// together\n\n//#region bla bla bla\n\nfunction bar() { }\n\n//#endregion" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + getOutliningSpansForRegionsNoSingleLineFolds.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/getOutliningSpansForRegionsNoSingleLineFolds.ts" + }, + "command": "getOutliningSpans" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getOutliningSpans", + "request_seq": 1, + "success": true, + "body": [ + { + "textSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 21 + } + }, + "hintSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 21 + } + }, + "bannerText": "#region", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 2, + "offset": 15 + }, + "end": { + "line": 4, + "offset": 2 + } + }, + "hintSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 2 + } + }, + "bannerText": "...", + "autoCollapse": true, + "kind": "code" + }, + { + "textSpan": { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 9 + } + }, + "hintSpan": { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 9 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + }, + { + "textSpan": { + "start": { + "line": 8, + "offset": 1 + }, + "end": { + "line": 9, + "offset": 12 + } + }, + "hintSpan": { + "start": { + "line": 8, + "offset": 1 + }, + "end": { + "line": 9, + "offset": 12 + } + }, + "bannerText": "...", + "autoCollapse": false, + "kind": "comment" + }, + { + "textSpan": { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 15, + "offset": 13 + } + }, + "hintSpan": { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 15, + "offset": 13 + } + }, + "bannerText": "bla bla bla", + "autoCollapse": false, + "kind": "region" + }, + { + "textSpan": { + "start": { + "line": 13, + "offset": 15 + }, + "end": { + "line": 13, + "offset": 19 + } + }, + "hintSpan": { + "start": { + "line": 13, + "offset": 1 + }, + "end": { + "line": 13, + "offset": 19 + } + }, + "bannerText": "...", + "autoCollapse": true, + "kind": "code" + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToDefinitionScriptImportServer.js b/tests/baselines/reference/tsserver/fourslashServer/goToDefinitionScriptImportServer.js new file mode 100644 index 00000000000..547e20bc915 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToDefinitionScriptImportServer.js @@ -0,0 +1,271 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/moduleThing.ts] +import "./scriptThing"; +import "./stylez.css"; +import "./foo.txt"; + +//// [/scriptThing.ts] +console.log("woooo side effects") + +//// [/stylez.css] +div { + color: magenta; +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/scriptThing.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /scriptThing.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /scriptThing.ts SVC-1-0 "console.log(\"woooo side effects\")" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + scriptThing.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /scriptThing.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/moduleThing.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /moduleThing.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /scriptThing.ts SVC-1-0 "console.log(\"woooo side effects\")" + /moduleThing.ts SVC-1-0 "import \"./scriptThing\";\nimport \"./stylez.css\";\nimport \"./foo.txt\";" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + scriptThing.ts + Imported via "./scriptThing" from file 'moduleThing.ts' + moduleThing.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /scriptThing.ts + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + scriptThing.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /scriptThing.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /moduleThing.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/moduleThing.ts", + "line": 1, + "offset": 8 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 2, + "success": true, + "body": { + "definitions": [ + { + "file": "/scriptThing.ts", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + } + } + ], + "textSpan": { + "start": { + "line": 1, + "offset": 8 + }, + "end": { + "line": 1, + "offset": 23 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/moduleThing.ts", + "line": 2, + "offset": 8 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 3, + "success": true, + "body": { + "definitions": [ + { + "file": "/stylez.css", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "unverified": true + } + ], + "textSpan": { + "start": { + "line": 2, + "offset": 8 + }, + "end": { + "line": 2, + "offset": 22 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/moduleThing.ts", + "line": 3, + "offset": 8 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 4, + "success": true, + "body": { + "definitions": [ + { + "file": "/foo.txt", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "unverified": true + } + ], + "textSpan": { + "start": { + "line": 3, + "offset": 8 + }, + "end": { + "line": 3, + "offset": 19 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToImplementation_inDifferentFiles.js b/tests/baselines/reference/tsserver/fourslashServer/goToImplementation_inDifferentFiles.js new file mode 100644 index 00000000000..7457624917c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToImplementation_inDifferentFiles.js @@ -0,0 +1,177 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/bar.ts] +import {Foo} from './foo' + +class A implements Foo { + func() {} +} + +class B implements Foo { + func() {} +} + +//// [/foo.ts] +export interface Foo { + func(); +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/bar.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /bar.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /foo.ts Text-1 "export interface Foo {\n func();\n}" + /bar.ts SVC-1-0 "import {Foo} from './foo'\n\nclass A implements Foo {\n func() {}\n}\n\nclass B implements Foo {\n func() {}\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + foo.ts + Imported via './foo' from file 'bar.ts' + bar.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /bar.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/foo.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /foo.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /foo.ts :: No config files found. +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /bar.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/foo.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/foo.ts", + "line": 1, + "offset": 18 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/bar.ts", + "start": { + "line": 3, + "offset": 7 + }, + "end": { + "line": 3, + "offset": 8 + }, + "contextStart": { + "line": 3, + "offset": 1 + }, + "contextEnd": { + "line": 5, + "offset": 2 + } + }, + { + "file": "/bar.ts", + "start": { + "line": 7, + "offset": 7 + }, + "end": { + "line": 7, + "offset": 8 + }, + "contextStart": { + "line": 7, + "offset": 1 + }, + "contextEnd": { + "line": 9, + "offset": 2 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource10_mapFromAtTypes3.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource10_mapFromAtTypes3.js new file mode 100644 index 00000000000..8cec496a4ea --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource10_mapFromAtTypes3.js @@ -0,0 +1,291 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { add } from 'lodash'; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/lodash/index.d.ts] +export = _; +export as namespace _; +declare const _: _.LoDashStatic; +declare namespace _ { + interface LoDashStatic {} +} + +//// [/node_modules/@types/lodash/package.json] +{ "name": "@types/lodash", "version": "4.14.97", "types": "index.d.ts" } + +//// [/node_modules/lodash/lodash.js] +;(function() { + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + + function lodash(value) {} + lodash.add = add; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } + else { + // Export to the global object. + root._ = _; + } +}.call(this)); + +//// [/node_modules/lodash/package.json] +{ "name": "lodash", "version": "4.17.15", "main": "./lodash.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/lodash/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/lodash +Info seq [hh:mm:ss:mss] For info: /node_modules/lodash/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/lodash/package.json SVC-1-0 "{ \"name\": \"lodash\", \"version\": \"4.17.15\", \"main\": \"./lodash.js\" }" + /node_modules/@types/lodash/index.d.ts Text-1 "export = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + ../@types/lodash/index.d.ts + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/lodash/index.d.ts Text-1 "export = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + /index.ts SVC-1-0 "import { add } from 'lodash';" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/lodash/index.d.ts + Imported via 'lodash' from file 'index.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/lodash/lodash.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/lodash/lodash.js Text-1 ";(function() {\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n function lodash(value) {}\n lodash.add = add;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// \n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));" + /index.ts SVC-1-0 "import { add } from 'lodash';" + + + node_modules/lodash/lodash.js + Imported via 'lodash' from file 'index.ts' with packageId 'lodash/lodash.js@4.17.15' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 17, + "offset": 9 + }, + "end": { + "line": 17, + "offset": 12 + }, + "contextStart": { + "line": 17, + "offset": 5 + }, + "contextEnd": { + "line": 19, + "offset": 11 + }, + "unverified": true + }, + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 22, + "offset": 12 + }, + "end": { + "line": 22, + "offset": 15 + }, + "contextStart": { + "line": 22, + "offset": 5 + }, + "contextEnd": { + "line": 22, + "offset": 22 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/lodash/lodash.js: *new* + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource11_propertyOfAlias.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource11_propertyOfAlias.js new file mode 100644 index 00000000000..9b4105d8191 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource11_propertyOfAlias.js @@ -0,0 +1,188 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.d.ts] +export declare const a: { a: string }; + +//// [/a.js] +export const a = { a: 'a' }; + +//// [/b.ts] +import { a } from './a'; +a.a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.js :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js SVC-1-0 "export const a = { a: 'a' };" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.d.ts Text-1 "export declare const a: { a: string };" + /b.ts SVC-1-0 "import { a } from './a';\na.a" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.d.ts + Imported via './a' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/a.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/b.ts", + "line": 2, + "offset": 4 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /a.js SVC-1-0 "export const a = { a: 'a' };" + /b.ts SVC-1-0 "import { a } from './a';\na.a" + + + a.js + Imported via './a' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/a.js", + "start": { + "line": 1, + "offset": 20 + }, + "end": { + "line": 1, + "offset": 21 + }, + "contextStart": { + "line": 1, + "offset": 20 + }, + "contextEnd": { + "line": 1, + "offset": 26 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource12_callbackParam.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource12_callbackParam.js new file mode 100644 index 00000000000..b3be726a6af --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource12_callbackParam.js @@ -0,0 +1,249 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { command } from "yargs"; +command("foo", yargs => { + yargs.positional(); +}); + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/yargs/index.d.ts] +export interface Yargs { positional(): Yargs; } +export declare function command(command: string, cb: (yargs: Yargs) => void): void; + +//// [/node_modules/@types/yargs/package.json] +{ + "name": "@types/yargs", + "version": "1.0.0", + "types": "./index.d.ts" +} + +//// [/node_modules/yargs/index.js] +export function command(cmd, cb) { cb({ positional: "This is obviously not even close to realistic" }); } + +//// [/node_modules/yargs/package.json] +{ + "name": "yargs", + "version": "1.0.0", + "main": "index.js" +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/yargs/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/@types/yargs +Info seq [hh:mm:ss:mss] For info: /node_modules/@types/yargs/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/package.json SVC-1-0 "{\n \"name\": \"@types/yargs\",\n \"version\": \"1.0.0\",\n \"types\": \"./index.d.ts\"\n}" + /node_modules/@types/yargs/index.d.ts Text-1 "export interface Yargs { positional(): Yargs; }\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + index.d.ts + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/index.d.ts Text-1 "export interface Yargs { positional(): Yargs; }\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/yargs/index.d.ts + Imported via "yargs" from file 'index.ts' with packageId '@types/yargs/index.d.ts@1.0.0' + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 3, + "offset": 11 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/yargs/index.js Text-1 "export function command(cmd, cb) { cb({ positional: \"This is obviously not even close to realistic\" }); }" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + node_modules/yargs/index.js + Imported via "yargs" from file 'index.ts' with packageId 'yargs/index.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/yargs/index.js", + "start": { + "line": 1, + "offset": 41 + }, + "end": { + "line": 1, + "offset": 51 + }, + "contextStart": { + "line": 1, + "offset": 41 + }, + "contextEnd": { + "line": 1, + "offset": 100 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/yargs/index.js: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource13_nodenext.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource13_nodenext.js new file mode 100644 index 00000000000..f84b1b913e7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource13_nodenext.js @@ -0,0 +1,287 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.mts] +import leftPad = require("left-pad"); +leftPad("", 4); + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/left-pad/index.d.ts] +declare function leftPad(str: string|number, len: number, ch?: string|number): string; +declare namespace leftPad { } +export = leftPad; + +//// [/node_modules/left-pad/index.js] +module.exports = leftPad; +function leftPad(str, len, ch) {} + +//// [/node_modules/left-pad/package.json] +{ + "name": "left-pad", + "version": "1.3.0", + "description": "String left pad", + "main": "index.js", + "types": "index.d.ts" +} + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "node16", + "strict": true, + "outDir": "./out", + + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/left-pad/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/left-pad +Info seq [hh:mm:ss:mss] For info: /node_modules/left-pad/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/left-pad/package.json SVC-1-0 "{\n \"name\": \"left-pad\",\n \"version\": \"1.3.0\",\n \"description\": \"String left pad\",\n \"main\": \"index.js\",\n \"types\": \"index.d.ts\"\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/left-pad/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.mts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.mts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /index.mts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.mts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 100, + "strict": true, + "outDir": "/out", + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/left-pad/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/left-pad/index.d.ts Text-1 "declare function leftPad(str: string|number, len: number, ch?: string|number): string;\ndeclare namespace leftPad { }\nexport = leftPad;" + /index.mts SVC-1-0 "import leftPad = require(\"left-pad\");\nleftPad(\"\", 4);" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + node_modules/left-pad/index.d.ts + Imported via "left-pad" from file 'index.mts' with packageId 'left-pad/index.d.ts@1.3.0' + File is CommonJS module because 'node_modules/left-pad/package.json' does not have field "type" + index.mts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/index.mts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/left-pad/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.mts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/left-pad/index.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.mts", + "line": 2, + "offset": 1 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/left-pad/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/left-pad/index.js Text-1 "module.exports = leftPad;\nfunction leftPad(str, len, ch) {}" + /index.mts SVC-1-0 "import leftPad = require(\"left-pad\");\nleftPad(\"\", 4);" + + + node_modules/left-pad/index.js + Imported via "left-pad" from file 'index.mts' with packageId 'left-pad/index.js@1.3.0' + File is CommonJS module because 'node_modules/left-pad/package.json' does not have field "type" + index.mts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/left-pad/index.js", + "start": { + "line": 2, + "offset": 10 + }, + "end": { + "line": 2, + "offset": 17 + }, + "contextStart": { + "line": 2, + "offset": 1 + }, + "contextEnd": { + "line": 2, + "offset": 34 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/left-pad/index.d.ts: + {"pollingInterval":500} +/node_modules/left-pad/index.js: *new* + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource14_unresolvedRequireDestructuring.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource14_unresolvedRequireDestructuring.js new file mode 100644 index 00000000000..e86ee400164 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource14_unresolvedRequireDestructuring.js @@ -0,0 +1,99 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.js] +const { blah } = require("unresolved"); + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/index.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.js :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.js SVC-1-0 "const { blah } = require(\"unresolved\");" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /index.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.js", + "line": 1, + "offset": 13 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (1) + /index.js SVC-1-0 "const { blah } = require(\"unresolved\");" + + + index.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js new file mode 100644 index 00000000000..aaa626ee696 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js @@ -0,0 +1,324 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { useState } from 'react'; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/react/cjs/react.development.js] +'use strict'; +if (process.env.NODE_ENV !== 'production') { + (function() { + function useState(initialState) {} + exports.useState = useState; + exports.version = '16.8.6'; + }()); +} + +//// [/node_modules/react/cjs/react.production.min.js] +'use strict';exports.useState=function(a){};exports.version='16.8.6'; + +//// [/node_modules/react/index.js] +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react.production.min.js'); +} else { + module.exports = require('./cjs/react.development.js'); +} + +//// [/node_modules/react/package.json] +{ "name": "react", "version": "16.8.6", "main": "index.js" } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "esnext", "moduleResolution": "bundler" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 99, + "moduleResolution": 100, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "import { useState } from 'react';" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"esnext\", \"moduleResolution\": \"bundler\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/cjs/react.production.min.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/cjs/react.development.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (4) + /node_modules/react/cjs/react.production.min.js Text-1 "'use strict';exports.useState=function(a){};exports.version='16.8.6';" + /node_modules/react/cjs/react.development.js Text-1 "'use strict';\nif (process.env.NODE_ENV !== 'production') {\n (function() {\n function useState(initialState) {}\n exports.useState = useState;\n exports.version = '16.8.6';\n }());\n}" + /node_modules/react/index.js Text-1 "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}" + /index.ts Text-1 "import { useState } from 'react';" + + + node_modules/react/cjs/react.production.min.js + Imported via './cjs/react.production.min.js' from file 'node_modules/react/index.js' with packageId 'react/cjs/react.production.min.js@16.8.6' + node_modules/react/cjs/react.development.js + Imported via './cjs/react.development.js' from file 'node_modules/react/index.js' with packageId 'react/cjs/react.development.js@16.8.6' + node_modules/react/index.js + Imported via 'react' from file 'index.ts' with packageId 'react/index.js@16.8.6' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/react/cjs/react.production.min.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 30 + }, + "contextStart": { + "line": 1, + "offset": 14 + }, + "contextEnd": { + "line": 1, + "offset": 30 + } + }, + { + "file": "/node_modules/react/cjs/react.development.js", + "start": { + "line": 5, + "offset": 13 + }, + "end": { + "line": 5, + "offset": 21 + }, + "contextStart": { + "line": 5, + "offset": 5 + }, + "contextEnd": { + "line": 5, + "offset": 21 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/react/cjs/react.development.js: *new* + {"pollingInterval":500} +/node_modules/react/cjs/react.production.min.js: *new* + {"pollingInterval":500} +/node_modules/react/index.js: *new* + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource16_callbackParamDifferentFile.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource16_callbackParamDifferentFile.js new file mode 100644 index 00000000000..b7c0dcd8f0c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource16_callbackParamDifferentFile.js @@ -0,0 +1,275 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { command } from "yargs"; +command("foo", yargs => { + yargs.positional(); +}); + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/yargs/callback.d.ts] +export declare class Yargs { positional(): Yargs; } + +//// [/node_modules/@types/yargs/index.d.ts] +import { Yargs } from "./callback"; +export declare function command(command: string, cb: (yargs: Yargs) => void): void; + +//// [/node_modules/@types/yargs/package.json] +{ + "name": "@types/yargs", + "version": "1.0.0", + "types": "./index.d.ts" +} + +//// [/node_modules/yargs/callback.js] +export class Yargs { positional() { } } + +//// [/node_modules/yargs/index.js] +import { Yargs } from "./callback"; +export function command(cmd, cb) { cb(Yargs) } + +//// [/node_modules/yargs/package.json] +{ + "name": "yargs", + "version": "1.0.0", + "main": "index.js" +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/yargs/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/@types/yargs +Info seq [hh:mm:ss:mss] For info: /node_modules/@types/yargs/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/callback.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/package.json SVC-1-0 "{\n \"name\": \"@types/yargs\",\n \"version\": \"1.0.0\",\n \"types\": \"./index.d.ts\"\n}" + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + callback.d.ts + Imported via "./callback" from file 'index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + index.d.ts + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/yargs/callback.d.ts + Imported via "./callback" from file 'node_modules/@types/yargs/index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + node_modules/@types/yargs/index.d.ts + Imported via "yargs" from file 'index.ts' with packageId '@types/yargs/index.d.ts@1.0.0' + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 3, + "offset": 11 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/callback.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (3) + /node_modules/yargs/callback.js Text-1 "export class Yargs { positional() { } }" + /node_modules/yargs/index.js Text-1 "import { Yargs } from \"./callback\";\nexport function command(cmd, cb) { cb(Yargs) }" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + node_modules/yargs/callback.js + Imported via "./callback" from file 'node_modules/yargs/index.js' with packageId 'yargs/callback.js@1.0.0' + node_modules/yargs/index.js + Imported via "yargs" from file 'index.ts' with packageId 'yargs/index.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/yargs/callback.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 32 + }, + "contextStart": { + "line": 1, + "offset": 22 + }, + "contextEnd": { + "line": 1, + "offset": 38 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/yargs/callback.js: *new* + {"pollingInterval":500} +/node_modules/yargs/index.js: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource17_AddsFileToProject.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource17_AddsFileToProject.js new file mode 100644 index 00000000000..28f402683e4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource17_AddsFileToProject.js @@ -0,0 +1,289 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { command } from "yargs"; +command("foo", yargs => { + yargs.positional(); +}); + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/yargs/callback.d.ts] +export declare class Yargs { positional(): Yargs; } + +//// [/node_modules/@types/yargs/index.d.ts] +import { Yargs } from "./callback"; +export declare function command(command: string, cb: (yargs: Yargs) => void): void; + +//// [/node_modules/@types/yargs/package.json] +{ + "name": "@types/yargs", + "version": "1.0.0", + "types": "./index.d.ts" +} + +//// [/node_modules/yargs/callback.js] +export class Yargs { positional() { } } + +//// [/node_modules/yargs/index.js] +// Specifically didnt have ./callback import to ensure that resolving module sepcifier adds the file to project at later stage +export function command(cmd, cb) { cb(Yargs) } + +//// [/node_modules/yargs/package.json] +{ + "name": "yargs", + "version": "1.0.0", + "main": "index.js" +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/yargs/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/@types/yargs +Info seq [hh:mm:ss:mss] For info: /node_modules/@types/yargs/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/callback.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/package.json SVC-1-0 "{\n \"name\": \"@types/yargs\",\n \"version\": \"1.0.0\",\n \"types\": \"./index.d.ts\"\n}" + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + callback.d.ts + Imported via "./callback" from file 'index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + index.d.ts + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/yargs/callback.d.ts + Imported via "./callback" from file 'node_modules/@types/yargs/index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + node_modules/@types/yargs/index.d.ts + Imported via "yargs" from file 'index.ts' with packageId '@types/yargs/index.d.ts@1.0.0' + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 3, + "offset": 11 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/yargs/index.js Text-1 "// Specifically didnt have ./callback import to ensure that resolving module sepcifier adds the file to project at later stage\nexport function command(cmd, cb) { cb(Yargs) }" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + node_modules/yargs/index.js + Imported via "yargs" from file 'index.ts' with packageId 'yargs/index.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/callback.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (3) + /node_modules/yargs/index.js Text-1 "// Specifically didnt have ./callback import to ensure that resolving module sepcifier adds the file to project at later stage\nexport function command(cmd, cb) { cb(Yargs) }" + /index.ts SVC-1-0 "import { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + /node_modules/yargs/callback.js Text-1 "export class Yargs { positional() { } }" + + + node_modules/yargs/index.js + Imported via "yargs" from file 'index.ts' with packageId 'yargs/index.js@1.0.0' + index.ts + Root file specified for compilation + node_modules/yargs/callback.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/yargs/callback.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 32 + }, + "contextStart": { + "line": 1, + "offset": 22 + }, + "contextEnd": { + "line": 1, + "offset": 38 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/yargs/callback.js: *new* + {"pollingInterval":500} +/node_modules/yargs/index.js: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource18_reusedFromDifferentFolder.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource18_reusedFromDifferentFolder.js new file mode 100644 index 00000000000..9b61ad67c13 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource18_reusedFromDifferentFolder.js @@ -0,0 +1,291 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/folder/random.ts] +import { Yargs } from "yargs/callback"; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/yargs/callback.d.ts] +export declare class Yargs { positional(): Yargs; } + +//// [/node_modules/@types/yargs/index.d.ts] +import { Yargs } from "./callback"; +export declare function command(command: string, cb: (yargs: Yargs) => void): void; + +//// [/node_modules/@types/yargs/package.json] +{ + "name": "@types/yargs", + "version": "1.0.0", + "types": "./index.d.ts" +} + +//// [/node_modules/yargs/callback.js] +export class Yargs { positional() { } } + +//// [/node_modules/yargs/index.js] +// Specifically didnt have ./callback import to ensure that resolving module sepcifier adds the file to project at later stage +export function command(cmd, cb) { cb(Yargs) } + +//// [/node_modules/yargs/package.json] +{ + "name": "yargs", + "version": "1.0.0", + "main": "index.js" +} + +//// [/some/index.ts] +import { random } from "../folder/random"; +import { command } from "yargs"; +command("foo", yargs => { + yargs.positional(); +}); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/yargs/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/@types/yargs +Info seq [hh:mm:ss:mss] For info: /node_modules/@types/yargs/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/callback.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/package.json SVC-1-0 "{\n \"name\": \"@types/yargs\",\n \"version\": \"1.0.0\",\n \"types\": \"./index.d.ts\"\n}" + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + package.json + Root file specified for compilation + callback.d.ts + Imported via "./callback" from file 'index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + index.d.ts + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/some/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /some +Info seq [hh:mm:ss:mss] For info: /some/index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /folder/random.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/yargs/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (7) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/yargs/callback.d.ts Text-1 "export declare class Yargs { positional(): Yargs; }" + /folder/random.ts Text-1 "import { Yargs } from \"yargs/callback\";" + /node_modules/@types/yargs/index.d.ts Text-1 "import { Yargs } from \"./callback\";\nexport declare function command(command: string, cb: (yargs: Yargs) => void): void;" + /some/index.ts SVC-1-0 "import { random } from \"../folder/random\";\nimport { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../node_modules/@types/yargs/callback.d.ts + Imported via "yargs/callback" from file '../folder/random.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + Imported via "./callback" from file '../node_modules/@types/yargs/index.d.ts' with packageId '@types/yargs/callback.d.ts@1.0.0' + ../folder/random.ts + Imported via "../folder/random" from file 'index.ts' + ../node_modules/@types/yargs/index.d.ts + Imported via "yargs" from file 'index.ts' with packageId '@types/yargs/index.d.ts@1.0.0' + Entry point for implicit type library 'yargs' with packageId '@types/yargs/index.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (7) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/yargs/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /some/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/folder/random.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/some/index.ts", + "line": 4, + "offset": 11 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/callback.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/yargs/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (4) + /node_modules/yargs/callback.js Text-1 "export class Yargs { positional() { } }" + /folder/random.ts Text-1 "import { Yargs } from \"yargs/callback\";" + /node_modules/yargs/index.js Text-1 "// Specifically didnt have ./callback import to ensure that resolving module sepcifier adds the file to project at later stage\nexport function command(cmd, cb) { cb(Yargs) }" + /some/index.ts SVC-1-0 "import { random } from \"../folder/random\";\nimport { command } from \"yargs\";\ncommand(\"foo\", yargs => {\n yargs.positional();\n});" + + + ../node_modules/yargs/callback.js + Imported via "yargs/callback" from file '../folder/random.ts' with packageId 'yargs/callback.js@1.0.0' + ../folder/random.ts + Imported via "../folder/random" from file 'index.ts' + ../node_modules/yargs/index.js + Imported via "yargs" from file 'index.ts' with packageId 'yargs/index.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/yargs/callback.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 32 + }, + "contextStart": { + "line": 1, + "offset": 22 + }, + "contextEnd": { + "line": 1, + "offset": 38 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/folder/random.ts: + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/callback.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/yargs/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/yargs/callback.js: *new* + {"pollingInterval":500} +/node_modules/yargs/index.js: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/node_modules/@types/yargs/node_modules/@types: + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.js new file mode 100644 index 00000000000..3f911319ab9 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.js @@ -0,0 +1,220 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.d.ts] +export declare const a: string; + +//// [/a.js] +export const a = "a"; + +//// [/index.ts] +import { a } from "./a"; +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.js :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js SVC-1-0 "export const a = \"a\";" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.d.ts Text-1 "export declare const a: string;" + /index.ts SVC-1-0 "import { a } from \"./a\";\na" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.d.ts + Imported via "./a" from file 'index.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/a.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 2 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /a.js SVC-1-0 "export const a = \"a\";" + /index.ts SVC-1-0 "import { a } from \"./a\";\na" + + + a.js + Imported via "./a" from file 'index.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/a.js", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 3, + "success": true, + "body": [ + { + "file": "/a.js", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 22 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource2_nodeModulesWithTypes.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource2_nodeModulesWithTypes.js new file mode 100644 index 00000000000..4efa0289ab7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource2_nodeModulesWithTypes.js @@ -0,0 +1,204 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { a } from "foo"; +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/foo/lib/main.js] +export const a = "a"; + +//// [/node_modules/foo/package.json] +{ "name": "foo", "version": "1.0.0", "main": "./lib/main.js", "types": "./types/main.d.ts" } + +//// [/node_modules/foo/types/main.d.ts] +export declare const a: string; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/foo/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/foo +Info seq [hh:mm:ss:mss] For info: /node_modules/foo/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/foo/package.json SVC-1-0 "{ \"name\": \"foo\", \"version\": \"1.0.0\", \"main\": \"./lib/main.js\", \"types\": \"./types/main.d.ts\" }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/types/main.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/foo/types/main.d.ts Text-1 "export declare const a: string;" + /index.ts SVC-1-0 "import { a } from \"foo\";\na" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/foo/types/main.d.ts + Imported via "foo" from file 'index.ts' with packageId 'foo/types/main.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/foo/types/main.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 2 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/lib/main.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/foo/lib/main.js Text-1 "export const a = \"a\";" + /index.ts SVC-1-0 "import { a } from \"foo\";\na" + + + node_modules/foo/lib/main.js + Imported via "foo" from file 'index.ts' with packageId 'foo/lib/main.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/foo/lib/main.js", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/foo/lib/main.js: *new* + {"pollingInterval":500} +/node_modules/foo/types/main.d.ts: + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource3_nodeModulesAtTypes.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource3_nodeModulesAtTypes.js new file mode 100644 index 00000000000..77fffda93ac --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource3_nodeModulesAtTypes.js @@ -0,0 +1,223 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { a } from "foo"; +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/foo/index.d.ts] +export declare const a: string; + +//// [/node_modules/@types/foo/package.json] +{ "name": "@types/foo", "version": "1.0.0", "types": "./index.d.ts" } + +//// [/node_modules/foo/lib/main.js] +export const a = "a"; + +//// [/node_modules/foo/package.json] +{ "name": "foo", "version": "1.0.0", "main": "./lib/main.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/foo/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/foo +Info seq [hh:mm:ss:mss] For info: /node_modules/foo/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/foo/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/foo/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/foo/package.json SVC-1-0 "{ \"name\": \"foo\", \"version\": \"1.0.0\", \"main\": \"./lib/main.js\" }" + /node_modules/@types/foo/index.d.ts Text-1 "export declare const a: string;" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + ../@types/foo/index.d.ts + Entry point for implicit type library 'foo' with packageId '@types/foo/index.d.ts@1.0.0' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/foo/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/foo/package.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/foo/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/foo/index.d.ts Text-1 "export declare const a: string;" + /index.ts SVC-1-0 "import { a } from \"foo\";\na" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/foo/index.d.ts + Imported via "foo" from file 'index.ts' with packageId '@types/foo/index.d.ts@1.0.0' + Entry point for implicit type library 'foo' with packageId '@types/foo/index.d.ts@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/foo/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/foo/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 2 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/lib/main.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/foo/lib/main.js Text-1 "export const a = \"a\";" + /index.ts SVC-1-0 "import { a } from \"foo\";\na" + + + node_modules/foo/lib/main.js + Imported via "foo" from file 'index.ts' with packageId 'foo/lib/main.js@1.0.0' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/foo/lib/main.js", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/foo/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/foo/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/foo/lib/main.js: *new* + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource5_sameAsGoToDef1.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource5_sameAsGoToDef1.js new file mode 100644 index 00000000000..244fa2c7f1f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource5_sameAsGoToDef1.js @@ -0,0 +1,229 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.d.ts] +export declare const a: string; + +//// [/a.js] +export const a = 'a'; + +//// [/a.ts] +export const a = 'a'; + +//// [/b.ts] +import { a } from './a'; +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.ts SVC-1-0 "export const a = 'a';" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.ts SVC-1-0 "export const a = 'a';" + /b.ts SVC-1-0 "import { a } from './a';\na" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.ts + Imported via './a' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /a.ts + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/b.ts", + "line": 2, + "offset": 2 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/a.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/b.ts", + "line": 2, + "offset": 2 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 3, + "success": true, + "body": { + "definitions": [ + { + "file": "/a.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ], + "textSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 2 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource6_sameAsGoToDef2.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource6_sameAsGoToDef2.js new file mode 100644 index 00000000000..e80b7550e46 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource6_sameAsGoToDef2.js @@ -0,0 +1,250 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/b.ts] +import { a } from 'foo/a'; +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/foo/dist/a.js] +export const a = 'a'; + +//// [/node_modules/foo/package.json] +{ "name": "foo", "version": "1.2.3", "typesVersions": { "*": { "*": ["./types/*"] } } } + +//// [/node_modules/foo/src/a.ts] +export const a = 'a'; + +//// [/node_modules/foo/types/a.d.ts] +export declare const a: string; +//# sourceMappingURL=a.d.ts.map + +//// [/node_modules/foo/types/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,OAAO,CAAC;;AACvB,wBAAsB"} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/foo/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/foo +Info seq [hh:mm:ss:mss] For info: /node_modules/foo/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/foo/package.json SVC-1-0 "{ \"name\": \"foo\", \"version\": \"1.2.3\", \"typesVersions\": { \"*\": { \"*\": [\"./types/*\"] } } }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/types/a.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/foo/types/a.d.ts Text-1 "export declare const a: string;\n//# sourceMappingURL=a.d.ts.map" + /b.ts SVC-1-0 "import { a } from 'foo/a';\na" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/foo/types/a.d.ts + Imported via 'foo/a' from file 'b.ts' with packageId 'foo/types/a.d.ts@1.2.3' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/foo/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/foo/types/a.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/b.ts", + "line": 2, + "offset": 2 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/types/a.d.ts.map 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/foo/src/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/node_modules/foo/src/a.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 16 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/foo/src/a.ts: *new* + {"pollingInterval":500} +/node_modules/foo/types/a.d.ts: + {"pollingInterval":500} +/node_modules/foo/types/a.d.ts.map: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/b.ts", + "line": 2, + "offset": 2 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 3, + "success": true, + "body": { + "definitions": [ + { + "file": "/node_modules/foo/src/a.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 16 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 22 + } + } + ], + "textSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 2 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource7_conditionallyMinified.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource7_conditionallyMinified.js new file mode 100644 index 00000000000..4cfc68cda4c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource7_conditionallyMinified.js @@ -0,0 +1,233 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { useState } from 'react'; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/react/cjs/react.development.js] +'use strict'; +if (process.env.NODE_ENV !== 'production') { + (function() { + function useState(initialState) {} + exports.useState = useState; + exports.version = '16.8.6'; + }()); +} + +//// [/node_modules/react/cjs/react.production.min.js] +'use strict';exports.useState=function(a){};exports.version='16.8.6'; + +//// [/node_modules/react/index.js] +'use strict'; + +if (process.env.NODE_ENV === 'production') { + module.exports = require('./cjs/react.production.min.js'); +} else { + module.exports = require('./cjs/react.development.js'); +} + +//// [/node_modules/react/package.json] +{ "name": "react", "version": "16.8.6", "main": "index.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/react/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/react +Info seq [hh:mm:ss:mss] For info: /node_modules/react/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/react/package.json SVC-1-0 "{ \"name\": \"react\", \"version\": \"16.8.6\", \"main\": \"index.js\" }" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/react/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "import { useState } from 'react';" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/react/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/index.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/cjs/react.production.min.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/react/cjs/react.development.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (4) + /node_modules/react/cjs/react.production.min.js Text-1 "'use strict';exports.useState=function(a){};exports.version='16.8.6';" + /node_modules/react/cjs/react.development.js Text-1 "'use strict';\nif (process.env.NODE_ENV !== 'production') {\n (function() {\n function useState(initialState) {}\n exports.useState = useState;\n exports.version = '16.8.6';\n }());\n}" + /node_modules/react/index.js Text-1 "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}" + /index.ts SVC-1-0 "import { useState } from 'react';" + + + node_modules/react/cjs/react.production.min.js + Imported via './cjs/react.production.min.js' from file 'node_modules/react/index.js' with packageId 'react/cjs/react.production.min.js@16.8.6' + node_modules/react/cjs/react.development.js + Imported via './cjs/react.development.js' from file 'node_modules/react/index.js' with packageId 'react/cjs/react.development.js@16.8.6' + node_modules/react/index.js + Imported via 'react' from file 'index.ts' with packageId 'react/index.js@16.8.6' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/react/cjs/react.production.min.js", + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 30 + }, + "contextStart": { + "line": 1, + "offset": 14 + }, + "contextEnd": { + "line": 1, + "offset": 30 + } + }, + { + "file": "/node_modules/react/cjs/react.development.js", + "start": { + "line": 5, + "offset": 13 + }, + "end": { + "line": 5, + "offset": 21 + }, + "contextStart": { + "line": 5, + "offset": 5 + }, + "contextEnd": { + "line": 5, + "offset": 21 + } + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/react/cjs/react.development.js: *new* + {"pollingInterval":500} +/node_modules/react/cjs/react.production.min.js: *new* + {"pollingInterval":500} +/node_modules/react/index.js: *new* + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource8_mapFromAtTypes.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource8_mapFromAtTypes.js new file mode 100644 index 00000000000..5aef4bc8610 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource8_mapFromAtTypes.js @@ -0,0 +1,315 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { add } from 'lodash'; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/lodash/common/math.d.ts] +import _ = require("../index"); +declare module "../index" { + interface LoDashStatic { + add(augend: number, addend: number): number; + } +} + +//// [/node_modules/@types/lodash/index.d.ts] +/// +export = _; +export as namespace _; +declare const _: _.LoDashStatic; +declare namespace _ { + interface LoDashStatic {} +} + +//// [/node_modules/@types/lodash/package.json] +{ "name": "@types/lodash", "version": "4.14.97", "types": "index.d.ts" } + +//// [/node_modules/lodash/lodash.js] +;(function() { + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + + function lodash(value) {} + lodash.add = add; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } + else { + // Export to the global object. + root._ = _; + } +}.call(this)); + +//// [/node_modules/lodash/package.json] +{ "name": "lodash", "version": "4.17.15", "main": "./lodash.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/lodash/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/lodash +Info seq [hh:mm:ss:mss] For info: /node_modules/lodash/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/common/math.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/lodash/package.json SVC-1-0 "{ \"name\": \"lodash\", \"version\": \"4.17.15\", \"main\": \"./lodash.js\" }" + /node_modules/@types/lodash/common/math.d.ts Text-1 "import _ = require(\"../index\");\ndeclare module \"../index\" {\n interface LoDashStatic {\n add(augend: number, addend: number): number;\n }\n}" + /node_modules/@types/lodash/index.d.ts Text-1 "/// \nexport = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + ../@types/lodash/common/math.d.ts + Referenced via './common/math.d.ts' from file '../@types/lodash/index.d.ts' + ../@types/lodash/index.d.ts + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + Imported via "../index" from file '../@types/lodash/common/math.d.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/lodash/common/math.d.ts Text-1 "import _ = require(\"../index\");\ndeclare module \"../index\" {\n interface LoDashStatic {\n add(augend: number, addend: number): number;\n }\n}" + /node_modules/@types/lodash/index.d.ts Text-1 "/// \nexport = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + /index.ts SVC-1-0 "import { add } from 'lodash';" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/lodash/common/math.d.ts + Referenced via './common/math.d.ts' from file 'node_modules/@types/lodash/index.d.ts' + node_modules/@types/lodash/index.d.ts + Imported via 'lodash' from file 'index.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + Imported via "../index" from file 'node_modules/@types/lodash/common/math.d.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/lodash/lodash.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/lodash/lodash.js Text-1 ";(function() {\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n function lodash(value) {}\n lodash.add = add;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// \n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));" + /index.ts SVC-1-0 "import { add } from 'lodash';" + + + node_modules/lodash/lodash.js + Imported via 'lodash' from file 'index.ts' with packageId 'lodash/lodash.js@4.17.15' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 17, + "offset": 9 + }, + "end": { + "line": 17, + "offset": 12 + }, + "contextStart": { + "line": 17, + "offset": 5 + }, + "contextEnd": { + "line": 19, + "offset": 11 + }, + "unverified": true + }, + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 22, + "offset": 12 + }, + "end": { + "line": 22, + "offset": 15 + }, + "contextStart": { + "line": 22, + "offset": 5 + }, + "contextEnd": { + "line": 22, + "offset": 22 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/lodash/lodash.js: *new* + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource9_mapFromAtTypes2.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource9_mapFromAtTypes2.js new file mode 100644 index 00000000000..be8997e0362 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource9_mapFromAtTypes2.js @@ -0,0 +1,354 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import _, { foo } from 'lodash'; +_.add + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/lodash/common/math.d.ts] +import _ = require("../index"); +declare module "../index" { + interface LoDashStatic { + add(augend: number, addend: number): number; + } +} + +//// [/node_modules/@types/lodash/index.d.ts] +/// +export = _; +export as namespace _; +declare const _: _.LoDashStatic; +declare namespace _ { + interface LoDashStatic {} +} + +//// [/node_modules/@types/lodash/package.json] +{ "name": "@types/lodash", "version": "4.14.97", "types": "index.d.ts" } + +//// [/node_modules/lodash/lodash.js] +;(function() { + /** + * Adds two numbers. + * + * @static + * @memberOf _ + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. + * @example + * + * _.add(6, 4); + * // => 10 + */ + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + + function lodash(value) {} + lodash.add = add; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + if (freeModule) { + // Export for Node.js. + (freeModule.exports = _)._ = _; + // Export for CommonJS support. + freeExports._ = _; + } + else { + // Export to the global object. + root._ = _; + } +}.call(this)); + +//// [/node_modules/lodash/package.json] +{ "name": "lodash", "version": "4.17.15", "main": "./lodash.js" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/lodash/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/lodash +Info seq [hh:mm:ss:mss] For info: /node_modules/lodash/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/common/math.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/lodash/package.json SVC-1-0 "{ \"name\": \"lodash\", \"version\": \"4.17.15\", \"main\": \"./lodash.js\" }" + /node_modules/@types/lodash/common/math.d.ts Text-1 "import _ = require(\"../index\");\ndeclare module \"../index\" {\n interface LoDashStatic {\n add(augend: number, addend: number): number;\n }\n}" + /node_modules/@types/lodash/index.d.ts Text-1 "/// \nexport = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + ../@types/lodash/common/math.d.ts + Referenced via './common/math.d.ts' from file '../@types/lodash/index.d.ts' + ../@types/lodash/index.d.ts + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + Imported via "../index" from file '../@types/lodash/common/math.d.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/lodash/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/lodash/common/math.d.ts Text-1 "import _ = require(\"../index\");\ndeclare module \"../index\" {\n interface LoDashStatic {\n add(augend: number, addend: number): number;\n }\n}" + /node_modules/@types/lodash/index.d.ts Text-1 "/// \nexport = _;\nexport as namespace _;\ndeclare const _: _.LoDashStatic;\ndeclare namespace _ {\n interface LoDashStatic {}\n}" + /index.ts SVC-1-0 "import _, { foo } from 'lodash';\n_.add" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/lodash/common/math.d.ts + Referenced via './common/math.d.ts' from file 'node_modules/@types/lodash/index.d.ts' + node_modules/@types/lodash/index.d.ts + Imported via 'lodash' from file 'index.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + Imported via "../index" from file 'node_modules/@types/lodash/common/math.d.ts' with packageId '@types/lodash/index.d.ts@4.14.97' + Entry point for implicit type library 'lodash' with packageId '@types/lodash/index.d.ts@4.14.97' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/lodash/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 8 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/auxiliaryProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/lodash/lodash.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/auxiliaryProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/auxiliaryProject1*' (Auxiliary) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/lodash/lodash.js Text-1 ";(function() {\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n function lodash(value) {}\n lodash.add = add;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;//// \n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));" + /index.ts SVC-1-0 "import _, { foo } from 'lodash';\n_.add" + + + node_modules/lodash/lodash.js + Imported via 'lodash' from file 'index.ts' with packageId 'lodash/lodash.js@4.17.15' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "unverified": true + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/common/math.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/index.d.ts: + {"pollingInterval":500} +/node_modules/@types/lodash/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} +/node_modules/lodash/lodash.js: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 3, + "success": true, + "body": [ + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "unverified": true + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24 + }, + "command": "findSourceDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "findSourceDefinition", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/node_modules/lodash/lodash.js", + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/implementation01.js b/tests/baselines/reference/tsserver/fourslashServer/implementation01.js new file mode 100644 index 00000000000..b528ffa1e5a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/implementation01.js @@ -0,0 +1,130 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/implementation01.ts] +interface Foo {} +class Bar implements Foo {} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/implementation01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/implementation01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/implementation01.ts SVC-1-0 "interface Foo {}\nclass Bar implements Foo {}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + implementation01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/implementation01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/implementation01.ts", + "line": 1, + "offset": 13 + }, + "command": "implementation" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "implementation", + "request_seq": 1, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/implementation01.ts", + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 10 + }, + "contextStart": { + "line": 2, + "offset": 1 + }, + "contextEnd": { + "line": 2, + "offset": 28 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js b/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js new file mode 100644 index 00000000000..4dc9db6e83d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js @@ -0,0 +1,444 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import {} from "foo"; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/main.ts] +export {}; + +//// [/package.json] +{ "name": "foo", "type": "module", "exports": { ".": "./main.js" } } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "nodenext" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/main.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /main.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /main.ts Text-1 "export {};" + /index.ts Text-1 "import {} from \"foo\";" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + main.ts + Imported via "foo" from file 'index.ts' + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + index.ts + Matched by default include pattern '**/*' + File is ECMAScript module because 'package.json' has field "type" with value "module" + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"nodenext\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/main.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/main.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/main.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/main.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "\n\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 2, + "endOffset": 260 + }, + "command": "format" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "format", + "request_seq": 7, + "success": true, + "body": [ + { + "start": { + "line": 2, + "offset": 260 + }, + "end": { + "line": 2, + "offset": 260 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 260, + "endLine": 2, + "endOffset": 260, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/main.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /main.ts Text-1 "export {};" + /index.ts SVC-2-2 "\n\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"; import {} from \"foo\";" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 9, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/main.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 12, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js new file mode 100644 index 00000000000..ff62bff02a8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js @@ -0,0 +1,995 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/apps/app1/src/app.ts] +utils + +//// [/apps/app1/src/index.ts] +shared + +//// [/apps/app1/src/utils.ts] +export const utils = 0; + +//// [/apps/app1/tsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + "paths": { + "shared/*": ["../../shared/*"] + } + }, + "include": ["src", "../../shared"] +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/shared/constants.ts] +export const shared = 0; + +//// [/shared/data.ts] +shared + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/apps/app1/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /apps/app1 +Info seq [hh:mm:ss:mss] For info: /apps/app1/tsconfig.json :: Config file name: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /apps/app1/tsconfig.json 2000 undefined Project: /apps/app1/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/apps/app1/tsconfig.json", + "reason": "Creating possible configured project for /apps/app1/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /apps/app1/tsconfig.json : { + "rootNames": [ + "/apps/app1/src/app.ts", + "/apps/app1/src/index.ts", + "/apps/app1/src/utils.ts", + "/shared/constants.ts", + "/shared/data.ts" + ], + "options": { + "module": 1, + "paths": { + "shared/*": [ + "../../shared/*" + ] + }, + "pathsBasePath": "/apps/app1", + "configFilePath": "/apps/app1/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /apps/app1/src 1 undefined Config: /apps/app1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /apps/app1/src 1 undefined Config: /apps/app1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /shared 1 undefined Config: /apps/app1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /shared 1 undefined Config: /apps/app1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /apps/app1/src/app.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /apps/app1/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /apps/app1/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /shared/constants.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /shared/data.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /apps/app1/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /apps/app1/src/app.ts Text-1 "utils" + /apps/app1/src/index.ts Text-1 "shared" + /apps/app1/src/utils.ts Text-1 "export const utils = 0;" + /shared/constants.ts Text-1 "export const shared = 0;" + /shared/data.ts Text-1 "shared" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/app.ts + Matched by include pattern 'src' in 'tsconfig.json' + src/index.ts + Matched by include pattern 'src' in 'tsconfig.json' + src/utils.ts + Matched by include pattern 'src' in 'tsconfig.json' + ../../shared/constants.ts + Matched by include pattern '../../shared' in 'tsconfig.json' + ../../shared/data.ts + Matched by include pattern '../../shared' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/apps/app1/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/apps/app1/tsconfig.json", + "configFile": "/apps/app1/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /apps/app1/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"paths\": {\n \"shared/*\": [\"../../shared/*\"]\n }\n },\n \"include\": [\"src\", \"../../shared\"]\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /apps/app1/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/apps/app1/src/app.ts: *new* + {"pollingInterval":500} +/apps/app1/src/index.ts: *new* + {"pollingInterval":500} +/apps/app1/src/utils.ts: *new* + {"pollingInterval":500} +/apps/app1/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/shared/constants.ts: *new* + {"pollingInterval":500} +/shared/data.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/apps/app1/src: *new* + {} +/shared: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true, + "newline": "\n" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /apps/app1/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /apps/app1/src +Info seq [hh:mm:ss:mss] For info: /apps/app1/src/index.ts :: Config file name: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /apps/app1/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /apps/app1/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +After Request +watchedFiles:: +/apps/app1/src/app.ts: + {"pollingInterval":500} +/apps/app1/src/utils.ts: + {"pollingInterval":500} +/apps/app1/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/shared/constants.ts: + {"pollingInterval":500} +/shared/data.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/apps/app1/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/apps/app1/src: + {} +/shared: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 6, + "success": true, + "body": [ + { + "message": "Cannot find name 'shared'.", + "start": 0, + "length": 6, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 7 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 7, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 7, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 8, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"shared/constants\"", + "changes": [ + { + "fileName": "/apps/app1/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { shared } from \"shared/constants\";\n\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { shared } from \"shared/constants\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/apps/app1/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /apps/app1/src/app.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /apps/app1/src +Info seq [hh:mm:ss:mss] For info: /apps/app1/src/app.ts :: Config file name: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /apps/app1/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /apps/app1/src/app.ts Text-1 "utils" + /apps/app1/src/index.ts SVC-2-2 "shared" + /apps/app1/src/utils.ts Text-1 "export const utils = 0;" + /shared/constants.ts Text-1 "export const shared = 0;" + /shared/data.ts Text-1 "shared" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /apps/app1/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /apps/app1/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /apps/app1/src/app.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +After Request +watchedFiles:: +/apps/app1/src/utils.ts: + {"pollingInterval":500} +/apps/app1/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/shared/constants.ts: + {"pollingInterval":500} +/shared/data.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/apps/app1/src/app.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/apps/app1/src: + {} +/shared: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 12, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 13, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 15, + "success": true, + "body": [ + { + "message": "Cannot find name 'utils'.", + "start": 0, + "length": 5, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 6 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 6, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 17, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"./utils\"", + "changes": [ + { + "fileName": "/apps/app1/src/app.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { utils } from \"./utils\";\n\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { utils } from \"./utils\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/apps/app1/src/app.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/shared/data.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /shared/data.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /shared +Info seq [hh:mm:ss:mss] For info: /shared/data.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /apps/app1/tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /apps/app1/src/app.ts SVC-2-2 "utils" + /apps/app1/src/index.ts SVC-2-2 "shared" + /apps/app1/src/utils.ts Text-1 "export const utils = 0;" + /shared/constants.ts Text-1 "export const shared = 0;" + /shared/data.ts Text-1 "shared" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/apps/app1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (8) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /apps/app1/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /apps/app1/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /apps/app1/src/app.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /shared/data.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /apps/app1/tsconfig.json +After Request +watchedFiles:: +/apps/app1/src/utils.ts: + {"pollingInterval":500} +/apps/app1/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/shared/constants.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/shared/data.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/apps/app1/src: + {} +/shared: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 21, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 22, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 24, + "success": true, + "body": [ + { + "message": "Cannot find name 'shared'.", + "start": 0, + "length": 6, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 7 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 7, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 26, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"./constants\"", + "changes": [ + { + "fileName": "/shared/data.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { shared } from \"./constants\";\n\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { shared } from \"./constants\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/shared/data.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelative1.js b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelative1.js new file mode 100644 index 00000000000..e3abc921296 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelative1.js @@ -0,0 +1,858 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/packages/pkg-1/node_modules/pkg-2] symlink(/packages/pkg-2) +//// [/packages/pkg-1/package.json] +{ "dependencies": { "pkg-2": "*" } } + +//// [/packages/pkg-1/src/index.ts] +Pkg2 + +//// [/packages/pkg-1/tsconfig.json] +{ + "extends": "../../tsconfig.base.json", + "references": [ + { "path": "../pkg-2" } + ] +} + +//// [/packages/pkg-2/package.json] +{ "types": "dist/index.d.ts" } + +//// [/packages/pkg-2/src/blah/foo/data.ts] +Pkg2 + +//// [/packages/pkg-2/src/index.ts] +import "./utils"; + +//// [/packages/pkg-2/src/utils.ts] +export const Pkg2 = {}; + +//// [/packages/pkg-2/tsconfig.json] +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "dist", "rootDir": "src", "composite": true } +} + +//// [/tsconfig.base.json] +{ + "compilerOptions": { + "module": "commonjs", + "paths": { + "pkg-1/*": ["./packages/pkg-1/src/*"], + "pkg-2/*": ["./packages/pkg-2/src/*"] + } + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.base.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.base.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.base.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n \"paths\": {\n \"pkg-1/*\": [\"./packages/pkg-1/src/*\"],\n \"pkg-2/*\": [\"./packages/pkg-2/src/*\"]\n }\n }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.base.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.base.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "formatOptions": { + "indentSize": 4, + "tabSize": 4, + "newLineCharacter": "\n", + "convertTabsToSpaces": true, + "indentStyle": 2, + "insertSpaceAfterConstructor": false, + "insertSpaceAfterCommaDelimiter": true, + "insertSpaceAfterSemicolonInForStatements": true, + "insertSpaceBeforeAndAfterBinaryOperators": true, + "insertSpaceAfterKeywordsInControlFlowStatements": true, + "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, + "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, + "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, + "insertSpaceBeforeFunctionParenthesis": false, + "placeOpenBraceOnNewLineForFunctions": false, + "placeOpenBraceOnNewLineForControlBlocks": false, + "semicolons": "ignore", + "trimTrailingWhitespace": true, + "indentSwitchCase": true, + "newline": "\n" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] Format host information updated +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/pkg-1/src +Info seq [hh:mm:ss:mss] For info: /packages/pkg-1/src/index.ts :: Config file name: /packages/pkg-1/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/pkg-1/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-1/tsconfig.json 2000 undefined Project: /packages/pkg-1/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/pkg-1/tsconfig.json", + "reason": "Creating possible configured project for /packages/pkg-1/src/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /packages/pkg-1/tsconfig.json : { + "rootNames": [ + "/packages/pkg-1/src/index.ts" + ], + "options": { + "module": 1, + "paths": { + "pkg-1/*": [ + "./packages/pkg-1/src/*" + ], + "pkg-2/*": [ + "./packages/pkg-2/src/*" + ] + }, + "pathsBasePath": "/", + "configFilePath": "/packages/pkg-1/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/packages/pkg-2", + "originalPath": "../pkg-2" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.base.json 2000 undefined Config: /packages/pkg-1/tsconfig.json WatchType: Extended config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-1 1 undefined Config: /packages/pkg-1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-1 1 undefined Config: /packages/pkg-1/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/pkg-1/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /packages/pkg-2/tsconfig.json : { + "rootNames": [ + "/packages/pkg-2/src/index.ts", + "/packages/pkg-2/src/utils.ts", + "/packages/pkg-2/src/blah/foo/data.ts" + ], + "options": { + "module": 1, + "paths": { + "pkg-1/*": [ + "./packages/pkg-1/src/*" + ], + "pkg-2/*": [ + "./packages/pkg-2/src/*" + ] + }, + "pathsBasePath": "/", + "outDir": "/packages/pkg-2/dist", + "rootDir": "/packages/pkg-2/src", + "composite": true, + "configFilePath": "/packages/pkg-2/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-2/tsconfig.json 2000 undefined Project: /packages/pkg-1/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-2 1 undefined Config: /packages/pkg-2/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-2 1 undefined Config: /packages/pkg-2/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/pkg-1/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/pkg-1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/pkg-1/src/index.ts SVC-1-0 "Pkg2" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-1/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 1 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-2/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-2/src/utils.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /packages/pkg-2/src/utils.ts Text-1 "export const Pkg2 = {};" + /packages/pkg-2/src/index.ts Text-1 "import \"./utils\";" + + + ../pkg-2/src/utils.ts + Imported via "./utils" from file '../pkg-2/src/index.ts' + ../pkg-2/src/index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/pkg-1/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/pkg-1/src/index.ts", + "configFile": "/packages/pkg-1/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/packages/pkg-1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.base.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/pkg-1/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/pkg-1/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/pkg-1/package.json: *new* + {"pollingInterval":250} +/packages/pkg-1/tsconfig.json: *new* + {"pollingInterval":2000} +/packages/pkg-2/src/index.ts: *new* + {"pollingInterval":500} +/packages/pkg-2/src/utils.ts: *new* + {"pollingInterval":500} +/packages/pkg-2/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.base.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/pkg-1: *new* + {} +/packages/pkg-2: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 6, + "success": true, + "body": [ + { + "message": "Cannot find name 'Pkg2'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 7, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] forEachExternalModuleToImportFrom autoImportProvider: * +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /packages/pkg-1/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 8, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"pkg-2/utils\"", + "changes": [ + { + "fileName": "/packages/pkg-1/src/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { Pkg2 } from \"pkg-2/utils\";\n\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/pkg-1/package.json: + {"pollingInterval":250} +/packages/pkg-1/tsconfig.json: + {"pollingInterval":2000} +/packages/pkg-2/src/index.ts: + {"pollingInterval":500} +/packages/pkg-2/src/utils.ts: + {"pollingInterval":500} +/packages/pkg-2/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.base.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/pkg-1: + {} +/packages/pkg-1/node_modules: *new* + {} +/packages/pkg-2: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { Pkg2 } from \"pkg-2/utils\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/packages/pkg-1/src/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /packages/pkg-2/src/blah/foo +Info seq [hh:mm:ss:mss] For info: /packages/pkg-2/src/blah/foo/data.ts :: Config file name: /packages/pkg-2/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /packages/pkg-2/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/packages/pkg-2/tsconfig.json", + "reason": "Creating possible configured project for /packages/pkg-2/src/blah/foo/data.ts to open" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /packages/pkg-2/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /packages/pkg-2/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/packages/pkg-2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /packages/pkg-2/src/utils.ts Text-1 "export const Pkg2 = {};" + /packages/pkg-2/src/index.ts Text-1 "import \"./utils\";" + /packages/pkg-2/src/blah/foo/data.ts SVC-1-0 "Pkg2" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + src/utils.ts + Imported via "./utils" from file 'src/index.ts' + Matched by default include pattern '**/*' + src/index.ts + Matched by default include pattern '**/*' + src/blah/foo/data.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /packages/pkg-2/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/packages/pkg-2/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/packages/pkg-2/src/blah/foo/data.ts", + "configFile": "/packages/pkg-2/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /packages/pkg-2 +Info seq [hh:mm:ss:mss] For info: /packages/pkg-2/tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/packages/pkg-1/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/packages/pkg-2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.base.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /packages/pkg-1/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/pkg-1/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /packages/pkg-2/src/blah/foo/data.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /packages/pkg-2/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/packages/pkg-1/package.json: + {"pollingInterval":250} +/packages/pkg-1/tsconfig.json: + {"pollingInterval":2000} +/packages/pkg-2/package.json: *new* + {"pollingInterval":250} +/packages/pkg-2/src/index.ts: + {"pollingInterval":500} +/packages/pkg-2/src/utils.ts: + {"pollingInterval":500} +/packages/pkg-2/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.base.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/packages/pkg-1: + {} +/packages/pkg-1/node_modules: + {} +/packages/pkg-2: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 12, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "preferences": { + "importModuleSpecifierPreference": "project-relative" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 13, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 15, + "success": true, + "body": [ + { + "message": "Cannot find name 'Pkg2'.", + "start": 0, + "length": 4, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 5 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 5, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 17, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"../../utils\"", + "changes": [ + { + "fileName": "/packages/pkg-2/src/blah/foo/data.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { Pkg2 } from \"../../utils\";\n\n" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { Pkg2 } from \"../../utils\";\n\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/packages/pkg-2/src/blah/foo/data.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js new file mode 100644 index 00000000000..0769181f4ad --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js @@ -0,0 +1,390 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/index.ts] +Component + +//// [/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts] +export declare function Component(): void; + +//// [/project/node_modules/@types/react] symlink(/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react) +//// [/project/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/tsconfig.json :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/tsconfig.json 2000 undefined Project: /project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/tsconfig.json", + "reason": "Creating possible configured project for /project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/tsconfig.json : { + "rootNames": [ + "/project/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/index.ts Text-1 "Component" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/tsconfig.json", + "configFile": "/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/project/index.ts: *new* + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: *new* + {"pollingInterval":500} +/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/index.ts :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /project/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/project/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/project: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'Component'.", + "start": 0, + "length": 9, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 10 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 10, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Add import from \"react\"", + "changes": [ + { + "fileName": "/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { Component } from \"react\";\r\n\r\n" + } + ] + } + ] + } + ] + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: + {} +/project/node_modules: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "import { Component } from \"react\";\r\n\r\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "line": 1, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js new file mode 100644 index 00000000000..506d1913b0c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js @@ -0,0 +1,329 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/index.ts] +import Com + +//// [/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts] +export declare function Component(): void; + +//// [/project/node_modules/@types/react] symlink(/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react) +//// [/project/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/tsconfig.json :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/tsconfig.json 2000 undefined Project: /project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/tsconfig.json", + "reason": "Creating possible configured project for /project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/tsconfig.json : { + "rootNames": [ + "/project/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/index.ts Text-1 "import Com" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/tsconfig.json", + "configFile": "/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "export declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/project/index.ts: *new* + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: *new* + {"pollingInterval":500} +/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/index.ts :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /project/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/project/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/project: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForImportStatements": true, + "includeCompletionsWithInsertText": true, + "includeCompletionsWithSnippetText": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "line": 1, + "offset": 11 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 1 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 11, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 8 + }, + "end": { + "line": 1, + "offset": 11 + } + }, + "entries": [ + { + "name": "Component", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "11", + "insertText": "import { Component$1 } from \"react\";", + "replacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 11 + } + }, + "isSnippet": true, + "source": "react", + "sourceDisplay": [ + { + "text": "react", + "kind": "text" + } + ], + "isImportStatementCompletion": true, + "data": { + "exportName": "Component", + "exportMapKey": "9 * Component ", + "moduleSpecifier": "react", + "fileName": "/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: + {} +/project/node_modules: *new* + {} diff --git a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js new file mode 100644 index 00000000000..e0a604a9d6a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js @@ -0,0 +1,293 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/index.ts] +import SvgProp + +//// [/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts] +import "csstype"; +export declare function Component(): void; + +//// [/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/csstype] symlink(/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype) +//// [/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts] +export interface SvgProperties {} + +//// [/project/node_modules/@types/react] symlink(/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react) +//// [/project/tsconfig.json] +{ "compilerOptions": { "module": "commonjs" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/tsconfig.json :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/tsconfig.json 2000 undefined Project: /project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/project/tsconfig.json", + "reason": "Creating possible configured project for /project/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /project/tsconfig.json : { + "rootNames": [ + "/project/index.ts" + ], + "options": { + "module": 1, + "configFilePath": "/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /project 1 undefined Config: /project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /project/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/index.ts Text-1 "import SvgProp" + /project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts Text-1 "export interface SvgProperties {}" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "import \"csstype\";\nexport declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts + Imported via "csstype" from file 'node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts' + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/project/tsconfig.json", + "configFile": "/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"commonjs\" } }" + /project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts Text-1 "export interface SvgProperties {}" + /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts Text-1 "import \"csstype\";\nexport declare function Component(): void;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts + Imported via "csstype" from file 'node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts' + node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/project/index.ts: *new* + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: *new* + {"pollingInterval":500} +/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts: *new* + {"pollingInterval":500} +/project/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/project: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /project/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/index.ts :: Config file name: /project/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /project/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/index.d.ts: + {"pollingInterval":500} +/project/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/project/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/project: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForImportStatements": true, + "includeCompletionsWithInsertText": true, + "includeCompletionsWithSnippetText": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/index.ts", + "line": 1, + "offset": 15 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 3, + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 8 + }, + "end": { + "line": 1, + "offset": 15 + } + }, + "entries": [ + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js new file mode 100644 index 00000000000..ea3043ffba9 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js @@ -0,0 +1,5144 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/ambient.d.ts] +declare module 'ambient' { + export const ambient = 0; +} +a + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "esnext" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/ambient.d.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 99, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /ambient.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /ambient.d.ts Text-1 "declare module 'ambient' {\n export const ambient = 0;\n}\na" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + ambient.d.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"esnext\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/ambient.d.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/ambient.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /ambient.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /ambient.d.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /ambient.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/ambient.d.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 4, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 4, + "offset": 1 + }, + "end": { + "line": 4, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ambient", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "ambient", + "sourceDisplay": [ + { + "text": "ambient", + "kind": "text" + } + ], + "data": { + "exportName": "ambient", + "exportMapKey": "7 * ambient ambient", + "moduleSpecifier": "ambient", + "ambientModuleName": "ambient" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 1, + "endLine": 4, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /ambient.d.ts SVC-2-1 "a" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 1, + "endLine": 2, + "endOffset": 1, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 2, + "endLine": 2, + "endOffset": 2, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 3, + "endLine": 2, + "endOffset": 3, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 4, + "endLine": 2, + "endOffset": 4, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 5, + "endLine": 2, + "endOffset": 5, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 6, + "endLine": 2, + "endOffset": 6, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 7, + "endLine": 2, + "endOffset": 7, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 8, + "endLine": 2, + "endOffset": 8, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 9, + "endLine": 2, + "endOffset": 9, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 10, + "endLine": 2, + "endOffset": 10, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 11, + "endLine": 2, + "endOffset": 11, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 12, + "endLine": 2, + "endOffset": 12, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 13, + "endLine": 2, + "endOffset": 13, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 14, + "endLine": 2, + "endOffset": 14, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 15, + "endLine": 2, + "endOffset": 15, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 16, + "endLine": 2, + "endOffset": 16, + "insertString": "'" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 17, + "endLine": 2, + "endOffset": 17, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 18, + "endLine": 2, + "endOffset": 18, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 19, + "endLine": 2, + "endOffset": 19, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 20, + "endLine": 2, + "endOffset": 20, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 21, + "endLine": 2, + "endOffset": 21, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 22, + "endLine": 2, + "endOffset": 22, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 23, + "endLine": 2, + "endOffset": 23, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 24, + "endLine": 2, + "endOffset": 24, + "insertString": "'" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 25, + "endLine": 2, + "endOffset": 25, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 26, + "endLine": 2, + "endOffset": 26, + "insertString": "{" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 2, + "offset": 27, + "endLine": 2, + "endOffset": 27, + "insertString": "\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 2, + "endLine": 3, + "endOffset": 2, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 3, + "endLine": 3, + "endOffset": 3, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 4, + "endLine": 3, + "endOffset": 4, + "insertString": "x" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 5, + "endLine": 3, + "endOffset": 5, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 6, + "endLine": 3, + "endOffset": 6, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 7, + "endLine": 3, + "endOffset": 7, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 8, + "endLine": 3, + "endOffset": 8, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 9, + "endLine": 3, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 10, + "endLine": 3, + "endOffset": 10, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 11, + "endLine": 3, + "endOffset": 11, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 12, + "endLine": 3, + "endOffset": 12, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 13, + "endLine": 3, + "endOffset": 13, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 14, + "endLine": 3, + "endOffset": 14, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 15, + "endLine": 3, + "endOffset": 15, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 16, + "endLine": 3, + "endOffset": 16, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 17, + "endLine": 3, + "endOffset": 17, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 18, + "endLine": 3, + "endOffset": 18, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 19, + "endLine": 3, + "endOffset": 19, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 20, + "endLine": 3, + "endOffset": 20, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 21, + "endLine": 3, + "endOffset": 21, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 22, + "endLine": 3, + "endOffset": 22, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 23, + "endLine": 3, + "endOffset": 23, + "insertString": "2" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 24, + "endLine": 3, + "endOffset": 24, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 25, + "endLine": 3, + "endOffset": 25, + "insertString": "=" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 26, + "endLine": 3, + "endOffset": 26, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 27, + "endLine": 3, + "endOffset": 27, + "insertString": "0" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 28, + "endLine": 3, + "endOffset": 28, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 29, + "endLine": 3, + "endOffset": 29, + "insertString": "\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 4, + "offset": 1, + "endLine": 4, + "endOffset": 1, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 66, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 3 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /ambient.d.ts SVC-2-60 "a\ndeclare module 'ambient' {\n export const ambient2 = 0;\n}" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 67, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ambient2", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "ambient", + "sourceDisplay": [ + { + "text": "ambient", + "kind": "text" + } + ], + "data": { + "exportName": "ambient2", + "exportMapKey": "8 * ambient2 ambient", + "moduleSpecifier": "ambient", + "ambientModuleName": "ambient" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/ambient.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /ambient.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 1, + "endLine": 3, + "endOffset": 29, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 2, + "endLine": 3, + "endOffset": 2, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 3, + "endLine": 3, + "endOffset": 3, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 4, + "endLine": 3, + "endOffset": 4, + "insertString": "x" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 5, + "endLine": 3, + "endOffset": 5, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 6, + "endLine": 3, + "endOffset": 6, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 76, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 7, + "endLine": 3, + "endOffset": 7, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 77, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 8, + "endLine": 3, + "endOffset": 8, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 78, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 9, + "endLine": 3, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 79, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 10, + "endLine": 3, + "endOffset": 10, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 80, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 11, + "endLine": 3, + "endOffset": 11, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 81, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 12, + "endLine": 3, + "endOffset": 12, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 82, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 13, + "endLine": 3, + "endOffset": 13, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 83, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 14, + "endLine": 3, + "endOffset": 14, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 84, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 15, + "endLine": 3, + "endOffset": 15, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 85, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 16, + "endLine": 3, + "endOffset": 16, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 86, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 17, + "endLine": 3, + "endOffset": 17, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 87, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 18, + "endLine": 3, + "endOffset": 18, + "insertString": "b" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 88, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 19, + "endLine": 3, + "endOffset": 19, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 89, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 20, + "endLine": 3, + "endOffset": 20, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 90, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 21, + "endLine": 3, + "endOffset": 21, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 91, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 22, + "endLine": 3, + "endOffset": 22, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 92, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 23, + "endLine": 3, + "endOffset": 23, + "insertString": "3" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 93, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 24, + "endLine": 3, + "endOffset": 24, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 94, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 25, + "endLine": 3, + "endOffset": 25, + "insertString": "=" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 95, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 26, + "endLine": 3, + "endOffset": 26, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 96, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 3, + "offset": 27, + "endLine": 3, + "endOffset": 27, + "insertString": "0" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 97, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 97, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 98, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 4 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /ambient.d.ts SVC-2-88 "a\ndeclare module 'ambient' {\n export const ambient3 = 0\n}" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 98, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ambient3", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "ambient", + "sourceDisplay": [ + { + "text": "ambient", + "kind": "text" + } + ], + "data": { + "exportName": "ambient3", + "exportMapKey": "8 * ambient3 ambient", + "moduleSpecifier": "ambient", + "ambientModuleName": "ambient" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 99, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 99, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 100, + "type": "request", + "arguments": { + "file": "/ambient.d.ts", + "line": 1, + "offset": 2 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 100, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ambient3", + "kind": "const", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "ambient", + "sourceDisplay": [ + { + "text": "ambient", + "kind": "text" + } + ], + "data": { + "exportName": "ambient3", + "exportMapKey": "8 * ambient3 ambient", + "moduleSpecifier": "ambient", + "ambientModuleName": "ambient" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js new file mode 100644 index 00000000000..889899df92e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js @@ -0,0 +1,3278 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.js] + +readF + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/node/index.d.ts] +declare module 'fs' { + export function readFile(): void; +} +declare module 'util' { + export function promisify(): void; +} + +//// [/package.json] +{} + +//// [/tsconfig.json] +{ + "compilerOptions": { + "module": "esnext", + "allowJs": true, + "checkJs": true, + "typeRoots": [ + "node_modules/@types" + ] + }, + "include": ["**/*"], + "typeAcquisition": { + "enable": true + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/a.js", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 99, + "allowJs": true, + "checkJs": true, + "typeRoots": [ + "/node_modules/@types" + ], + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types 1 undefined Project: /tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types 1 undefined Project: /tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js Text-1 "\nreadF" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by include pattern '**/*' in 'tsconfig.json' + a.js + Matched by include pattern '**/*' in 'tsconfig.json' + lib.d.ts + Matched by include pattern '**/*' in 'tsconfig.json' + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "text": "Cannot write file '/a.js' because it would overwrite input file.", + "code": 5055, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"esnext\",\n \"allowJs\": true,\n \"checkJs\": true,\n \"typeRoots\": [\n \"node_modules/@types\"\n ]\n },\n \"include\": [\"**/*\"],\n \"typeAcquisition\": {\n \"enable\": true\n }\n}" + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a.js: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} +/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.js :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/a.js: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} +/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 2, + "offset": 6 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 6 + } + }, + "entries": [ + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 2, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 7, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 3, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 9, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 3, + "endLine": 1, + "endOffset": 3, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 4, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 4, + "endLine": 1, + "endOffset": 4, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 5, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 6, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 15, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 7, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 17, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 7, + "endLine": 1, + "endOffset": 7, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 8, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 8, + "endLine": 1, + "endOffset": 8, + "insertString": "{" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 9, + "key": "{" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 10, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 11, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 11, + "endLine": 1, + "endOffset": 11, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 12, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 12, + "endLine": 1, + "endOffset": 12, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 13, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 13, + "endLine": 1, + "endOffset": 13, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 14, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 15, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 16, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 16, + "endLine": 1, + "endOffset": 16, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 17, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 17, + "endLine": 1, + "endOffset": 17, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 18, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "y" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 19, + "key": "y" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 20, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 21, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 22, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 23, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 49, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 24, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 51, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 25, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 53, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 26, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 55, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 27, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 57, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "'" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 28, + "key": "'" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 59, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 29, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 61, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 30, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 63, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 31, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 65, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 32, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 67, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": "'" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 33, + "key": "'" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 69, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 34, + "key": ";" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 71, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 72, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 2, + "offset": 6 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js SVC-2-34 "import { promisify } from 'util';\nreadF" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 73, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 6 + } + }, + "entries": [ + { + "name": "promisify", + "kind": "alias", + "kindModifiers": "export,declare", + "sortText": "11" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readFile", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "fs", + "sourceDisplay": [ + { + "text": "fs", + "kind": "text" + } + ], + "data": { + "exportName": "readFile", + "exportMapKey": "8 * readFile fs", + "moduleSpecifier": "fs", + "ambientModuleName": "fs" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 1, + "endLine": 2, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 75, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 76, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 1, + "offset": 6 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js SVC-2-35 "readF" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 76, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 6 + } + }, + "entries": [ + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js new file mode 100644 index 00000000000..485a49ee9c2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js @@ -0,0 +1,1653 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] + + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "esnext" } } + +//// [/undefined.ts] +export = undefined; + +//// [/undefinedAlias.ts] +const x = undefined; +export = x; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/undefined.ts", + "/undefinedAlias.ts" + ], + "options": { + "module": 99, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /undefined.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /undefinedAlias.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts Text-1 "" + /lib.d.ts Text-1 lib.d.ts-Text + /undefined.ts Text-1 "export = undefined;" + /undefinedAlias.ts Text-1 "const x = undefined;\nexport = x;" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + undefined.ts + Matched by default include pattern '**/*' + undefinedAlias.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"esnext\" } }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} +/undefined.ts: *new* + {"pollingInterval":500} +/undefinedAlias.ts: *new* + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/undefined.ts: + {"pollingInterval":500} +/undefinedAlias.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "x", + "kind": "const", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/undefinedAlias", + "data": { + "exportName": "export=", + "exportMapKey": "1 * x ", + "fileName": "/undefinedAlias.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 1 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "x", + "kind": "const", + "kindModifiers": "", + "sortText": "16", + "hasAction": true, + "source": "/undefinedAlias", + "data": { + "exportName": "export=", + "exportMapKey": "1 * x ", + "fileName": "/undefinedAlias.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js new file mode 100644 index 00000000000..d761486092f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js @@ -0,0 +1,839 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.js] + +readF + +//// [/jsconfig.json] +{ + "compilerOptions": { + "module": "commonjs", + }, +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/node/index.d.ts] +declare module 'fs' { + export function readFile(): void; +} +declare module 'util' { + export function promisify(): void; +} + +//// [/package.json] +{ "mod" } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/jsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /jsconfig.json :: Config file name: /jsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /jsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /jsconfig.json 2000 undefined Project: /jsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/jsconfig.json", + "reason": "Creating possible configured project for /jsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /jsconfig.json : { + "rootNames": [ + "/a.js", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "module": 1, + "configFilePath": "/jsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /jsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /jsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /jsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /jsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a.js Text-1 "\nreadF" + /lib.d.ts Text-1 lib.d.ts-Text + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + a.js + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/jsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/jsconfig.json", + "configFile": "/jsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /jsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"module\": \"commonjs\",\n },\n}" + /node_modules/@types/node/index.d.ts Text-1 "declare module 'fs' {\n export function readFile(): void;\n}\ndeclare module 'util' {\n export function promisify(): void;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + jsconfig.json + Root file specified for compilation + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /jsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a.js: *new* + {"pollingInterval":500} +/jsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.js :: Config file name: /jsconfig.json +Info seq [hh:mm:ss:mss] Project '/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /jsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /jsconfig.json +After Request +watchedFiles:: +/jsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/index.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} + +watchedFiles *deleted*:: +/a.js: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a.js", + "line": 2, + "offset": 6 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 1 ambient and 0 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is complete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 6 + } + }, + "entries": [ + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "readFile", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "fs", + "sourceDisplay": [ + { + "text": "fs", + "kind": "text" + } + ], + "data": { + "exportName": "readFile", + "exportMapKey": "8 * readFile fs", + "moduleSpecifier": "fs", + "ambientModuleName": "fs" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js new file mode 100644 index 00000000000..4279ad1cc54 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js @@ -0,0 +1,4349 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a.ts] +import 'react'; +declare module 'react' { + export function useBlah(): void; +} +0; +use + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/react/index.d.ts] +export function useState(): void; + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "esnext" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/a.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "module": 99, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts Text-1 "export function useState(): void;" + /a.ts Text-1 "import 'react';\ndeclare module 'react' {\n export function useBlah(): void; \n}\n0;\nuse" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + node_modules/@types/react/index.d.ts + Imported via 'react' from file 'a.ts' + Entry point for implicit type library 'react' + a.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"esnext\" } }" + /node_modules/@types/react/index.d.ts Text-1 "export function useState(): void;" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/react/index.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /a.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/react/index.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 6, + "offset": 4 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 6, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 4 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "useBlah", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useBlah", + "exportMapKey": "7 * useBlah ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "useState", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useState", + "exportMapKey": "8 * useState ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 6, + "offset": 4 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 6, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 4 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "useBlah", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useBlah", + "exportMapKey": "7 * useBlah ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "useState", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useState", + "exportMapKey": "8 * useState ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 1, + "endLine": 3, + "endOffset": 37, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 1, + "endLine": 3, + "endOffset": 1, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 2, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 9, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 2, + "endLine": 3, + "endOffset": 2, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 3, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 3, + "endLine": 3, + "endOffset": 3, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 4, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 4, + "endLine": 3, + "endOffset": 4, + "insertString": "x" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 5, + "key": "x" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 15, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 5, + "endLine": 3, + "endOffset": 5, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 6, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 17, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 6, + "endLine": 3, + "endOffset": 6, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 7, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 7, + "endLine": 3, + "endOffset": 7, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 8, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 8, + "endLine": 3, + "endOffset": 8, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 9, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 9, + "endLine": 3, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 10, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 10, + "endLine": 3, + "endOffset": 10, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 11, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 11, + "endLine": 3, + "endOffset": 11, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 12, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 12, + "endLine": 3, + "endOffset": 12, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 13, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 13, + "endLine": 3, + "endOffset": 13, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 14, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 14, + "endLine": 3, + "endOffset": 14, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 15, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 15, + "endLine": 3, + "endOffset": 15, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 16, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 16, + "endLine": 3, + "endOffset": 16, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 17, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 17, + "endLine": 3, + "endOffset": 17, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 18, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 18, + "endLine": 3, + "endOffset": 18, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 19, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 19, + "endLine": 3, + "endOffset": 19, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 20, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 20, + "endLine": 3, + "endOffset": 20, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 21, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 21, + "endLine": 3, + "endOffset": 21, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 22, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 49, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 22, + "endLine": 3, + "endOffset": 22, + "insertString": "Y" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 23, + "key": "Y" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 51, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 23, + "endLine": 3, + "endOffset": 23, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 24, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 53, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 24, + "endLine": 3, + "endOffset": 24, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 25, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 55, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 25, + "endLine": 3, + "endOffset": 25, + "insertString": "(" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 26, + "key": "(" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 57, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 26, + "endLine": 3, + "endOffset": 26, + "insertString": ")" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 27, + "key": ")" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 59, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 27, + "endLine": 3, + "endOffset": 27, + "insertString": ":" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 28, + "key": ":" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 61, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 28, + "endLine": 3, + "endOffset": 28, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 29, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 63, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 29, + "endLine": 3, + "endOffset": 29, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 30, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 65, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 30, + "endLine": 3, + "endOffset": 30, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 31, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 67, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 31, + "endLine": 3, + "endOffset": 31, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 32, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 69, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 32, + "endLine": 3, + "endOffset": 32, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 3, + "offset": 33, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 71, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 72, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 6, + "offset": 4 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts Text-1 "export function useState(): void;" + /a.ts SVC-2-33 "import 'react';\ndeclare module 'react' {\n export function useYes(): true\n}\n0;\nuse" + /lib.d.ts Text-1 lib.d.ts-Text + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache miss or empty; calculating new results +Info seq [hh:mm:ss:mss] getExportInfoMap: done in * ms +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 73, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 6, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 4 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "useState", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useState", + "exportMapKey": "8 * useState ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "useYes", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useYes", + "exportMapKey": "6 * useYes ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "preferences": { + "includeCompletionsForModuleExports": true, + "includeInsertTextCompletions": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 74, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "file": "/a.ts", + "line": 6, + "offset": 4 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getExportInfoMap: cache hit +Info seq [hh:mm:ss:mss] collectAutoImports: resolved 0 module specifiers, plus 0 ambient and 2 from cache +Info seq [hh:mm:ss:mss] collectAutoImports: response is incomplete +Info seq [hh:mm:ss:mss] collectAutoImports: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 75, + "success": true, + "body": { + "flags": 1, + "isGlobalCompletion": true, + "isMemberCompletion": false, + "isNewIdentifierLocation": false, + "optionalReplacementSpan": { + "start": { + "line": 6, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 4 + } + }, + "entries": [ + { + "name": "abstract", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "any", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "ArrayBuffer", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "as", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "asserts", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "async", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "await", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "bigint", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "boolean", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Boolean", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "break", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "case", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "catch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "class", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "const", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "continue", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "DataView", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Date", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "debugger", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "declare", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "decodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "decodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "default", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "delete", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "do", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "else", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "encodeURI", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "encodeURIComponent", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "enum", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Error", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "eval", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "EvalError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "export", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "extends", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "false", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "finally", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Float32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Float64Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "for", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "function", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Function", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "globalThis", + "kind": "module", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "if", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "implements", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "import", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "in", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "infer", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Infinity", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "instanceof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Int16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Int8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "interface", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Intl", + "kind": "module", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isFinite", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "isNaN", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "JSON", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "keyof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "let", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Math", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "module", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "namespace", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "NaN", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "never", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "new", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "null", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "number", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Number", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "object", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Object", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "package", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "parseFloat", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "parseInt", + "kind": "function", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RangeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "readonly", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "ReferenceError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "RegExp", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "return", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "satisfies", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "string", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "String", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "super", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "switch", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "symbol", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "SyntaxError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "this", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "throw", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "true", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "try", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "type", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "TypeError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "typeof", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "Uint16Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint32Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8Array", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "Uint8ClampedArray", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "undefined", + "kind": "var", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unique", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "unknown", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "URIError", + "kind": "var", + "kindModifiers": "declare", + "sortText": "15" + }, + { + "name": "var", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "void", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "while", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "with", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "yield", + "kind": "keyword", + "kindModifiers": "", + "sortText": "15" + }, + { + "name": "useState", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useState", + "exportMapKey": "8 * useState ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "useYes", + "kind": "function", + "kindModifiers": "export,declare", + "sortText": "16", + "hasAction": true, + "source": "/node_modules/@types/react/index", + "data": { + "exportName": "useYes", + "exportMapKey": "6 * useYes ", + "fileName": "/node_modules/@types/react/index.d.ts" + } + }, + { + "name": "escape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + }, + { + "name": "unescape", + "kind": "function", + "kindModifiers": "deprecated,declare", + "sortText": "z15" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossGlobalProjects.js b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossGlobalProjects.js new file mode 100644 index 00000000000..44ae7b6e1f0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossGlobalProjects.js @@ -0,0 +1,1741 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/index.ts] +namespace NS { + export function FA() { + FB(); + } +} + +interface I { + FA(); +} + +const ia: I = { + FA() { }, + FB() { }, + FC() { }, + }; + +//// [/a/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "references": [ + { "path": "../b" }, + { "path": "../c" }, + ], + "files": [ + "index.ts", + ], +} + +//// [/b/index.ts] +namespace NS { + export function FB() {} +} + +interface I { + FB(); +} + +const ib: I = { FB() {} }; + +//// [/b/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "files": [ + "index.ts", + ], +} + +//// [/c/index.ts] +namespace NS { + export function FC() {} +} + +interface I { + FC(); +} + +const ic: I = { FC() {} }; + +//// [/c/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "files": [ + "index.ts", + ], +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "a" }, + ], + "files": [] +} + +//// [/tsconfig.settings.json] +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": "none", + "emitDeclarationOnly": true, + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/index.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 0, + "emitDeclarationOnly": true, + "configFilePath": "/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/b", + "originalPath": "../b" + }, + { + "path": "/c", + "originalPath": "../c" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.settings.json 2000 undefined Config: /a/tsconfig.json WatchType: Extended config file +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 0, + "emitDeclarationOnly": true, + "configFilePath": "/b/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /c/tsconfig.json : { + "rootNames": [ + "/c/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 0, + "emitDeclarationOnly": true, + "configFilePath": "/c/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "namespace NS {\n export function FB() {}\n}\n\ninterface I {\n FB();\n}\n\nconst ib: I = { FB() {} };" + /c/index.ts Text-1 "namespace NS {\n export function FC() {}\n}\n\ninterface I {\n FC();\n}\n\nconst ic: I = { FC() {} };" + /a/index.ts SVC-1-0 "namespace NS {\n export function FA() {\n FB();\n }\n}\n\ninterface I {\n FA();\n}\n\nconst ia: I = {\n FA() { },\n FB() { },\n FC() { },\n };" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../b/index.ts + Source from referenced project '../b/tsconfig.json' included because '--module' is specified as 'none' + ../c/index.ts + Source from referenced project '../c/tsconfig.json' included because '--module' is specified as 'none' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/index.ts", + "configFile": "/a/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/b/index.ts: *new* + {"pollingInterval":500} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/c/index.ts: *new* + {"pollingInterval":500} +/c/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.settings.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 2, + "offset": 21 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 35 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Loading configured project /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating project possibly referencing default composite project /a/tsconfig.json of open file /a/index.ts" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [], + "options": { + "composite": true, + "configFilePath": "/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/a", + "originalPath": "a" + } + ] +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.d.ts 2000 undefined Project: /a/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "function", + "name": "function NS.FA(): void", + "textSpan": { + "start": 35, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 19, + "length": 42 + } + }, + "references": [ + { + "textSpan": { + "start": 35, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 19, + "length": 42 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: *new* + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 7, + "offset": 11 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 75 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating project for original file: /b/index.ts" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "namespace NS {\n export function FB() {}\n}\n\ninterface I {\n FB();\n}\n\nconst ib: I = { FB() {} };" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /c/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/c/tsconfig.json", + "reason": "Creating project for original file: /c/index.ts" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /c/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /c/index.ts Text-1 "namespace NS {\n export function FC() {}\n}\n\ninterface I {\n FC();\n}\n\nconst ic: I = { FC() {} };" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/c/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 56 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 56 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 56, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 46, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/b/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 75, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 65, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 102, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 8, + "offset": 5 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 83 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 3, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "method", + "name": "(method) I.FA(): any", + "textSpan": { + "start": 83, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 83, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 83, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 83, + "length": 5 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 112, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 112, + "length": 8 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/b/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /b/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/b/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/b/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 2, + "offset": 21 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 35 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 35 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/index.d.ts 2000 undefined Project: /b/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 5, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "function", + "name": "function NS.FB(): void", + "textSpan": { + "start": 35, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FB", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 19, + "length": 23 + } + }, + "references": [ + { + "textSpan": { + "start": 35, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 19, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 50, + "length": 2 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: *new* + {"pollingInterval":2000} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 5, + "offset": 11 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 56 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 56 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 56 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 6, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 56, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 46, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/b/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 75, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 65, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 102, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 6, + "offset": 5 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 64 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 64 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 7, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "method", + "name": "(method) I.FB(): any", + "textSpan": { + "start": 64, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FB", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 64, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 64, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 64, + "length": 5 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 89, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 89, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 126, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 126, + "length": 8 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/c/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /c/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/b/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /c/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/c/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: + {"pollingInterval":2000} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/c/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 2, + "offset": 21 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 35 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 35 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/index.d.ts 2000 undefined Project: /c/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 9, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "function", + "name": "function NS.FC(): void", + "textSpan": { + "start": 35, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FC", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 19, + "length": 23 + } + }, + "references": [ + { + "textSpan": { + "start": 35, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 19, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: + {"pollingInterval":2000} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.d.ts: *new* + {"pollingInterval":2000} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 5, + "offset": 11 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 56 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 56 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 56 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 10, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 56, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 46, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 56, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 46, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 56, + "length": 1 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 46, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 83, + "length": 1 + }, + "fileName": "/b/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 75, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 65, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 102, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 6, + "offset": 5 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 64 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 64 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 11, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "method", + "name": "(method) I.FC(): any", + "textSpan": { + "start": 64, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FC", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 64, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 64, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 64, + "length": 5 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 89, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 89, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 140, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 140, + "length": 8 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossModuleProjects.js b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossModuleProjects.js new file mode 100644 index 00000000000..f9cfcb23de6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossModuleProjects.js @@ -0,0 +1,2817 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/index.ts] +import { NS } from "../b"; +import { I } from "../c"; + +declare module "../b" { + export namespace NS { + export function FA(); + } +} + +declare module "../c" { + export interface I { + FA(); + } +} + +const ia: I = { + FA: NS.FA, + FC() { }, +}; + +//// [/a/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "references": [ + { "path": "../b" }, + { "path": "../c" }, + ], + "files": [ + "index.ts", + ], +} + +//// [/a2/index.ts] +import { NS } from "../b"; +import { I } from "../c"; + +declare module "../b" { + export namespace NS { + export function FA(); + } +} + +declare module "../c" { + export interface I { + FA(); + } +} + +const ia: I = { + FA: NS.FA, + FC() { }, +}; + +//// [/a2/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "references": [ + { "path": "../b" }, + { "path": "../c" }, + ], + "files": [ + "index.ts", + ], +} + +//// [/b/index.ts] +export namespace NS { + export function FB() {} +} + +export interface I { + FB(); +} + +const ib: I = { FB() {} }; + +//// [/b/other.ts] +export const Other = 1; + +//// [/b/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "files": [ + "index.ts", + "other.ts", + ], +} + +//// [/c/index.ts] +export namespace NS { + export function FC() {} +} + +export interface I { + FC(); +} + +const ic: I = { FC() {} }; + +//// [/c/tsconfig.json] +{ + "extends": "../tsconfig.settings.json", + "files": [ + "index.ts", + ], +} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + }, + "references": [ + { "path": "a" }, + { "path": "a2" }, + ], + "files": [] +} + +//// [/tsconfig.settings.json] +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": "CommonJS", + "emitDeclarationOnly": true, + } +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/index.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 1, + "emitDeclarationOnly": true, + "configFilePath": "/a/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/b", + "originalPath": "../b" + }, + { + "path": "/c", + "originalPath": "../c" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.settings.json 2000 undefined Config: /a/tsconfig.json WatchType: Extended config file +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/index.ts", + "/b/other.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 1, + "emitDeclarationOnly": true, + "configFilePath": "/b/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Config: /c/tsconfig.json : { + "rootNames": [ + "/c/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 1, + "emitDeclarationOnly": true, + "configFilePath": "/c/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "export namespace NS {\n export function FB() {}\n}\n\nexport interface I {\n FB();\n}\n\nconst ib: I = { FB() {} };" + /c/index.ts Text-1 "export namespace NS {\n export function FC() {}\n}\n\nexport interface I {\n FC();\n}\n\nconst ic: I = { FC() {} };" + /a/index.ts SVC-1-0 "import { NS } from \"../b\";\nimport { I } from \"../c\";\n\ndeclare module \"../b\" {\n export namespace NS {\n export function FA();\n }\n}\n\ndeclare module \"../c\" {\n export interface I {\n FA();\n }\n}\n\nconst ia: I = {\n FA: NS.FA,\n FC() { },\n};" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../b/index.ts + Imported via "../b" from file 'index.ts' + ../c/index.ts + Imported via "../c" from file 'index.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/index.ts", + "configFile": "/a/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/b/index.ts: *new* + {"pollingInterval":500} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/c/index.ts: *new* + {"pollingInterval":500} +/c/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} +/tsconfig.settings.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 6, + "offset": 25 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 128 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Loading configured project /tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating project possibly referencing default composite project /a/tsconfig.json of open file /a/index.ts" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [], + "options": { + "composite": true, + "configFilePath": "/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/a", + "originalPath": "a" + }, + { + "path": "/a2", + "originalPath": "a2" + } + ] +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Config: /a2/tsconfig.json : { + "rootNames": [ + "/a2/index.ts" + ], + "options": { + "composite": true, + "skipLibCheck": true, + "declarationMap": true, + "module": 1, + "emitDeclarationOnly": true, + "configFilePath": "/a2/tsconfig.json" + }, + "projectReferences": [ + { + "path": "/b", + "originalPath": "../b" + }, + { + "path": "/c", + "originalPath": "../c" + } + ] +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a2/tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/index.d.ts 2000 undefined Project: /a/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "function", + "name": "function NS.FA(): any", + "textSpan": { + "start": 128, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 112, + "length": 21 + } + }, + "references": [ + { + "textSpan": { + "start": 128, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 112, + "length": 21 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 242, + "length": 2 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: *new* + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/tsconfig.json: *new* + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 11, + "offset": 22 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 188 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /c/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/c/tsconfig.json", + "reason": "Creating project for original file: /c/index.ts" + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /c/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /c/index.ts Text-1 "export namespace NS {\n export function FC() {}\n}\n\nexport interface I {\n FC();\n}\n\nconst ic: I = { FC() {} };" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/c/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a2/tsconfig.json", + "reason": "Creating project referenced by : /tsconfig.json as it references project /c/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a2/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a2/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "export namespace NS {\n export function FB() {}\n}\n\nexport interface I {\n FB();\n}\n\nconst ib: I = { FB() {} };" + /c/index.ts Text-1 "export namespace NS {\n export function FC() {}\n}\n\nexport interface I {\n FC();\n}\n\nconst ic: I = { FC() {} };" + /a2/index.ts Text-1 "import { NS } from \"../b\";\nimport { I } from \"../c\";\n\ndeclare module \"../b\" {\n export namespace NS {\n export function FA();\n }\n}\n\ndeclare module \"../c\" {\n export interface I {\n FA();\n }\n}\n\nconst ia: I = {\n FA: NS.FA,\n FC() { },\n};" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../b/index.ts + Imported via "../b" from file 'index.ts' + ../c/index.ts + Imported via "../c" from file 'index.ts' + index.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a2/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 70, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 53, + "length": 32 + } + }, + "references": [ + { + "textSpan": { + "start": 70, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 53, + "length": 32 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 97, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a2/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a2/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.ts: *new* + {"pollingInterval":500} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/a/index.ts", + "line": 12, + "offset": 9 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/index.ts position 200 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 3, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "method", + "name": "(method) I.FA(): any", + "textSpan": { + "start": 200, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 200, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 200, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 200, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 235, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 235, + "length": 9 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/a2/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a2/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /a2 +Info seq [hh:mm:ss:mss] For info: /a2/index.ts :: Config file name: /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /a2 +Info seq [hh:mm:ss:mss] For info: /a2/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /a2/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a2/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/a2/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/a2/index.ts", + "line": 6, + "offset": 25 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a2/index.ts position 128 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a2/index.d.ts 2000 undefined Project: /a2/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 5, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a2/index.ts", + "kind": "function", + "name": "function NS.FA(): any", + "textSpan": { + "start": 128, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 112, + "length": 21 + } + }, + "references": [ + { + "textSpan": { + "start": 128, + "length": 2 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 112, + "length": 21 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 242, + "length": 2 + }, + "fileName": "/a2/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.d.ts: *new* + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/a2/index.ts", + "line": 11, + "offset": 22 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a2/index.ts position 188 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 6, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 70, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 53, + "length": 32 + } + }, + "references": [ + { + "textSpan": { + "start": 70, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 53, + "length": 32 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 97, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a2/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a2/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/a2/index.ts", + "line": 12, + "offset": 9 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a2/index.ts position 200 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 7, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a2/index.ts", + "kind": "method", + "name": "(method) I.FA(): any", + "textSpan": { + "start": 200, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FA", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 200, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 200, + "length": 2 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 200, + "length": 5 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 235, + "length": 2 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 235, + "length": 9 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/b/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /b/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating possible configured project for /b/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/other.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/index.ts Text-1 "export namespace NS {\n export function FB() {}\n}\n\nexport interface I {\n FB();\n}\n\nconst ib: I = { FB() {} };" + /b/other.ts Text-1 "export const Other = 1;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Part of 'files' list in tsconfig.json + other.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/b/index.ts", + "configFile": "/b/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /a2/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a2/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/a2/tsconfig.json,/b/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.d.ts: + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/other.ts: *new* + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/b/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 2, + "offset": 21 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 42 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 42 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 42 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/index.d.ts 2000 undefined Project: /b/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 9, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "function", + "name": "function NS.FB(): void", + "textSpan": { + "start": 42, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FB", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 26, + "length": 23 + } + }, + "references": [ + { + "textSpan": { + "start": 42, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 26, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.d.ts: + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: *new* + {"pollingInterval":2000} +/b/other.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.ts: + {"pollingInterval":500} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 5, + "offset": 18 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 70 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 70 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 70 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 10, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 70, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 53, + "length": 32 + } + }, + "references": [ + { + "textSpan": { + "start": 70, + "length": 1 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 53, + "length": 32 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 97, + "length": 1 + }, + "fileName": "/b/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/b/index.ts", + "line": 6, + "offset": 5 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 78 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 78 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/index.ts position 78 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/index.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 11, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/b/index.ts", + "kind": "method", + "name": "(method) I.FB(): any", + "textSpan": { + "start": 78, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FB", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 78, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 78, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 78, + "length": 5 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 103, + "length": 2 + }, + "fileName": "/b/index.ts", + "contextSpan": { + "start": 103, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/c/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /c/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: No config files found. +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/c/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a2/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /a2/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a2/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/a2/tsconfig.json,/b/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /c/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/c/tsconfig.json,/a2/tsconfig.json +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.d.ts: + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: + {"pollingInterval":2000} +/b/other.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/c/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 2, + "offset": 21 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 42 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 42 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 42 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /c/index.d.ts 2000 undefined Project: /c/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 13, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "function", + "name": "function NS.FC(): void", + "textSpan": { + "start": 42, + "length": 2 + }, + "displayParts": [ + { + "text": "function", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "NS", + "kind": "moduleName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FC", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 26, + "length": 23 + } + }, + "references": [ + { + "textSpan": { + "start": 42, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 26, + "length": 23 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + } + ] + } +After Request +watchedFiles:: +/a/index.d.ts: + {"pollingInterval":2000} +/a/tsconfig.json: + {"pollingInterval":2000} +/a2/index.d.ts: + {"pollingInterval":2000} +/a2/tsconfig.json: + {"pollingInterval":2000} +/b/index.d.ts: + {"pollingInterval":2000} +/b/other.ts: + {"pollingInterval":500} +/b/tsconfig.json: + {"pollingInterval":2000} +/c/index.d.ts: *new* + {"pollingInterval":2000} +/c/tsconfig.json: + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} +/tsconfig.settings.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 5, + "offset": 18 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 70 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 14, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "interface", + "name": "interface I", + "textSpan": { + "start": 70, + "length": 1 + }, + "displayParts": [ + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + } + ], + "contextSpan": { + "start": 53, + "length": 32 + } + }, + "references": [ + { + "textSpan": { + "start": 70, + "length": 1 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 53, + "length": 32 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 97, + "length": 1 + }, + "fileName": "/c/index.ts", + "isWriteAccess": false, + "isDefinition": false + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + }, + { + "textSpan": { + "start": 188, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 171, + "length": 40 + }, + "isWriteAccess": true, + "isDefinition": true + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + }, + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a2/index.ts", + "kind": "alias", + "name": "(alias) interface I\nimport I", + "textSpan": { + "start": 36, + "length": 1 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "alias", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "interface", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "import", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "aliasName" + } + ], + "contextSpan": { + "start": 27, + "length": 25 + } + }, + "references": [ + { + "textSpan": { + "start": 36, + "length": 1 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 27, + "length": 25 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 225, + "length": 1 + }, + "fileName": "/a2/index.ts", + "isWriteAccess": false, + "isDefinition": false + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/c/index.ts", + "line": 6, + "offset": 5 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 78 in project /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 78 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /c/index.ts position 78 in project /a2/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] Search path: /c +Info seq [hh:mm:ss:mss] For info: /c/index.ts :: Config file name: /c/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 15, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/c/index.ts", + "kind": "method", + "name": "(method) I.FC(): any", + "textSpan": { + "start": 78, + "length": 2 + }, + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "I", + "kind": "interfaceName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "FC", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "contextSpan": { + "start": 78, + "length": 5 + } + }, + "references": [ + { + "textSpan": { + "start": 78, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 78, + "length": 5 + }, + "isWriteAccess": false, + "isDefinition": true + }, + { + "textSpan": { + "start": 103, + "length": 2 + }, + "fileName": "/c/index.ts", + "contextSpan": { + "start": 103, + "length": 7 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 250, + "length": 2 + }, + "fileName": "/a/index.ts", + "contextSpan": { + "start": 250, + "length": 8 + }, + "isWriteAccess": true, + "isDefinition": false + }, + { + "textSpan": { + "start": 250, + "length": 2 + }, + "fileName": "/a2/index.ts", + "contextSpan": { + "start": 250, + "length": 8 + }, + "isWriteAccess": true, + "isDefinition": false + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTag.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTag.js new file mode 100644 index 00000000000..5c8ae50abaa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTag.js @@ -0,0 +1,256 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCallbackTag.js] +/** + * @callback FooHandler - A kind of magic + * @param {string} eventName - So many words + * @param eventName2 {number | string} - Silence is golden + * @param eventName3 - Osterreich mos def + * @return {number} - DIVEKICK + */ +/** + * @type {FooHandler} callback + */ +var t; + +/** + * @callback FooHandler2 - What, another one? + * @param {string=} eventName - it keeps happening + * @param {string} [eventName2] - i WARNED you dog + */ +/** + * @type {FooHandler2} callback + */ +var t2; +t("!", 12, false); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCallbackTag.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCallbackTag.js SVC-1-0 "/**\n * @callback FooHandler - A kind of magic\n * @param {string} eventName - So many words\n * @param eventName2 {number | string} - Silence is golden\n * @param eventName3 - Osterreich mos def\n * @return {number} - DIVEKICK\n */\n/**\n * @type {FooHandler} callback\n */\nvar t;\n\n/**\n * @callback FooHandler2 - What, another one?\n * @param {string=} eventName - it keeps happening\n * @param {string} [eventName2] - i WARNED you dog\n */\n/**\n * @type {FooHandler2} callback\n */\nvar t2;\nt(\"!\", 12, false);" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCallbackTag.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCallbackTag.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 11, + "offset": 6 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 1, + "success": true, + "body": { + "kind": "var", + "kindModifiers": "", + "start": { + "line": 11, + "offset": 5 + }, + "end": { + "line": 11, + "offset": 6 + }, + "displayString": "var t: FooHandler", + "documentation": "", + "tags": [ + { + "name": "type", + "text": "{FooHandler} callback" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 21, + "offset": 7 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 2, + "success": true, + "body": { + "kind": "var", + "kindModifiers": "", + "start": { + "line": 21, + "offset": 5 + }, + "end": { + "line": 21, + "offset": 7 + }, + "displayString": "var t2: FooHandler2", + "documentation": "", + "tags": [ + { + "name": "type", + "text": "{FooHandler2} callback" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 19, + "offset": 15 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 3, + "success": true, + "body": { + "kind": "type", + "kindModifiers": "", + "start": { + "line": 19, + "offset": 11 + }, + "end": { + "line": 19, + "offset": 22 + }, + "displayString": "type FooHandler2 = (eventName?: string | undefined, eventName2?: string) => any", + "documentation": "- What, another one?", + "tags": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 9, + "offset": 16 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 4, + "success": true, + "body": { + "kind": "type", + "kindModifiers": "", + "start": { + "line": 9, + "offset": 11 + }, + "end": { + "line": 9, + "offset": 21 + }, + "displayString": "type FooHandler = (eventName: string, eventName2: number | string, eventName3: any) => number", + "documentation": "- A kind of magic", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagNavigateTo.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagNavigateTo.js new file mode 100644 index 00000000000..a09dff619e1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagNavigateTo.js @@ -0,0 +1,190 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocCallback.js] +/** + * @callback FooCallback + * @param {string} eventName - What even is the navigation bar? + */ +/** @type {FooCallback} */ +var t; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocCallback.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocCallback.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocCallback.js SVC-1-0 "/**\n * @callback FooCallback\n * @param {string} eventName - What even is the navigation bar?\n */\n/** @type {FooCallback} */\nvar t;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocCallback.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocCallback.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocCallback.js" + }, + "command": "navbar" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navbar", + "request_seq": 1, + "success": true, + "body": [ + { + "text": "", + "kind": "script", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 6, + "offset": 7 + } + } + ], + "childItems": [ + { + "text": "FooCallback", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 4 + }, + "end": { + "line": 4, + "offset": 2 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "t", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 6 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 0 + }, + { + "text": "FooCallback", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 4 + }, + "end": { + "line": 4, + "offset": 2 + } + } + ], + "childItems": [], + "indent": 1 + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagRename01.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagRename01.js new file mode 100644 index 00000000000..cf06eb59db3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagRename01.js @@ -0,0 +1,208 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocCallback.js] + +/** + * @callback FooCallback + * @param {string} eventName - Rename should work + */ + +/** @type {FooCallback} */ +var t; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocCallback.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocCallback.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocCallback.js SVC-1-0 "\n/**\n * @callback FooCallback\n * @param {string} eventName - Rename should work\n */\n\n/** @type {FooCallback} */\nvar t;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocCallback.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocCallback.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocCallback.js", + "line": 3, + "offset": 14, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 2, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "FooCallback", + "fullDisplayName": "FooCallback", + "kind": "type", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 3, + "offset": 14 + }, + "end": { + "line": 3, + "offset": 25 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocCallback.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 14 + }, + "end": { + "line": 3, + "offset": 25 + }, + "contextStart": { + "line": 3, + "offset": 4 + }, + "contextEnd": { + "line": 5, + "offset": 2 + } + }, + { + "start": { + "line": 7, + "offset": 12 + }, + "end": { + "line": 7, + "offset": 23 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocParamTagSpecialKeywords.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocParamTagSpecialKeywords.js new file mode 100644 index 00000000000..27b8c015e72 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocParamTagSpecialKeywords.js @@ -0,0 +1,282 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/test.js] +/** + * @param {string} type + */ +function test(type) { + type. +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test.js SVC-1-0 "/**\n * @param {string} type\n */\nfunction test(type) {\n type.\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + test.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test.js", + "line": 5, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "test", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "type", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag.js new file mode 100644 index 00000000000..a5bd2311869 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag.js @@ -0,0 +1,3021 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCompletion_typedef.js] +/** @typedef {(string | number)} NumberLike */ + +/** + * @typedef Animal - think Giraffes + * @type {Object} + * @property {string} animalName + * @property {number} animalAge + */ + +/** + * @typedef {Object} Person + * @property {string} personName + * @property {number} personAge + */ + +/** + * @typedef {Object} + * @property {string} catName + * @property {number} catAge + */ +var Cat; + +/** @typedef {{ dogName: string, dogAge: number }} */ +var Dog; + +/** @type {NumberLike} */ +var numberLike; numberLike. + +/** @type {Person} */ +var p;p.; +p.personName.; +p.personAge.; + +/** @type {Animal} */ +var a;a.; +a.animalName.; +a.animalAge.; + +/** @type {Cat} */ +var c;c.; +c.catName.; +c.catAge.; + +/** @type {Dog} */ +var d;d.; +d.dogName.; +d.dogAge.; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCompletion_typedef.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCompletion_typedef.js SVC-1-0 "/** @typedef {(string | number)} NumberLike */\n\n/**\n * @typedef Animal - think Giraffes\n * @type {Object}\n * @property {string} animalName\n * @property {number} animalAge\n */\n\n/**\n * @typedef {Object} Person\n * @property {string} personName\n * @property {number} personAge\n */\n\n/**\n * @typedef {Object}\n * @property {string} catName\n * @property {number} catAge\n */\nvar Cat;\n\n/** @typedef {{ dogName: string, dogAge: number }} */\nvar Dog;\n\n/** @type {NumberLike} */\nvar numberLike; numberLike.\n\n/** @type {Person} */\nvar p;p.;\np.personName.;\np.personAge.;\n\n/** @type {Animal} */\nvar a;a.;\na.animalName.;\na.animalAge.;\n\n/** @type {Cat} */\nvar c;c.;\nc.catName.;\nc.catAge.;\n\n/** @type {Dog} */\nvar d;d.;\nd.dogName.;\nd.dogAge.;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCompletion_typedef.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCompletion_typedef.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 27, + "offset": 28 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 30, + "offset": 9 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "personAge", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "personName", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 31, + "offset": 14 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 32, + "offset": 13 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 8, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 9, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 35, + "offset": 9 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 10, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "animalAge", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "animalName", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 11, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 36, + "offset": 14 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 12, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 13, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 37, + "offset": 13 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 14, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 15, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 45, + "offset": 9 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 16, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "dogAge", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "dogName", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 17, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 46, + "offset": 11 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 18, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 19, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 47, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 20, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 21, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 40, + "offset": 9 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 22, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "catAge", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "catName", + "kind": "property", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 23, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 41, + "offset": 11 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 24, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 25, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 42, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 26, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Animal", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "animalName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "c", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Cat", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "catName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "d", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Dog", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "dogName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "numberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "p", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Person", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personAge", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "personName", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 34, + "offset": 12 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 27, + "success": true, + "body": { + "kind": "type", + "kindModifiers": "", + "start": { + "line": 34, + "offset": 12 + }, + "end": { + "line": 34, + "offset": 18 + }, + "displayString": "type Animal = {\n animalName: string;\n animalAge: number;\n}", + "documentation": "- think Giraffes", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag1.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag1.js new file mode 100644 index 00000000000..133f959e5c3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag1.js @@ -0,0 +1,305 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCompletion_typedef.js] +/** + * @typedef {Object} MyType + * @property {string} yes + */ +function foo() { } +/** + * @param {MyType} my + */ +function a(my) { + my.yes. +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCompletion_typedef.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCompletion_typedef.js SVC-1-0 "/**\n * @typedef {Object} MyType\n * @property {string} yes\n */\nfunction foo() { }\n/**\n * @param {MyType} my\n */\nfunction a(my) {\n my.yes.\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCompletion_typedef.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCompletion_typedef.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 10, + "offset": 12 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "foo", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "my", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "MyType", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "yes", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag2.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag2.js new file mode 100644 index 00000000000..961e3115680 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag2.js @@ -0,0 +1,427 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCompletion_typedef.js] +/** + * @typedef {Object} A.B.MyType + * @property {string} yes + */ +function foo() {} +/** + * @param {A.B.MyType} my2 + */ +function a(my2) { + my2.yes. +} +/** + * @param {MyType} my2 + */ +function b(my2) { + my2.yes. +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCompletion_typedef.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCompletion_typedef.js SVC-1-0 "/**\n * @typedef {Object} A.B.MyType\n * @property {string} yes\n */\nfunction foo() {}\n/**\n * @param {A.B.MyType} my2\n */\nfunction a(my2) {\n my2.yes.\n}\n/**\n * @param {MyType} my2\n */\nfunction b(my2) {\n my2.yes.\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCompletion_typedef.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCompletion_typedef.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 10, + "offset": 13 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "A", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "b", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "B", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "foo", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "my2", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "MyType", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "yes", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 16, + "offset": 13 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "a", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "A", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "b", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "B", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "foo", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "my2", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "MyType", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "yes", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagGoToDefinition.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagGoToDefinition.js new file mode 100644 index 00000000000..3288a859fe1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagGoToDefinition.js @@ -0,0 +1,207 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCompletion_typedef.js] +/** + * @typedef {Object} Person + * @property {string} personName + * @property {number} personAge + */ + +/** + * @typedef {{ animalName: string, animalAge: number }} Animal + */ + +/** @type {Person} */ +var person; person.personName + +/** @type {Animal} */ +var animal; animal.animalName + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCompletion_typedef.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCompletion_typedef.js SVC-1-0 "/**\n * @typedef {Object} Person\n * @property {string} personName\n * @property {number} personAge\n */\n\n/**\n * @typedef {{ animalName: string, animalAge: number }} Animal\n */\n\n/** @type {Person} */\nvar person; person.personName\n\n/** @type {Animal} */\nvar animal; animal.animalName" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCompletion_typedef.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCompletion_typedef.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 12, + "offset": 30 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 1, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "start": { + "line": 3, + "offset": 23 + }, + "end": { + "line": 3, + "offset": 33 + }, + "contextStart": { + "line": 3, + "offset": 4 + }, + "contextEnd": { + "line": 4, + "offset": 4 + } + } + ], + "textSpan": { + "start": { + "line": 12, + "offset": 20 + }, + "end": { + "line": 12, + "offset": 30 + } + } + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 15, + "offset": 30 + }, + "command": "definitionAndBoundSpan" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "definitionAndBoundSpan", + "request_seq": 2, + "success": true, + "body": { + "definitions": [ + { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "start": { + "line": 8, + "offset": 16 + }, + "end": { + "line": 8, + "offset": 26 + }, + "contextStart": { + "line": 8, + "offset": 16 + }, + "contextEnd": { + "line": 8, + "offset": 35 + } + } + ], + "textSpan": { + "start": { + "line": 15, + "offset": 20 + }, + "end": { + "line": 15, + "offset": 30 + } + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNamespace.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNamespace.js new file mode 100644 index 00000000000..c13e6f0a3e6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNamespace.js @@ -0,0 +1,843 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCompletion_typedef.js] +/** + * @typedef {string | number} T.NumberLike + * @typedef {{age: number}} T.People + * @typedef {string | number} T.O.Q.NumberLike + * @type {T.NumberLike} + */ +var x; x.; +/** @type {T.O.Q.NumberLike} */ +var x1; x1.; +/** @type {T.People} */ +var x1; x1.; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCompletion_typedef.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCompletion_typedef.js SVC-1-0 "/**\n * @typedef {string | number} T.NumberLike\n * @typedef {{age: number}} T.People\n * @typedef {string | number} T.O.Q.NumberLike\n * @type {T.NumberLike}\n */\nvar x; x.;\n/** @type {T.O.Q.NumberLike} */\nvar x1; x1.;\n/** @type {T.People} */\nvar x1; x1.;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCompletion_typedef.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCompletion_typedef.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 7, + "offset": 10 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "age", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "O", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "People", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Q", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "T", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x1", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 11, + "offset": 12 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "age", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "O", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "People", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Q", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "T", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x1", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCompletion_typedef.js", + "line": 9, + "offset": 12 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 6, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "age", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "NumberLike", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "O", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "People", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "Q", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "T", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "x1", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "z11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNavigateTo.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNavigateTo.js new file mode 100644 index 00000000000..c4a21c051d4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNavigateTo.js @@ -0,0 +1,392 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocTypedef_form2.js] + +/** @typedef {(string | number)} NumberLike */ +/** @typedef {(string | number | string[])} */ +var NumberLike2; + +/** @type {NumberLike} */ +var numberLike; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocTypedef_form2.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form2.js SVC-1-0 "\n/** @typedef {(string | number)} NumberLike */\n/** @typedef {(string | number | string[])} */\nvar NumberLike2;\n\n/** @type {NumberLike} */\nvar numberLike;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocTypedef_form2.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form2.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js" + }, + "command": "navtree" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navtree", + "request_seq": 1, + "success": true, + "body": { + "text": "", + "kind": "script", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 16 + } + } + ], + "childItems": [ + { + "text": "numberLike", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 15 + } + } + ], + "nameSpan": { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 15 + } + } + }, + { + "text": "NumberLike", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 44 + } + } + ], + "nameSpan": { + "start": { + "line": 2, + "offset": 34 + }, + "end": { + "line": 2, + "offset": 44 + } + } + }, + { + "text": "NumberLike2", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 16 + } + } + ], + "nameSpan": { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 16 + } + } + }, + { + "text": "NumberLike2", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 44 + } + } + ], + "nameSpan": { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 16 + } + } + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js" + }, + "command": "navbar" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navbar", + "request_seq": 2, + "success": true, + "body": [ + { + "text": "", + "kind": "script", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 7, + "offset": 16 + } + } + ], + "childItems": [ + { + "text": "numberLike", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 15 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "NumberLike", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 44 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "NumberLike2", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 16 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "NumberLike2", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 44 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 0 + }, + { + "text": "NumberLike", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 44 + } + } + ], + "childItems": [], + "indent": 1 + }, + { + "text": "NumberLike2", + "kind": "type", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 44 + } + } + ], + "childItems": [], + "indent": 1 + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename01.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename01.js new file mode 100644 index 00000000000..29d43c3173d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename01.js @@ -0,0 +1,462 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocTypedef_form1.js] + +/** @typedef {(string | number)} */ +var NumberLike; + +NumberLike = 10; + +/** @type {NumberLike} */ +var numberLike; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocTypedef_form1.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form1.js SVC-1-0 "\n/** @typedef {(string | number)} */\nvar NumberLike;\n\nNumberLike = 10;\n\n/** @type {NumberLike} */\nvar numberLike;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocTypedef_form1.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form1.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "line": 3, + "offset": 5, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 2, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "NumberLike", + "fullDisplayName": "NumberLike", + "kind": "var", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 16 + } + }, + { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 5, + "offset": 11 + } + }, + { + "start": { + "line": 7, + "offset": 12 + }, + "end": { + "line": 7, + "offset": 22 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "line": 5, + "offset": 1, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 5, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "NumberLike", + "fullDisplayName": "NumberLike", + "kind": "var", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 5, + "offset": 11 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 16 + } + }, + { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 5, + "offset": 11 + } + }, + { + "start": { + "line": 7, + "offset": 12 + }, + "end": { + "line": 7, + "offset": 22 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 6, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "line": 7, + "offset": 12, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 8, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "NumberLike", + "fullDisplayName": "NumberLike", + "kind": "var", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 7, + "offset": 12 + }, + "end": { + "line": 7, + "offset": 22 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form1.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 15 + }, + "contextStart": { + "line": 3, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 16 + } + }, + { + "start": { + "line": 5, + "offset": 1 + }, + "end": { + "line": 5, + "offset": 11 + } + }, + { + "start": { + "line": 7, + "offset": 12 + }, + "end": { + "line": 7, + "offset": 22 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 9, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename02.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename02.js new file mode 100644 index 00000000000..18cb2171db8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename02.js @@ -0,0 +1,317 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocTypedef_form2.js] + +/** @typedef {(string | number)} NumberLike */ + +/** @type {NumberLike} */ +var numberLike; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocTypedef_form2.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form2.js SVC-1-0 "\n/** @typedef {(string | number)} NumberLike */\n\n/** @type {NumberLike} */\nvar numberLike;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocTypedef_form2.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form2.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 2, + "offset": 34, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 2, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "NumberLike", + "fullDisplayName": "NumberLike", + "kind": "type", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 2, + "offset": 34 + }, + "end": { + "line": 2, + "offset": 44 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "locs": [ + { + "start": { + "line": 2, + "offset": 34 + }, + "end": { + "line": 2, + "offset": 44 + }, + "contextStart": { + "line": 2, + "offset": 5 + }, + "contextEnd": { + "line": 2, + "offset": 44 + } + }, + { + "start": { + "line": 4, + "offset": 12 + }, + "end": { + "line": 4, + "offset": 22 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 4, + "offset": 12, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 5, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "NumberLike", + "fullDisplayName": "NumberLike", + "kind": "type", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 4, + "offset": 12 + }, + "end": { + "line": 4, + "offset": 22 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "locs": [ + { + "start": { + "line": 2, + "offset": 34 + }, + "end": { + "line": 2, + "offset": 44 + }, + "contextStart": { + "line": 2, + "offset": 5 + }, + "contextEnd": { + "line": 2, + "offset": 44 + } + }, + { + "start": { + "line": 4, + "offset": 12 + }, + "end": { + "line": 4, + "offset": 22 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 6, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename03.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename03.js new file mode 100644 index 00000000000..7b733768157 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename03.js @@ -0,0 +1,338 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocTypedef_form3.js] + +/** + * @typedef Person + * @type {Object} + * @property {number} age + * @property {string} name + */ + +/** @type {Person} */ +var person; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocTypedef_form3.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form3.js SVC-1-0 "\n/**\n * @typedef Person\n * @type {Object}\n * @property {number} age\n * @property {string} name\n */\n\n/** @type {Person} */\nvar person;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocTypedef_form3.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form3.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form3.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js", + "line": 3, + "offset": 13, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 3, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "Person", + "fullDisplayName": "Person", + "kind": "type", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 3, + "offset": 13 + }, + "end": { + "line": 3, + "offset": 19 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 13 + }, + "end": { + "line": 3, + "offset": 19 + }, + "contextStart": { + "line": 3, + "offset": 4 + }, + "contextEnd": { + "line": 7, + "offset": 2 + } + }, + { + "start": { + "line": 9, + "offset": 12 + }, + "end": { + "line": 9, + "offset": 18 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js", + "line": 9, + "offset": 12, + "findInStrings": false, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 6, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "Person", + "fullDisplayName": "Person", + "kind": "type", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 9, + "offset": 12 + }, + "end": { + "line": 9, + "offset": 18 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form3.js", + "locs": [ + { + "start": { + "line": 3, + "offset": 13 + }, + "end": { + "line": 3, + "offset": 19 + }, + "contextStart": { + "line": 3, + "offset": 4 + }, + "contextEnd": { + "line": 7, + "offset": 2 + } + }, + { + "start": { + "line": 9, + "offset": 12 + }, + "end": { + "line": 9, + "offset": 18 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 7, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename04.js b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename04.js new file mode 100644 index 00000000000..c11150f9766 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename04.js @@ -0,0 +1,311 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsDocTypedef_form2.js] + +function test1() { + /** @typedef {(string | number)} NumberLike */ + + /** @type {NumberLike} */ + var numberLike; +} +function test2() { + /** @typedef {(string | number)} NumberLike2 */ + + /** @type {NumberLike2} */ + var numberLike2; +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsDocTypedef_form2.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form2.js SVC-1-0 "\nfunction test1() {\n /** @typedef {(string | number)} NumberLike */\n\n /** @type {NumberLike} */\n var numberLike;\n}\nfunction test2() {\n /** @typedef {(string | number)} NumberLike2 */\n\n /** @type {NumberLike2} */\n var numberLike2;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsDocTypedef_form2.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsDocTypedef_form2.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 12, + "offset": 9 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 1, + "success": true, + "body": { + "kind": "local var", + "kindModifiers": "", + "start": { + "line": 12, + "offset": 8 + }, + "end": { + "line": 12, + "offset": 19 + }, + "displayString": "(local var) numberLike2: NumberLike2", + "documentation": "", + "tags": [ + { + "name": "type", + "text": "{NumberLike2}" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 15, + "endLine": 5, + "endOffset": 15, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 15, + "endLine": 5, + "endOffset": 15, + "insertString": "1" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 16, + "key": "1" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 4, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 16, + "endLine": 5, + "endOffset": 16, + "insertString": "1" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 17, + "key": "1" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 17, + "endLine": 5, + "endOffset": 17, + "insertString": "1" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 5, + "offset": 18, + "key": "1" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsDocTypedef_form2.js", + "line": 12, + "offset": 9 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsDocTypedef_form2.js SVC-1-4 "\nfunction test1() {\n /** @typedef {(string | number)} NumberLike */\n\n /** @type {111NumberLike} */\n var numberLike;\n}\nfunction test2() {\n /** @typedef {(string | number)} NumberLike2 */\n\n /** @type {NumberLike2} */\n var numberLike2;\n}" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 9, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "kind": "local var", + "kindModifiers": "", + "start": { + "line": 12, + "offset": 8 + }, + "end": { + "line": 12, + "offset": 19 + }, + "displayString": "(local var) numberLike2: NumberLike2", + "documentation": "", + "tags": [ + { + "name": "type", + "text": "{NumberLike2}" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/moveToFile_emptyTargetFile.js b/tests/baselines/reference/tsserver/fourslashServer/moveToFile_emptyTargetFile.js new file mode 100644 index 00000000000..ade05d87033 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/moveToFile_emptyTargetFile.js @@ -0,0 +1,386 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/source.ts] +export const a = 1; +const b = 2; +console.log(a, b); + +//// [/target.ts] +/** empty */ + +//// [/tsconfig.json] +/ { "compilerOptions": { "newLine": "lf" } } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/source.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /source.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /source.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/source.ts", + "/target.ts" + ], + "options": { + "newLine": 1, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /target.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib.d.ts Text-1 lib.d.ts-Text + /source.ts SVC-1-0 "export const a = 1;\nconst b = 2;\nconsole.log(a, b);" + /target.ts Text-1 "/** empty */" + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + source.ts + Matched by default include pattern '**/*' + target.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/source.ts", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 2 + }, + "text": "'{' expected.", + "code": 1005, + "category": "error", + "fileName": "/tsconfig.json" + }, + { + "start": { + "line": 1, + "offset": 3 + }, + "end": { + "line": 1, + "offset": 4 + }, + "text": "Property assignment expected.", + "code": 1136, + "category": "error", + "fileName": "/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /source.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/target.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "allowTextChangesInNewFiles": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/source.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 20, + "triggerReason": "implicit", + "includeInteractiveActions": true + }, + "command": "getApplicableRefactors" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getApplicableRefactors", + "request_seq": 2, + "success": true, + "body": [ + { + "name": "Convert export", + "description": "Convert named export to default export", + "actions": [ + { + "name": "Convert named export to default export", + "description": "Convert named export to default export", + "kind": "refactor.rewrite.export.default" + } + ] + }, + { + "name": "Move to a new file", + "description": "Move to a new file", + "actions": [ + { + "name": "Move to a new file", + "description": "Move to a new file", + "kind": "refactor.move.newFile" + } + ] + }, + { + "name": "Move to file", + "description": "Move to file", + "actions": [ + { + "name": "Move to file", + "description": "Move to file", + "kind": "refactor.move.file" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract function", + "actions": [ + { + "description": "Extract to function in module scope", + "name": "function_scope_0", + "kind": "refactor.extract.function" + } + ] + }, + { + "name": "Extract Symbol", + "description": "Extract constant", + "actions": [ + { + "description": "Extract to constant in enclosing scope", + "name": "constant_scope_0", + "kind": "refactor.extract.constant" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/source.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 20, + "refactor": "Move to file", + "action": "Move to file", + "interactiveRefactorArguments": { + "targetFile": "/target.ts" + } + }, + "command": "getEditsForRefactor" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getEditsForRefactor", + "request_seq": 5, + "success": true, + "body": { + "edits": [ + { + "fileName": "/source.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 1, + "offset": 1 + }, + "newText": "import { a } from \"./target\";\n\n" + }, + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 1 + }, + "newText": "" + } + ] + }, + { + "fileName": "/target.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 14 + }, + "newText": "\nexport const a = 1;\n" + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 6, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/navbar01.js b/tests/baselines/reference/tsserver/fourslashServer/navbar01.js new file mode 100644 index 00000000000..9751b3d7e26 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/navbar01.js @@ -0,0 +1,1260 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/navbar01.ts] +// Interface +interface IPoint { + getDist(): number; + new(): IPoint; + (): any; + [x:string]: number; + prop: string; +} + +/// Module +module Shapes { + // Class + export class Point implements IPoint { + constructor (public x: number, public y: number) { } + + // Instance member + getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } + + // Getter + get value(): number { return 0; } + + // Setter + set value(newValue: number) { return; } + + // Static member + static origin = new Point(0, 0); + + // Static method + private static getOrigin() { return Point.origin;} + } + + enum Values { value1, value2, value3 } +} + +// Local variables +var p: IPoint = new Shapes.Point(3, 4); +var dist = p.getDist(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/navbar01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/navbar01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/navbar01.ts SVC-1-0 "// Interface\ninterface IPoint {\n getDist(): number;\n new(): IPoint;\n (): any;\n [x:string]: number;\n prop: string;\n}\n\n/// Module\nmodule Shapes {\n // Class\n export class Point implements IPoint {\n constructor (public x: number, public y: number) { }\n\n // Instance member\n getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }\n\n // Getter\n get value(): number { return 0; }\n\n // Setter\n set value(newValue: number) { return; }\n\n // Static member\n static origin = new Point(0, 0);\n\n // Static method\n private static getOrigin() { return Point.origin;}\n }\n\n enum Values { value1, value2, value3 }\n}\n\n// Local variables\nvar p: IPoint = new Shapes.Point(3, 4);\nvar dist = p.getDist();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + navbar01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/navbar01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/navbar01.ts" + }, + "command": "navtree" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navtree", + "request_seq": 1, + "success": true, + "body": { + "text": "", + "kind": "script", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 37, + "offset": 24 + } + } + ], + "childItems": [ + { + "text": "dist", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 37, + "offset": 5 + }, + "end": { + "line": 37, + "offset": 23 + } + } + ], + "nameSpan": { + "start": { + "line": 37, + "offset": 5 + }, + "end": { + "line": 37, + "offset": 9 + } + } + }, + { + "text": "IPoint", + "kind": "interface", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 8, + "offset": 2 + } + } + ], + "nameSpan": { + "start": { + "line": 2, + "offset": 11 + }, + "end": { + "line": 2, + "offset": 17 + } + }, + "childItems": [ + { + "text": "()", + "kind": "call", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 5, + "offset": 5 + }, + "end": { + "line": 5, + "offset": 13 + } + } + ] + }, + { + "text": "new()", + "kind": "construct", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 19 + } + } + ] + }, + { + "text": "[]", + "kind": "index", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 24 + } + } + ] + }, + { + "text": "getDist", + "kind": "method", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 23 + } + } + ], + "nameSpan": { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 12 + } + } + }, + { + "text": "prop", + "kind": "property", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 18 + } + } + ], + "nameSpan": { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 9 + } + } + } + ] + }, + { + "text": "p", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 36, + "offset": 5 + }, + "end": { + "line": 36, + "offset": 39 + } + } + ], + "nameSpan": { + "start": { + "line": 36, + "offset": 5 + }, + "end": { + "line": 36, + "offset": 6 + } + } + }, + { + "text": "Shapes", + "kind": "module", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 33, + "offset": 2 + } + } + ], + "nameSpan": { + "start": { + "line": 11, + "offset": 8 + }, + "end": { + "line": 11, + "offset": 14 + } + }, + "childItems": [ + { + "text": "Point", + "kind": "class", + "kindModifiers": "export", + "spans": [ + { + "start": { + "line": 13, + "offset": 5 + }, + "end": { + "line": 30, + "offset": 6 + } + } + ], + "nameSpan": { + "start": { + "line": 13, + "offset": 18 + }, + "end": { + "line": 13, + "offset": 23 + } + }, + "childItems": [ + { + "text": "constructor", + "kind": "constructor", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 14, + "offset": 9 + }, + "end": { + "line": 14, + "offset": 61 + } + } + ] + }, + { + "text": "getDist", + "kind": "method", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 17, + "offset": 9 + }, + "end": { + "line": 17, + "offset": 75 + } + } + ], + "nameSpan": { + "start": { + "line": 17, + "offset": 9 + }, + "end": { + "line": 17, + "offset": 16 + } + } + }, + { + "text": "getOrigin", + "kind": "method", + "kindModifiers": "private,static", + "spans": [ + { + "start": { + "line": 29, + "offset": 9 + }, + "end": { + "line": 29, + "offset": 59 + } + } + ], + "nameSpan": { + "start": { + "line": 29, + "offset": 24 + }, + "end": { + "line": 29, + "offset": 33 + } + } + }, + { + "text": "origin", + "kind": "property", + "kindModifiers": "static", + "spans": [ + { + "start": { + "line": 26, + "offset": 9 + }, + "end": { + "line": 26, + "offset": 41 + } + } + ], + "nameSpan": { + "start": { + "line": 26, + "offset": 16 + }, + "end": { + "line": 26, + "offset": 22 + } + } + }, + { + "text": "value", + "kind": "getter", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 20, + "offset": 9 + }, + "end": { + "line": 20, + "offset": 42 + } + } + ], + "nameSpan": { + "start": { + "line": 20, + "offset": 13 + }, + "end": { + "line": 20, + "offset": 18 + } + } + }, + { + "text": "value", + "kind": "setter", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 23, + "offset": 9 + }, + "end": { + "line": 23, + "offset": 48 + } + } + ], + "nameSpan": { + "start": { + "line": 23, + "offset": 13 + }, + "end": { + "line": 23, + "offset": 18 + } + } + }, + { + "text": "x", + "kind": "property", + "kindModifiers": "public", + "spans": [ + { + "start": { + "line": 14, + "offset": 22 + }, + "end": { + "line": 14, + "offset": 38 + } + } + ], + "nameSpan": { + "start": { + "line": 14, + "offset": 29 + }, + "end": { + "line": 14, + "offset": 30 + } + } + }, + { + "text": "y", + "kind": "property", + "kindModifiers": "public", + "spans": [ + { + "start": { + "line": 14, + "offset": 40 + }, + "end": { + "line": 14, + "offset": 56 + } + } + ], + "nameSpan": { + "start": { + "line": 14, + "offset": 47 + }, + "end": { + "line": 14, + "offset": 48 + } + } + } + ] + }, + { + "text": "Values", + "kind": "enum", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 5 + }, + "end": { + "line": 32, + "offset": 43 + } + } + ], + "nameSpan": { + "start": { + "line": 32, + "offset": 10 + }, + "end": { + "line": 32, + "offset": 16 + } + }, + "childItems": [ + { + "text": "value1", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 19 + }, + "end": { + "line": 32, + "offset": 25 + } + } + ], + "nameSpan": { + "start": { + "line": 32, + "offset": 19 + }, + "end": { + "line": 32, + "offset": 25 + } + } + }, + { + "text": "value2", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 27 + }, + "end": { + "line": 32, + "offset": 33 + } + } + ], + "nameSpan": { + "start": { + "line": 32, + "offset": 27 + }, + "end": { + "line": 32, + "offset": 33 + } + } + }, + { + "text": "value3", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 35 + }, + "end": { + "line": 32, + "offset": 41 + } + } + ], + "nameSpan": { + "start": { + "line": 32, + "offset": 35 + }, + "end": { + "line": 32, + "offset": 41 + } + } + } + ] + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/navbar01.ts" + }, + "command": "navbar" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navbar", + "request_seq": 2, + "success": true, + "body": [ + { + "text": "", + "kind": "script", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 37, + "offset": 24 + } + } + ], + "childItems": [ + { + "text": "dist", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 37, + "offset": 5 + }, + "end": { + "line": 37, + "offset": 23 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "IPoint", + "kind": "interface", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 8, + "offset": 2 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "p", + "kind": "var", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 36, + "offset": 5 + }, + "end": { + "line": 36, + "offset": 39 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "Shapes", + "kind": "module", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 33, + "offset": 2 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 0 + }, + { + "text": "IPoint", + "kind": "interface", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 8, + "offset": 2 + } + } + ], + "childItems": [ + { + "text": "()", + "kind": "call", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 5, + "offset": 5 + }, + "end": { + "line": 5, + "offset": 13 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "new()", + "kind": "construct", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 19 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "[]", + "kind": "index", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 6, + "offset": 5 + }, + "end": { + "line": 6, + "offset": 24 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "getDist", + "kind": "method", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 23 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "prop", + "kind": "property", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 7, + "offset": 5 + }, + "end": { + "line": 7, + "offset": 18 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 1 + }, + { + "text": "Shapes", + "kind": "module", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 11, + "offset": 1 + }, + "end": { + "line": 33, + "offset": 2 + } + } + ], + "childItems": [ + { + "text": "Point", + "kind": "class", + "kindModifiers": "export", + "spans": [ + { + "start": { + "line": 13, + "offset": 5 + }, + "end": { + "line": 30, + "offset": 6 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "Values", + "kind": "enum", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 5 + }, + "end": { + "line": 32, + "offset": 43 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 1 + }, + { + "text": "Point", + "kind": "class", + "kindModifiers": "export", + "spans": [ + { + "start": { + "line": 13, + "offset": 5 + }, + "end": { + "line": 30, + "offset": 6 + } + } + ], + "childItems": [ + { + "text": "constructor", + "kind": "constructor", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 14, + "offset": 9 + }, + "end": { + "line": 14, + "offset": 61 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "getDist", + "kind": "method", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 17, + "offset": 9 + }, + "end": { + "line": 17, + "offset": 75 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "getOrigin", + "kind": "method", + "kindModifiers": "private,static", + "spans": [ + { + "start": { + "line": 29, + "offset": 9 + }, + "end": { + "line": 29, + "offset": 59 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "origin", + "kind": "property", + "kindModifiers": "static", + "spans": [ + { + "start": { + "line": 26, + "offset": 9 + }, + "end": { + "line": 26, + "offset": 41 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "value", + "kind": "getter", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 20, + "offset": 9 + }, + "end": { + "line": 20, + "offset": 42 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "value", + "kind": "setter", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 23, + "offset": 9 + }, + "end": { + "line": 23, + "offset": 48 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "x", + "kind": "property", + "kindModifiers": "public", + "spans": [ + { + "start": { + "line": 14, + "offset": 22 + }, + "end": { + "line": 14, + "offset": 38 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "y", + "kind": "property", + "kindModifiers": "public", + "spans": [ + { + "start": { + "line": 14, + "offset": 40 + }, + "end": { + "line": 14, + "offset": 56 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 2 + }, + { + "text": "Values", + "kind": "enum", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 5 + }, + "end": { + "line": 32, + "offset": 43 + } + } + ], + "childItems": [ + { + "text": "value1", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 19 + }, + "end": { + "line": 32, + "offset": 25 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "value2", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 27 + }, + "end": { + "line": 32, + "offset": 33 + } + } + ], + "childItems": [], + "indent": 0 + }, + { + "text": "value3", + "kind": "enum member", + "kindModifiers": "", + "spans": [ + { + "start": { + "line": 32, + "offset": 35 + }, + "end": { + "line": 32, + "offset": 41 + } + } + ], + "childItems": [], + "indent": 0 + } + ], + "indent": 2 + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/navto01.js b/tests/baselines/reference/tsserver/fourslashServer/navto01.js new file mode 100644 index 00000000000..7b993109bb3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/navto01.js @@ -0,0 +1,289 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/navto01.ts] +/// Module +module MyShapes { + + // Class + export class MyPoint { + // Instance member + private MyoriginAttheHorizon = 0.0; + + // Getter + get MydistanceFromOrigin(): number { return 0; } + } +} + +// Local variables +var myXyz = new Shapes.Point(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/navto01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/navto01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/navto01.ts SVC-1-0 "/// Module\nmodule MyShapes {\n\n // Class\n export class MyPoint {\n // Instance member\n private MyoriginAttheHorizon = 0.0;\n\n // Getter\n get MydistanceFromOrigin(): number { return 0; }\n }\n}\n\n// Local variables\nvar myXyz = new Shapes.Point();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + navto01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/navto01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "searchValue": "Shapes", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 1, + "success": true, + "body": [ + { + "name": "MyShapes", + "kind": "module", + "kindModifiers": "", + "isCaseSensitive": true, + "matchKind": "substring", + "file": "/tests/cases/fourslash/server/navto01.ts", + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 12, + "offset": 2 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "searchValue": "Point", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 2, + "success": true, + "body": [ + { + "name": "MyPoint", + "kind": "class", + "kindModifiers": "export", + "isCaseSensitive": true, + "matchKind": "substring", + "file": "/tests/cases/fourslash/server/navto01.ts", + "start": { + "line": 5, + "offset": 5 + }, + "end": { + "line": 11, + "offset": 6 + }, + "containerName": "MyShapes", + "containerKind": "module" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "searchValue": "originAttheHorizon", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "MyoriginAttheHorizon", + "kind": "property", + "kindModifiers": "private", + "isCaseSensitive": true, + "matchKind": "substring", + "file": "/tests/cases/fourslash/server/navto01.ts", + "start": { + "line": 7, + "offset": 9 + }, + "end": { + "line": 7, + "offset": 44 + }, + "containerName": "MyPoint", + "containerKind": "class" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "searchValue": "distanceFromOrigin", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 4, + "success": true, + "body": [ + { + "name": "MydistanceFromOrigin", + "kind": "getter", + "kindModifiers": "", + "isCaseSensitive": true, + "matchKind": "substring", + "file": "/tests/cases/fourslash/server/navto01.ts", + "start": { + "line": 10, + "offset": 9 + }, + "end": { + "line": 10, + "offset": 57 + }, + "containerName": "MyPoint", + "containerKind": "class" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "searchValue": "Xyz", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 5, + "success": true, + "body": [ + { + "name": "myXyz", + "kind": "var", + "kindModifiers": "", + "isCaseSensitive": true, + "matchKind": "substring", + "file": "/tests/cases/fourslash/server/navto01.ts", + "start": { + "line": 15, + "offset": 5 + }, + "end": { + "line": 15, + "offset": 31 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/navto_serverExcludeLib.js b/tests/baselines/reference/tsserver/fourslashServer/navto_serverExcludeLib.js new file mode 100644 index 00000000000..fbd244ccbdc --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/navto_serverExcludeLib.js @@ -0,0 +1,258 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { weirdName as otherName } from "bar"; +const weirdName: number = 1; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/bar/index.d.ts] +export const weirdName: number; + +//// [/node_modules/bar/package.json] +{} + +//// [/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts", + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts" + ], + "options": { + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/bar/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/bar/index.d.ts Text-1 "export const weirdName: number;" + /index.ts SVC-1-0 "import { weirdName as otherName } from \"bar\";\nconst weirdName: number = 1;" + /lib.d.ts Text-1 lib.d.ts-Text + + + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + Matched by default include pattern '**/*' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + Matched by default include pattern '**/*' + node_modules/bar/index.d.ts + Imported via "bar" from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + lib.d.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/index.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/bar/index.d.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "searchValue": "weirdName", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 1, + "success": true, + "body": [ + { + "name": "weirdName", + "kind": "const", + "kindModifiers": "export,declare", + "isCaseSensitive": true, + "matchKind": "exact", + "file": "/node_modules/bar/index.d.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 31 + } + }, + { + "name": "weirdName", + "kind": "const", + "kindModifiers": "", + "isCaseSensitive": true, + "matchKind": "exact", + "file": "/index.ts", + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 28 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": { + "excludeLibrarySymbolsInNavTo": true + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "searchValue": "weirdName", + "currentFileOnly": false + }, + "command": "navto" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "navto", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "weirdName", + "kind": "const", + "kindModifiers": "", + "isCaseSensitive": true, + "matchKind": "exact", + "file": "/index.ts", + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 28 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js new file mode 100644 index 00000000000..78b7dbd7585 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js @@ -0,0 +1,278 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +let x = [1, 2]; +x + + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "plugins": [ + { "name": "quickinfo-augmeneter", "message": "hello world" } + ] + }, + "files": ["a.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts" + ], + "options": { + "plugins": [ + { + "name": "quickinfo-augmeneter", + "message": "hello world" + } + ], + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Enabling plugin quickinfo-augmeneter from candidate paths: /../../.. +Info seq [hh:mm:ss:mss] Loading quickinfo-augmeneter from /../../.. (resolved to /../../../node_modules) +Info seq [hh:mm:ss:mss] Plugin validation succeeded +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "let x = [1, 2];\nx\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"plugins\": [\n { \"name\": \"quickinfo-augmeneter\", \"message\": \"hello world\" }\n ]\n },\n \"files\": [\"a.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 2, + "offset": 2 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 2, + "success": true, + "body": { + "kind": "let", + "kindModifiers": "", + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 2 + }, + "displayString": "Proxied x: number[]hello world", + "documentation": "", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js new file mode 100644 index 00000000000..7366dceb61c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js @@ -0,0 +1,278 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +let x = [1, 2]; +x + + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "plugins": [ + { "name": "invalidmodulename" } + ] + }, + "files": ["a.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts" + ], + "options": { + "plugins": [ + { + "name": "invalidmodulename" + } + ], + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Enabling plugin invalidmodulename from candidate paths: /../../.. +Info seq [hh:mm:ss:mss] Loading invalidmodulename from /../../.. (resolved to /../../../node_modules) +Info seq [hh:mm:ss:mss] Failed to load module 'invalidmodulename' from /../../../node_modules: Error: HarnessLanguageService:: Could not resolve module +Info seq [hh:mm:ss:mss] Couldn't find invalidmodulename +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "let x = [1, 2];\nx\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"plugins\": [\n { \"name\": \"invalidmodulename\" }\n ]\n },\n \"files\": [\"a.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 2, + "offset": 2 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 2, + "success": true, + "body": { + "kind": "let", + "kindModifiers": "", + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 2 + }, + "displayString": "let x: number[]", + "documentation": "", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js new file mode 100644 index 00000000000..b166147ed74 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js @@ -0,0 +1,277 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +let x = [1, 2]; +x + + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "plugins": [ + { "name": "create-thrower" } + ] + }, + "files": ["a.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts" + ], + "options": { + "plugins": [ + { + "name": "create-thrower" + } + ], + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Enabling plugin create-thrower from candidate paths: /../../.. +Info seq [hh:mm:ss:mss] Loading create-thrower from /../../.. (resolved to /../../../node_modules) +Info seq [hh:mm:ss:mss] Plugin activation failed: Error: I am not a well-behaved plugin +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "let x = [1, 2];\nx\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"plugins\": [\n { \"name\": \"create-thrower\" }\n ]\n },\n \"files\": [\"a.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "line": 2, + "offset": 2 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 2, + "success": true, + "body": { + "kind": "let", + "kindModifiers": "", + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 2 + }, + "displayString": "let x: number[]", + "documentation": "", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js new file mode 100644 index 00000000000..b959383a2c1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js @@ -0,0 +1,297 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +let x = [1, 2]; +x + + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "plugins": [ + { "name": "diagnostic-adder" } + ] + }, + "files": ["a.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts" + ], + "options": { + "plugins": [ + { + "name": "diagnostic-adder" + } + ], + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Enabling plugin diagnostic-adder from candidate paths: /../../.. +Info seq [hh:mm:ss:mss] Loading diagnostic-adder from /../../.. (resolved to /../../../node_modules) +Info seq [hh:mm:ss:mss] Plugin validation succeeded +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "let x = [1, 2];\nx\n" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"plugins\": [\n { \"name\": \"diagnostic-adder\" }\n ]\n },\n \"files\": [\"a.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/a.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [ + { + "message": "Plugin diagnostic", + "start": 0, + "length": 3, + "category": "warning", + "code": 9999, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 4 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js b/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js new file mode 100644 index 00000000000..267e94d6dc3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js @@ -0,0 +1,384 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/package.json] +{ + "type": "module", + "private": true +} + +//// [/tests/cases/fourslash/server/src/example.ts] +export function helloWorld() { + console.log('Hello, world!') +} + +//// [/tests/cases/fourslash/server/src/index.ts] +// The line below should show a "Relative import paths need explicit file +// extensions..." error in VS Code, but it doesn't. The error is only picked up +// by `tsc` which seems to properly infer the module type. +import { helloWorld } from './example' + +helloWorld() + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "target": "ES2020", + "module": "NodeNext", + "strict": true + }, + "include": ["src\\**\\*.ts"] +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/src/example.ts", + "/tests/cases/fourslash/server/src/index.ts" + ], + "options": { + "rootDir": "/tests/cases/fourslash/server/src", + "outDir": "/tests/cases/fourslash/server/dist", + "target": 7, + "module": 199, + "strict": true, + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/src 1 undefined Config: /tests/cases/fourslash/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/src 1 undefined Config: /tests/cases/fourslash/server/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/src/example.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/src/package.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/package.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.es2020.full.d.ts 500 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /tests/cases/fourslash/server/src/example.ts Text-1 "export function helloWorld() {\n console.log('Hello, world!')\n}" + /tests/cases/fourslash/server/src/index.ts Text-1 "// The line below should show a \"Relative import paths need explicit file\n// extensions...\" error in VS Code, but it doesn't. The error is only picked up\n// by `tsc` which seems to properly infer the module type.\nimport { helloWorld } from './example'\n\nhelloWorld()" + + + src/example.ts + Matched by include pattern 'src\**\*.ts' in 'tsconfig.json' + File is ECMAScript module because 'package.json' has field "type" with value "module" + src/index.ts + Matched by include pattern 'src\**\*.ts' in 'tsconfig.json' + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [ + { + "text": "File '/lib.es2020.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'es2020'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'CallableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'NewableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n \"compilerOptions\": {\n \"rootDir\": \"src\",\n \"outDir\": \"dist\",\n \"target\": \"ES2020\",\n \"module\": \"NodeNext\",\n \"strict\": true\n },\n \"include\": [\"src\\\\**\\\\*.ts\"]\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib.es2020.full.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/package.json: *new* + {"pollingInterval":2000} + {"pollingInterval":250} +/tests/cases/fourslash/server/src/example.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/src/index.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/src/package.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/src/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server/src +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/src/index.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.es2020.full.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/package.json: + {"pollingInterval":2000} + {"pollingInterval":250} +/tests/cases/fourslash/server/src/example.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/src/package.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/src/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + {} +/tests/cases/fourslash/server/src: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/src/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/src/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [ + { + "message": "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './example.js'?", + "start": 240, + "length": 11, + "category": "error", + "code": 2835, + "startLocation": { + "line": 4, + "offset": 28 + }, + "endLocation": { + "line": 4, + "offset": 39 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/nodeNextPathCompletions.js b/tests/baselines/reference/tsserver/fourslashServer/nodeNextPathCompletions.js new file mode 100644 index 00000000000..c17f8c0da5e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nodeNextPathCompletions.js @@ -0,0 +1,980 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/dependency/lib/index.d.ts] +export function fooFromIndex(): void; + +//// [/node_modules/dependency/lib/lol.d.ts] +export function fooFromLol(): void; + +//// [/node_modules/dependency/package.json] +{ + "type": "module", + "name": "dependency", + "version": "1.0.0", + "exports": { + ".": { + "types": "./lib/index.d.ts" + }, + "./lol": { + "types": "./lib/lol.d.ts" + }, + "./dir/*": "./lib/*" + } +} + +//// [/package.json] +{ + "type": "module", + "dependencies": { + "dependency": "^1.0.0" + } +} + +//// [/src/foo.ts] +import { fooFromIndex } from ""; + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "nodenext" }, "files": ["./src/foo.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/dependency/package.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /node_modules/dependency +Info seq [hh:mm:ss:mss] For info: /node_modules/dependency/package.json :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/dependency/package.json SVC-1-0 "{\n \"type\": \"module\",\n \"name\": \"dependency\",\n \"version\": \"1.0.0\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/index.d.ts\"\n },\n \"./lol\": {\n \"types\": \"./lib/lol.d.ts\"\n },\n \"./dir/*\": \"./lib/*\"\n }\n}" + + + ../../lib.d.ts + Default library for target 'es5' + ../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../lib.d.ts' + ../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../lib.d.ts' + package.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/src/foo.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/foo.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /src/foo.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/src/foo.ts" + ], + "options": { + "module": 199, + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.esnext.full.d.ts 500 undefined Project: /tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + /src/foo.ts SVC-1-0 "import { fooFromIndex } from \"\";" + + + src/foo.ts + Part of 'files' list in tsconfig.json + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] AutoImportProviderProject: found 2 root files in 1 dependencies in * ms +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/index.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/lol.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/autoImportProviderProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /dev/null/autoImportProviderProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/autoImportProviderProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /node_modules/dependency/lib/lol.d.ts Text-1 "export function fooFromLol(): void;" + + + node_modules/dependency/lib/index.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + node_modules/dependency/lib/lol.d.ts + Root file specified for compilation + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/src/foo.ts", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "text": "File '/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/dependency/package.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /src/foo.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: *new* + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: *new* + {"pollingInterval":2000} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 31 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "dependency", + "kind": "external module name", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 31, + "entryNames": [ + { + "name": "dependency" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "dependency", + "kindModifiers": "", + "kind": "external module name", + "displayParts": [ + { + "text": "dependency", + "kind": "text" + } + ], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 32, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 33, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 34, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 34, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 35, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 12, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 35, + "endLine": 1, + "endOffset": 35, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 36, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 36, + "endLine": 1, + "endOffset": 36, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 37, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 37, + "endLine": 1, + "endOffset": 37, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 38, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 18, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 38, + "endLine": 1, + "endOffset": 38, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 39, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 20, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 39, + "endLine": 1, + "endOffset": 39, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 40, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 22, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 40, + "endLine": 1, + "endOffset": 40, + "insertString": "y" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 41, + "key": "y" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 24, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 41, + "endLine": 1, + "endOffset": 41, + "insertString": "/" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 42, + "key": "/" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 26, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 27, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 42 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/dependency/lib/index.d.ts Text-1 "export function fooFromIndex(): void;" + /src/foo.ts SVC-1-12 "import { fooFromIndex } from \"dependency/\";" + + + node_modules/dependency/lib/index.d.ts + Imported via "dependency/" from file 'src/foo.ts' with packageId 'dependency/ib/index.d.ts@1.0.0' + File is ECMAScript module because 'node_modules/dependency/package.json' has field "type" with value "module" + src/foo.ts + Part of 'files' list in tsconfig.json + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 28, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "lol", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "dir", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} + {"pollingInterval":2000} *new* +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 42, + "endLine": 1, + "endOffset": 42, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 42, + "endLine": 1, + "endOffset": 42, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 43, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 32, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/src/foo.ts", + "line": 1, + "offset": 43 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /node_modules/dependency/lib/package.json 2000 undefined Project: /tsconfig.json WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (1) + /src/foo.ts SVC-1-14 "import { fooFromIndex } from \"dependency/l\";" + + + src/foo.ts + Part of 'files' list in tsconfig.json + File is ECMAScript module because 'package.json' has field "type" with value "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/autoImportProviderProject1*' (AutoImportProvider) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 33, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "lol", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/index.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/lol.d.ts: + {"pollingInterval":500} +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/node_modules/dependency/lib/package.json: + {"pollingInterval":2000} diff --git a/tests/baselines/reference/tsserver/fourslashServer/nonJsDeclarationFilePathCompletions.js b/tests/baselines/reference/tsserver/fourslashServer/nonJsDeclarationFilePathCompletions.js new file mode 100644 index 00000000000..63f18bf9628 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nonJsDeclarationFilePathCompletions.js @@ -0,0 +1,300 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/project/mod.d.html.ts] +export declare class HtmlModuleThing {} + +//// [/project/node_modules/package/mod.d.html.ts] +export declare class PackageHtmlModuleThing {} + +//// [/project/usage.ts] +import { HtmlModuleThing } from "./"; +import { PackageHtmlModuleThing } from "package/"; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/project/mod.d.html.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/mod.d.html.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/mod.d.html.ts SVC-1-0 "export declare class HtmlModuleThing {}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + mod.d.html.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/mod.d.html.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/project/usage.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /project +Info seq [hh:mm:ss:mss] For info: /project/usage.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /project/usage.ts SVC-1-0 "import { HtmlModuleThing } from \"./\";\nimport { PackageHtmlModuleThing } from \"package/\";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + usage.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /project/mod.d.html.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /project/usage.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/project/usage.ts", + "line": 1, + "offset": 36 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "mod.html", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + }, + { + "name": "node_modules", + "kind": "directory", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/project/usage.ts", + "line": 1, + "offset": 36, + "entryNames": [ + { + "name": "mod.html" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 3, + "success": true, + "body": [ + { + "name": "mod.html", + "kindModifiers": "", + "kind": "script", + "displayParts": [ + { + "text": "mod.html", + "kind": "text" + } + ], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/project/usage.ts", + "line": 1, + "offset": 36, + "entryNames": [ + { + "name": "node_modules" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 4, + "success": true, + "body": [ + { + "name": "node_modules", + "kindModifiers": "", + "kind": "directory", + "displayParts": [ + { + "text": "node_modules", + "kind": "text" + } + ], + "tags": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/project/usage.ts", + "line": 2, + "offset": 49 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 5, + "success": true, + "body": { + "isGlobalCompletion": false, + "isMemberCompletion": false, + "isNewIdentifierLocation": true, + "entries": [ + { + "name": "mod.html", + "kind": "script", + "kindModifiers": "", + "sortText": "11" + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/project/usage.ts", + "line": 2, + "offset": 49, + "entryNames": [ + { + "name": "mod.html" + } + ] + }, + "command": "completionEntryDetails-full" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionEntryDetails-full", + "request_seq": 6, + "success": true, + "body": [ + { + "name": "mod.html", + "kindModifiers": "", + "kind": "script", + "displayParts": [ + { + "text": "mod.html", + "kind": "text" + } + ], + "tags": [] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/occurrences01.js b/tests/baselines/reference/tsserver/fourslashServer/occurrences01.js new file mode 100644 index 00000000000..35636fb604e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/occurrences01.js @@ -0,0 +1,763 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/occurrences01.ts] +foo: switch (10) { + case 1: + case 2: + case 3: + break; + break foo; + continue; + continue foo; +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/occurrences01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/occurrences01.ts SVC-1-0 "foo: switch (10) {\n case 1:\n case 2:\n case 3:\n break;\n break foo;\n continue;\n continue foo;\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + occurrences01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 1, + "offset": 6, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 2, + "offset": 5, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 3, + "offset": 5, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 6, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 4, + "offset": 5, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 8, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 5, + "offset": 9, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 10, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "line": 6, + "offset": 9, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences01.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 12, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences01.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 6 + }, + "end": { + "line": 1, + "offset": 12 + }, + "kind": "none" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 3, + "offset": 5 + }, + "end": { + "line": 3, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 4, + "offset": 5 + }, + "end": { + "line": 4, + "offset": 9 + }, + "kind": "none" + }, + { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 14 + }, + "kind": "none" + }, + { + "start": { + "line": 6, + "offset": 9 + }, + "end": { + "line": 6, + "offset": 14 + }, + "kind": "none" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/occurrences02.js b/tests/baselines/reference/tsserver/fourslashServer/occurrences02.js new file mode 100644 index 00000000000..c750a232c11 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/occurrences02.js @@ -0,0 +1,479 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/occurrences02.ts] +function f(x: typeof f) { + f(f); +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/occurrences02.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/occurrences02.ts SVC-1-0 "function f(x: typeof f) {\n f(f);\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + occurrences02.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "line": 1, + "offset": 10, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences02.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 2, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "line": 1, + "offset": 22, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences02.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 4, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "line": 2, + "offset": 5, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences02.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 6, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/occurrences02.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "line": 2, + "offset": 7, + "filesToSearch": [ + "/tests/cases/fourslash/server/occurrences02.ts" + ] + }, + "command": "documentHighlights" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "documentHighlights", + "request_seq": 8, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/occurrences02.ts", + "highlightSpans": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 11 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 3, + "offset": 2 + }, + "kind": "writtenReference" + }, + { + "start": { + "line": 1, + "offset": 22 + }, + "end": { + "line": 1, + "offset": 23 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 6 + }, + "kind": "reference" + }, + { + "start": { + "line": 2, + "offset": 7 + }, + "end": { + "line": 2, + "offset": 8 + }, + "kind": "reference" + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/openFile.js b/tests/baselines/reference/tsserver/fourslashServer/openFile.js new file mode 100644 index 00000000000..9c324e3cb06 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/openFile.js @@ -0,0 +1,300 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/test.ts] +var t = '10'; + +//// [/tests/cases/fourslash/server/test1.ts] +t. + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ "files": ["test.ts", "test1.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test1.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/test1.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/test.ts", + "/tests/cases/fourslash/server/test1.ts" + ], + "options": { + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/test.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test.ts Text-1 "var t = '10';" + /tests/cases/fourslash/server/test1.ts SVC-1-0 "t." + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + test.ts + Part of 'files' list in tsconfig.json + test1.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/test1.ts", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/test.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test.ts", + "fileContent": "var t = 10; t." + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/test.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 2 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test.ts SVC-2-0 "var t = 10; t." + /tests/cases/fourslash/server/test1.ts SVC-1-0 "t." + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/tests/cases/fourslash/server/test.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test1.ts", + "line": 1, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 4, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/openFileWithSyntaxKind.js b/tests/baselines/reference/tsserver/fourslashServer/openFileWithSyntaxKind.js new file mode 100644 index 00000000000..c265eae0510 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/openFileWithSyntaxKind.js @@ -0,0 +1,268 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/dumbFile.ts] +var x; + +//// [/tests/cases/fourslash/server/test.ts] +/** + * @type {number} + */ +var t; +t. + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/dumbFile.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/dumbFile.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/dumbFile.ts SVC-1-0 "var x;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + dumbFile.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/dumbFile.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test.ts", + "scriptKindName": "JS" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/test.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/test.ts SVC-1-0 "/**\n * @type {number}\n */\nvar t;\nt." + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + test.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/dumbFile.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/test.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} + {} *new* +/tests/cases/fourslash/server/node_modules: + {} + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/test.ts", + "line": 5, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 3, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "t", + "kind": "warning", + "kindModifiers": "", + "sortText": "18" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/projectInfo01.js b/tests/baselines/reference/tsserver/fourslashServer/projectInfo01.js new file mode 100644 index 00000000000..e254cbcc612 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectInfo01.js @@ -0,0 +1,544 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +export var test = "test String" + +//// [/tests/cases/fourslash/server/b.ts] +import test from "./a" + +//// [/tests/cases/fourslash/server/c.ts] +/// +/// + +//// [/tests/cases/fourslash/server/d.ts] +console.log("nothing"); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "export var test = \"test String\"" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 2, + "success": true, + "body": { + "configFileName": "/dev/null/inferredProject1*", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/a.ts" + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "export var test = \"test String\"" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import test from \"./a\"" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Imported via "./a" from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/a.ts + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 4, + "success": true, + "body": { + "configFileName": "/dev/null/inferredProject2*", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts" + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/c.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/c.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject3* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "export var test = \"test String\"" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import test from \"./a\"" + /tests/cases/fourslash/server/c.ts SVC-1-0 "/// \n/// " + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Referenced via 'a.ts' from file 'c.ts' + Imported via "./a" from file 'b.ts' + b.ts + Referenced via 'b.ts' from file 'c.ts' + c.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /tests/cases/fourslash/server/a.ts + /tests/cases/fourslash/server/b.ts + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Imported via "./a" from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject2* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/c.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} *new* +/tests/cases/fourslash/server/node_modules: + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} *new* + +watchedDirectoriesRecursive *deleted*:: +/tests/cases/fourslash/node_modules: + {} +/tests/cases/fourslash/node_modules/@types: + {} +/tests/cases/fourslash/server/node_modules: + {} +/tests/cases/fourslash/server/node_modules/@types: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/c.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 6, + "success": true, + "body": { + "configFileName": "/dev/null/inferredProject3*", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts", + "/tests/cases/fourslash/server/c.ts" + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/d.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject4* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject4* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject4* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject4* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject4* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject4* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject4* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject4* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject4* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject4* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/d.ts SVC-1-0 "console.log(\"nothing\");" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) +Info seq [hh:mm:ss:mss] Files (6) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/c.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject4* +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: + {} + {} *new* +/tests/cases/fourslash/node_modules/@types: + {} + {} *new* +/tests/cases/fourslash/server/node_modules: + {} + {} *new* +/tests/cases/fourslash/server/node_modules/@types: + {} + {} *new* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/d.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 8, + "success": true, + "body": { + "configFileName": "/dev/null/inferredProject4*", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/d.ts" + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/projectInfo02.js b/tests/baselines/reference/tsserver/fourslashServer/projectInfo02.js new file mode 100644 index 00000000000..25c7b498578 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectInfo02.js @@ -0,0 +1,184 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +export var test = "test String" + +//// [/tests/cases/fourslash/server/b.ts] +export var test2 = "test String" + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ "files": ["a.ts", "b.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/a.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts" + ], + "options": { + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "export var test = \"test String\"" + /tests/cases/fourslash/server/b.ts Text-1 "export var test2 = \"test String\"" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + b.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/a.ts", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/b.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 2, + "success": true, + "body": { + "configFileName": "/tests/cases/fourslash/server/tsconfig.json", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts", + "/tests/cases/fourslash/server/tsconfig.json" + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/projectWithNonExistentFiles.js b/tests/baselines/reference/tsserver/fourslashServer/projectWithNonExistentFiles.js new file mode 100644 index 00000000000..408a65a56ee --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectWithNonExistentFiles.js @@ -0,0 +1,212 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +export var test = "test String" + +//// [/tests/cases/fourslash/server/b.ts] +export var test2 = "test String" + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ "files": ["a.ts", "c.ts", "b.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/a.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/a.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/c.ts", + "/tests/cases/fourslash/server/b.ts" + ], + "options": { + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/c.ts 500 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts SVC-1-0 "export var test = \"test String\"" + /tests/cases/fourslash/server/b.ts Text-1 "export var test2 = \"test String\"" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Part of 'files' list in tsconfig.json + b.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/a.ts", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [ + { + "text": "File '/tests/cases/fourslash/server/c.ts' not found.\n The file is in the program because:\n Part of 'files' list in tsconfig.json", + "code": 6053, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 1, + "offset": 21 + }, + "end": { + "line": 1, + "offset": 27 + }, + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "message": "File is matched by 'files' list specified here.", + "category": "message", + "code": 1410 + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/b.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/c.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/a.ts", + "needFileNameList": true + }, + "command": "projectInfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "projectInfo", + "request_seq": 2, + "success": true, + "body": { + "configFileName": "/tests/cases/fourslash/server/tsconfig.json", + "languageServiceDisabled": false, + "fileNames": [ + "/lib.d.ts", + "/lib.decorators.d.ts", + "/lib.decorators.legacy.d.ts", + "/tests/cases/fourslash/server/a.ts", + "/tests/cases/fourslash/server/b.ts", + "/tests/cases/fourslash/server/tsconfig.json" + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/quickinfo01.js b/tests/baselines/reference/tsserver/fourslashServer/quickinfo01.js new file mode 100644 index 00000000000..75bac0c74b5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/quickinfo01.js @@ -0,0 +1,204 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/quickinfo01.ts] +interface One { + commonProperty: number; + commonFunction(): number; +} + +interface Two { + commonProperty: string + commonFunction(): number; +} + +var x : One | Two; + +x.commonProperty; +x.commonFunction; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfo01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/quickinfo01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/quickinfo01.ts SVC-1-0 "interface One {\n commonProperty: number;\n commonFunction(): number;\n}\n\ninterface Two {\n commonProperty: string\n commonFunction(): number;\n}\n\nvar x : One | Two;\n\nx.commonProperty;\nx.commonFunction;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + quickinfo01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/quickinfo01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfo01.ts", + "line": 11, + "offset": 5 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 1, + "success": true, + "body": { + "kind": "var", + "kindModifiers": "", + "start": { + "line": 11, + "offset": 5 + }, + "end": { + "line": 11, + "offset": 6 + }, + "displayString": "var x: One | Two", + "documentation": "", + "tags": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfo01.ts", + "line": 13, + "offset": 3 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 2, + "success": true, + "body": { + "kind": "property", + "kindModifiers": "", + "start": { + "line": 13, + "offset": 3 + }, + "end": { + "line": 13, + "offset": 17 + }, + "displayString": "(property) commonProperty: string | number", + "documentation": "", + "tags": [] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfo01.ts", + "line": 14, + "offset": 3 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 3, + "success": true, + "body": { + "kind": "method", + "kindModifiers": "", + "start": { + "line": 14, + "offset": 3 + }, + "end": { + "line": 14, + "offset": 17 + }, + "displayString": "(method) commonFunction(): number", + "documentation": "", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/quickinfoWrongComment.js b/tests/baselines/reference/tsserver/fourslashServer/quickinfoWrongComment.js new file mode 100644 index 00000000000..4fc2091a071 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/quickinfoWrongComment.js @@ -0,0 +1,135 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/quickinfoWrongComment.ts] +interface I { + /** The colour */ + readonly colour: string +} +interface A extends I { + readonly colour: "red" | "green"; +} +interface B extends I { + readonly colour: "yellow" | "green"; +} +type F = A | B +const f: F = { colour: "green" } +f.colour + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfoWrongComment.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/quickinfoWrongComment.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/quickinfoWrongComment.ts SVC-1-0 "interface I {\n /** The colour */\n readonly colour: string\n}\ninterface A extends I {\n readonly colour: \"red\" | \"green\";\n}\ninterface B extends I {\n readonly colour: \"yellow\" | \"green\";\n}\ntype F = A | B\nconst f: F = { colour: \"green\" }\nf.colour" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + quickinfoWrongComment.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/quickinfoWrongComment.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/quickinfoWrongComment.ts", + "line": 13, + "offset": 9 + }, + "command": "quickinfo" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "quickinfo", + "request_seq": 1, + "success": true, + "body": { + "kind": "property", + "kindModifiers": "", + "start": { + "line": 13, + "offset": 3 + }, + "end": { + "line": 13, + "offset": 9 + }, + "displayString": "(property) colour: \"red\" | \"green\" | \"yellow\"", + "documentation": "The colour", + "tags": [] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referenceToEmptyObject.js b/tests/baselines/reference/tsserver/fourslashServer/referenceToEmptyObject.js new file mode 100644 index 00000000000..d918d18cdcf --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referenceToEmptyObject.js @@ -0,0 +1,110 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/referenceToEmptyObject.ts] +const obj = {}; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referenceToEmptyObject.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/referenceToEmptyObject.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/referenceToEmptyObject.ts SVC-1-0 "const obj = {};" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + referenceToEmptyObject.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referenceToEmptyObject.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referenceToEmptyObject.ts", + "line": 1, + "offset": 15 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/referenceToEmptyObject.ts position 14 in project /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/references01.js b/tests/baselines/reference/tsserver/fourslashServer/references01.js new file mode 100644 index 00000000000..96355422405 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/references01.js @@ -0,0 +1,208 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/referencesForGlobals_1.ts] +class globalClass { + public f() { } +} + +//// [/referencesForGlobals_2.ts] +/// +var c = globalClass(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /referencesForGlobals_1.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /referencesForGlobals_1.ts SVC-1-0 "class globalClass {\n public f() { }\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + referencesForGlobals_1.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_2.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /referencesForGlobals_2.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /referencesForGlobals_1.ts SVC-1-0 "class globalClass {\n public f() { }\n}" + /referencesForGlobals_2.ts SVC-1-0 "///\nvar c = globalClass();" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + referencesForGlobals_1.ts + Referenced via 'referencesForGlobals_1.ts' from file 'referencesForGlobals_2.ts' + referencesForGlobals_2.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /referencesForGlobals_1.ts + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + referencesForGlobals_1.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_2.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_2.ts", + "line": 2, + "offset": 9 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /referencesForGlobals_2.ts position 58 in project /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/referencesForGlobals_1.ts", + "kind": "class", + "name": "class globalClass", + "textSpan": { + "start": 6, + "length": 11 + }, + "displayParts": [ + { + "text": "class", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "globalClass", + "kind": "className" + } + ], + "contextSpan": { + "start": 0, + "length": 40 + } + }, + "references": [ + { + "textSpan": { + "start": 6, + "length": 11 + }, + "fileName": "/referencesForGlobals_1.ts", + "contextSpan": { + "start": 0, + "length": 40 + }, + "isWriteAccess": true + }, + { + "textSpan": { + "start": 58, + "length": 11 + }, + "fileName": "/referencesForGlobals_2.ts", + "isWriteAccess": false + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInConfiguredProject.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInConfiguredProject.js new file mode 100644 index 00000000000..01b5923fb2f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInConfiguredProject.js @@ -0,0 +1,233 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/referencesForGlobals_1.ts] +class globalClass { + public f() { } +} + +//// [/referencesForGlobals_2.ts] +var c = globalClass(); + +//// [/tsconfig.json] +{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /referencesForGlobals_1.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /referencesForGlobals_1.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/referencesForGlobals_1.ts", + "/referencesForGlobals_2.ts" + ], + "options": { + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /referencesForGlobals_2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /referencesForGlobals_1.ts SVC-1-0 "class globalClass {\n public f() { }\n}" + /referencesForGlobals_2.ts Text-1 "var c = globalClass();" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + referencesForGlobals_1.ts + Part of 'files' list in tsconfig.json + referencesForGlobals_2.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/referencesForGlobals_1.ts", + "configFile": "/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/referencesForGlobals_2.ts: *new* + {"pollingInterval":500} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_2.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /referencesForGlobals_2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /referencesForGlobals_2.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /referencesForGlobals_2.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/referencesForGlobals_2.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/referencesForGlobals_2.ts", + "line": 1, + "offset": 9 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /referencesForGlobals_2.ts position 8 in project /tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/referencesForGlobals_1.ts", + "kind": "class", + "name": "class globalClass", + "textSpan": { + "start": 6, + "length": 11 + }, + "displayParts": [ + { + "text": "class", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "globalClass", + "kind": "className" + } + ], + "contextSpan": { + "start": 0, + "length": 40 + } + }, + "references": [ + { + "textSpan": { + "start": 6, + "length": 11 + }, + "fileName": "/referencesForGlobals_1.ts", + "contextSpan": { + "start": 0, + "length": 40 + }, + "isWriteAccess": true + }, + { + "textSpan": { + "start": 8, + "length": 11 + }, + "fileName": "/referencesForGlobals_2.ts", + "isWriteAccess": false + } + ] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFile.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFile.js new file mode 100644 index 00000000000..97c1e4d833b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFile.js @@ -0,0 +1,110 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/referencesInEmptyFile.ts] + + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesInEmptyFile.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/referencesInEmptyFile.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/referencesInEmptyFile.ts SVC-1-0 "" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + referencesInEmptyFile.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referencesInEmptyFile.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesInEmptyFile.ts", + "line": 1, + "offset": 1 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/referencesInEmptyFile.ts position 0 in project /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js new file mode 100644 index 00000000000..808016795b8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js @@ -0,0 +1,343 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/a.ts] +/// +; + +//// [/a/tsconfig.json] +{ "files": ["a.ts"] } + +//// [/b/b.ts] +; + +//// [/b/tsconfig.json] +{ "files": ["b.ts"] } + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/tsconfig.json :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/a.ts" + ], + "options": { + "configFilePath": "/a/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/b.ts Text-1 ";" + /a/a.ts Text-1 "/// \n;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../b/b.ts + Referenced via '../b/b.ts' from file 'a.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/tsconfig.json", + "configFile": "/a/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/tsconfig.json SVC-1-0 "{ \"files\": [\"a.ts\"] }" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a/a.ts: *new* + {"pollingInterval":500} +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/b/b.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/a.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: + {"pollingInterval":2000} +/b/b.ts: + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/a/a.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/a/a.ts", + "line": 2, + "offset": 1 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/a.ts position 35 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/b/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /b/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/b.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /b/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating possible configured project for /b/b.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/b.ts" + ], + "options": { + "configFilePath": "/b/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/b.ts Text-1 ";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + b.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/b/b.ts", + "configFile": "/b/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/b/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: + {"pollingInterval":2000} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/b/b.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/b/b.ts", + "line": 1, + "offset": 1 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/b.ts position 0 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/b.ts position 0 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 4, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js new file mode 100644 index 00000000000..9967850d2f0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js @@ -0,0 +1,364 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/a/a.ts] +/// +const str: string = "hello"; + +//// [/a/tsconfig.json] +{ "files": ["a.ts"] } + +//// [/b/b.ts] +const str2: string = "hello"; + +//// [/b/tsconfig.json] +{ "files": ["b.ts"] } + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/a/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/tsconfig.json :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/tsconfig.json 2000 undefined Project: /a/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/a/tsconfig.json", + "reason": "Creating possible configured project for /a/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /a/tsconfig.json : { + "rootNames": [ + "/a/a.ts" + ], + "options": { + "configFilePath": "/a/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /a/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/b.ts Text-1 "const str2: string = \"hello\";" + /a/a.ts Text-1 "/// \nconst str: string = \"hello\";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../b/b.ts + Referenced via '../b/b.ts' from file 'a.ts' + a.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/a/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/a/tsconfig.json", + "configFile": "/a/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /a/tsconfig.json SVC-1-0 "{ \"files\": [\"a.ts\"] }" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/a/a.ts: *new* + {"pollingInterval":500} +/a/tsconfig.json: *new* + {"pollingInterval":2000} +/b/b.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/a/a.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /a +Info seq [hh:mm:ss:mss] For info: /a/a.ts :: Config file name: /a/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: + {"pollingInterval":2000} +/b/b.ts: + {"pollingInterval":500} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/a/a.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/a/a.ts", + "line": 2, + "offset": 27 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /a/a.ts position 61 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 2, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/a/a.ts", + "kind": "var", + "name": "hello", + "textSpan": { + "start": 56, + "length": 5 + }, + "displayParts": [ + { + "text": "\"hello\"", + "kind": "stringLiteral" + } + ] + }, + "references": [] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/b/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /b/b.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /b +Info seq [hh:mm:ss:mss] For info: /b/b.ts :: Config file name: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /b/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /b/tsconfig.json 2000 undefined Project: /b/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/b/tsconfig.json", + "reason": "Creating possible configured project for /b/b.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /b/tsconfig.json : { + "rootNames": [ + "/b/b.ts" + ], + "options": { + "configFilePath": "/b/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /b/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /b/b.ts Text-1 "const str2: string = \"hello\";" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + b.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/b/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/b/b.ts", + "configFile": "/b/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/a/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/b/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /a/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /a/a.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /b/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /a/tsconfig.json,/b/tsconfig.json +After Request +watchedFiles:: +/a/tsconfig.json: + {"pollingInterval":2000} +/b/tsconfig.json: *new* + {"pollingInterval":2000} +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} + +watchedFiles *deleted*:: +/b/b.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/b/b.ts", + "line": 1, + "offset": 28 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /b/b.ts position 27 in project /b/tsconfig.json +Info seq [hh:mm:ss:mss] Finding references to /b/b.ts position 27 in project /a/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 4, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesToNonPropertyNameStringLiteral.js b/tests/baselines/reference/tsserver/fourslashServer/referencesToNonPropertyNameStringLiteral.js new file mode 100644 index 00000000000..a682f66c916 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesToNonPropertyNameStringLiteral.js @@ -0,0 +1,131 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts] +const str: string = "hello"; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts SVC-1-0 "const str: string = \"hello\";" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + referencesToNonPropertyNameStringLiteral.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts", + "line": 1, + "offset": 27 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts position 26 in project /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/server/referencesToNonPropertyNameStringLiteral.ts", + "kind": "var", + "name": "hello", + "textSpan": { + "start": 21, + "length": 5 + }, + "displayParts": [ + { + "text": "\"hello\"", + "kind": "stringLiteral" + } + ] + }, + "references": [] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesToStringLiteralValue.js b/tests/baselines/reference/tsserver/fourslashServer/referencesToStringLiteralValue.js new file mode 100644 index 00000000000..16d2fbad779 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesToStringLiteralValue.js @@ -0,0 +1,131 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/referencesToStringLiteralValue.ts] +const s: string = "some string"; + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesToStringLiteralValue.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/referencesToStringLiteralValue.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/referencesToStringLiteralValue.ts SVC-1-0 "const s: string = \"some string\";" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + referencesToStringLiteralValue.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referencesToStringLiteralValue.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesToStringLiteralValue.ts", + "line": 1, + "offset": 25 + }, + "command": "references-full" + } +Info seq [hh:mm:ss:mss] Finding references to /tests/cases/fourslash/server/referencesToStringLiteralValue.ts position 24 in project /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "references-full", + "request_seq": 1, + "success": true, + "body": [ + { + "definition": { + "containerKind": "", + "containerName": "", + "fileName": "/tests/cases/fourslash/server/referencesToStringLiteralValue.ts", + "kind": "var", + "name": "some string", + "textSpan": { + "start": 19, + "length": 12 + }, + "displayParts": [ + { + "text": "\"some string\"", + "kind": "stringLiteral" + } + ] + }, + "references": [] + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/rename01.js b/tests/baselines/reference/tsserver/fourslashServer/rename01.js new file mode 100644 index 00000000000..9d41daad5ce --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/rename01.js @@ -0,0 +1,218 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/rename01.ts] +/// +function Bar() { + // This is a reference to Bar in a comment. + "this is a reference to Bar in a string" +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/rename01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/rename01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/bar.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/rename01.ts SVC-1-0 "///\nfunction Bar() {\n // This is a reference to Bar in a comment.\n \"this is a reference to Bar in a string\"\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + rename01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/rename01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/bar.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/rename01.ts", + "line": 2, + "offset": 10, + "findInStrings": true, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 2, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "Bar", + "fullDisplayName": "Bar", + "kind": "function", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 2, + "offset": 10 + }, + "end": { + "line": 2, + "offset": 13 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/rename01.ts", + "locs": [ + { + "start": { + "line": 2, + "offset": 10 + }, + "end": { + "line": 2, + "offset": 13 + }, + "contextStart": { + "line": 2, + "offset": 1 + }, + "contextEnd": { + "line": 5, + "offset": 2 + } + }, + { + "start": { + "line": 3, + "offset": 31 + }, + "end": { + "line": 3, + "offset": 34 + } + }, + { + "start": { + "line": 4, + "offset": 29 + }, + "end": { + "line": 4, + "offset": 32 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/renameInConfiguredProject.js b/tests/baselines/reference/tsserver/fourslashServer/renameInConfiguredProject.js new file mode 100644 index 00000000000..ffe0c841cfb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameInConfiguredProject.js @@ -0,0 +1,372 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/referencesForGlobals_1.ts] +var globalName = 0; + +//// [/tests/cases/fourslash/server/referencesForGlobals_2.ts] +var y = globalName; + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ "files": ["referencesForGlobals_1.ts", "referencesForGlobals_2.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesForGlobals_1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/referencesForGlobals_1.ts :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/referencesForGlobals_1.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/referencesForGlobals_1.ts", + "/tests/cases/fourslash/server/referencesForGlobals_2.ts" + ], + "options": { + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/referencesForGlobals_2.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/referencesForGlobals_1.ts SVC-1-0 "var globalName = 0;" + /tests/cases/fourslash/server/referencesForGlobals_2.ts Text-1 "var y = globalName;" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + referencesForGlobals_1.ts + Part of 'files' list in tsconfig.json + referencesForGlobals_2.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/referencesForGlobals_1.ts", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/referencesForGlobals_1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tests/cases/fourslash/server/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/referencesForGlobals_2.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesForGlobals_1.ts", + "line": 1, + "offset": 5, + "findInStrings": true, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 2, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "globalName", + "fullDisplayName": "globalName", + "kind": "var", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 1, + "offset": 5 + }, + "end": { + "line": 1, + "offset": 15 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/referencesForGlobals_1.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 5 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 20 + } + } + ] + }, + { + "file": "/tests/cases/fourslash/server/referencesForGlobals_2.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 19 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 4, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/referencesForGlobals_2.ts", + "line": 1, + "offset": 9, + "findInStrings": true, + "findInComments": true + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 5, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "globalName", + "fullDisplayName": "globalName", + "kind": "var", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 19 + } + } + }, + "locs": [ + { + "file": "/tests/cases/fourslash/server/referencesForGlobals_1.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 5 + }, + "end": { + "line": 1, + "offset": 15 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 20 + } + } + ] + }, + { + "file": "/tests/cases/fourslash/server/referencesForGlobals_2.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 9 + }, + "end": { + "line": 1, + "offset": 19 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 6, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js b/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js new file mode 100644 index 00000000000..37040cc40de --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js @@ -0,0 +1,425 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib/index.ts] +const unrelatedLocalVariable = 123; +export const someExportedVariable = unrelatedLocalVariable; + +//// [/lib/tsconfig.json] +{} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/src/index.ts] +import { someExportedVariable } from '../lib/index'; +someExportedVariable; + +//// [/src/tsconfig.json] +{} + +//// [/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/lib/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /lib +Info seq [hh:mm:ss:mss] For info: /lib/tsconfig.json :: Config file name: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /lib/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib/tsconfig.json 2000 undefined Project: /lib/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/lib/tsconfig.json", + "reason": "Creating possible configured project for /lib/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /lib/tsconfig.json : { + "rootNames": [ + "/lib/index.ts" + ], + "options": { + "configFilePath": "/lib/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /lib 1 undefined Config: /lib/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /lib 1 undefined Config: /lib/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /lib/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/lib/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/lib/tsconfig.json", + "configFile": "/lib/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/tsconfig.json SVC-1-0 "{}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib/index.ts: *new* + {"pollingInterval":500} +/lib/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/lib: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/lib/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /lib +Info seq [hh:mm:ss:mss] For info: /lib/index.ts :: Config file name: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /lib/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /lib/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/lib/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/lib: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/index.ts :: Config file name: /src/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /src/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/tsconfig.json 2000 undefined Project: /src/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/src/tsconfig.json", + "reason": "Creating possible configured project for /src/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /src/tsconfig.json : { + "rootNames": [ + "/src/index.ts" + ], + "options": { + "configFilePath": "/src/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /src 1 undefined Config: /src/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src 1 undefined Config: /src/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /src/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/src/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" + /src/index.ts SVC-1-0 "import { someExportedVariable } from '../lib/index';\nsomeExportedVariable;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../lib/index.ts + Imported via '../lib/index' from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/src/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/src/index.ts", + "configFile": "/src/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/src/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /lib/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /lib/tsconfig.json,/src/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /src/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib/tsconfig.json: + {"pollingInterval":2000} +/src/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/lib: + {} +/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 10, + "findInStrings": false, + "findInComments": false + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 4, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "someExportedVariable", + "fullDisplayName": "someExportedVariable", + "kind": "alias", + "kindModifiers": "export", + "triggerSpan": { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 30 + } + } + }, + "locs": [ + { + "file": "/src/index.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 30 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 53 + }, + "prefixText": "someExportedVariable as " + }, + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 21 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js b/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js new file mode 100644 index 00000000000..a352966f524 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js @@ -0,0 +1,424 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib/index.ts] +const unrelatedLocalVariable = 123; +export const someExportedVariable = unrelatedLocalVariable; + +//// [/lib/tsconfig.json] +{} + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/src/index.ts] +import * as lib from '../lib/index'; +lib.someExportedVariable; + +//// [/src/tsconfig.json] +{} + +//// [/tsconfig.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/lib/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /lib +Info seq [hh:mm:ss:mss] For info: /lib/tsconfig.json :: Config file name: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /lib/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib/tsconfig.json 2000 undefined Project: /lib/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/lib/tsconfig.json", + "reason": "Creating possible configured project for /lib/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /lib/tsconfig.json : { + "rootNames": [ + "/lib/index.ts" + ], + "options": { + "configFilePath": "/lib/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /lib 1 undefined Config: /lib/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /lib 1 undefined Config: /lib/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /lib/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/lib/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/lib/tsconfig.json", + "configFile": "/lib/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/tsconfig.json SVC-1-0 "{}" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib/index.ts: *new* + {"pollingInterval":500} +/lib/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/lib: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/lib/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /lib +Info seq [hh:mm:ss:mss] For info: /lib/index.ts :: Config file name: /lib/tsconfig.json +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /lib/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /lib/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/lib/index.ts: + {"pollingInterval":500} + +watchedDirectoriesRecursive:: +/lib: + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/src/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /src +Info seq [hh:mm:ss:mss] For info: /src/index.ts :: Config file name: /src/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /src/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/tsconfig.json 2000 undefined Project: /src/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/src/tsconfig.json", + "reason": "Creating possible configured project for /src/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /src/tsconfig.json : { + "rootNames": [ + "/src/index.ts" + ], + "options": { + "configFilePath": "/src/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /src 1 undefined Config: /src/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /src 1 undefined Config: /src/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /src/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/src/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" + /src/index.ts SVC-1-0 "import * as lib from '../lib/index';\nlib.someExportedVariable;" + + + ../lib.d.ts + Default library for target 'es5' + ../lib.decorators.d.ts + Library referenced via 'decorators' from file '../lib.d.ts' + ../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../lib.d.ts' + ../lib/index.ts + Imported via '../lib/index' from file 'index.ts' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/src/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/src/index.ts", + "configFile": "/src/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/src/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /lib/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /lib/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /lib/tsconfig.json,/src/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /src/index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /src/tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib/tsconfig.json: + {"pollingInterval":2000} +/src/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/lib: + {} +/src: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "preferences": { + "providePrefixAndSuffixTextForRename": true, + "quotePreference": "double" + } + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 3, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/src/index.ts", + "line": 1, + "offset": 13, + "findInStrings": false, + "findInComments": false + }, + "command": "rename" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "rename", + "request_seq": 4, + "success": true, + "body": { + "info": { + "canRename": true, + "displayName": "lib", + "fullDisplayName": "lib", + "kind": "alias", + "kindModifiers": "", + "triggerSpan": { + "start": { + "line": 1, + "offset": 13 + }, + "end": { + "line": 1, + "offset": 16 + } + } + }, + "locs": [ + { + "file": "/src/index.ts", + "locs": [ + { + "start": { + "line": 1, + "offset": 13 + }, + "end": { + "line": 1, + "offset": 16 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 37 + } + }, + { + "start": { + "line": 2, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 4 + } + } + ] + } + ] + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 5, + "success": true + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/semanticClassificationJs1.js b/tests/baselines/reference/tsserver/fourslashServer/semanticClassificationJs1.js new file mode 100644 index 00000000000..c1f0c03670b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/semanticClassificationJs1.js @@ -0,0 +1,126 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/semanticClassificationJs1.ts] +@Filename: index.js + +var Thing = 0; +Thing.toExponential(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/semanticClassificationJs1.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/semanticClassificationJs1.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/semanticClassificationJs1.ts SVC-1-0 "@Filename: index.js\n\nvar Thing = 0;\nThing.toExponential();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + semanticClassificationJs1.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/semanticClassificationJs1.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/semanticClassificationJs1.ts", + "start": 0, + "length": 58, + "format": "2020" + }, + "command": "encodedSemanticClassifications-full" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "encodedSemanticClassifications-full", + "request_seq": 1, + "success": true, + "body": { + "spans": [ + 25, + 5, + 2049, + 36, + 5, + 2048, + 42, + 13, + 3088 + ], + "endOfLineState": 0 + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/signatureHelp01.js b/tests/baselines/reference/tsserver/fourslashServer/signatureHelp01.js new file mode 100644 index 00000000000..ea7b14752fd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/signatureHelp01.js @@ -0,0 +1,199 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/signatureHelp01.ts] +function foo(data: number) { +} + +function bar { + foo() +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/signatureHelp01.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/signatureHelp01.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/signatureHelp01.ts SVC-1-0 "function foo(data: number) {\n}\n\nfunction bar {\n foo()\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + signatureHelp01.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/signatureHelp01.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/signatureHelp01.ts", + "line": 5, + "offset": 9 + }, + "command": "signatureHelp" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "signatureHelp", + "request_seq": 1, + "success": true, + "body": { + "items": [ + { + "isVariadic": false, + "prefixDisplayParts": [ + { + "text": "foo", + "kind": "functionName" + }, + { + "text": "(", + "kind": "punctuation" + } + ], + "suffixDisplayParts": [ + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "void", + "kind": "keyword" + } + ], + "separatorDisplayParts": [ + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + } + ], + "parameters": [ + { + "name": "data", + "documentation": [], + "displayParts": [ + { + "text": "data", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + } + ], + "documentation": [], + "tags": [] + } + ], + "applicableSpan": { + "start": { + "line": 5, + "offset": 9 + }, + "end": { + "line": 5, + "offset": 9 + } + }, + "selectedItemIndex": 0, + "argumentIndex": 0, + "argumentCount": 0 + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/signatureHelpJSDocCallbackTag.js b/tests/baselines/reference/tsserver/fourslashServer/signatureHelpJSDocCallbackTag.js new file mode 100644 index 00000000000..7b46ebf6995 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/signatureHelpJSDocCallbackTag.js @@ -0,0 +1,677 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/jsdocCallbackTag.js] +/** + * @callback FooHandler - A kind of magic + * @param {string} eventName - So many words + * @param eventName2 {number | string} - Silence is golden + * @param eventName3 - Osterreich mos def + * @return {number} - DIVEKICK + */ +/** + * @type {FooHandler} callback + */ +var t; + +/** + * @callback FooHandler2 - What, another one? + * @param {string=} eventName - it keeps happening + * @param {string} [eventName2] - i WARNED you dog + */ +/** + * @type {FooHandler2} callback + */ +var t2; +t("!", 12, false); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/jsdocCallbackTag.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/jsdocCallbackTag.js SVC-1-0 "/**\n * @callback FooHandler - A kind of magic\n * @param {string} eventName - So many words\n * @param eventName2 {number | string} - Silence is golden\n * @param eventName3 - Osterreich mos def\n * @return {number} - DIVEKICK\n */\n/**\n * @type {FooHandler} callback\n */\nvar t;\n\n/**\n * @callback FooHandler2 - What, another one?\n * @param {string=} eventName - it keeps happening\n * @param {string} [eventName2] - i WARNED you dog\n */\n/**\n * @type {FooHandler2} callback\n */\nvar t2;\nt(\"!\", 12, false);" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + jsdocCallbackTag.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/jsdocCallbackTag.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 22, + "offset": 3 + }, + "command": "signatureHelp" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "signatureHelp", + "request_seq": 1, + "success": true, + "body": { + "items": [ + { + "isVariadic": false, + "prefixDisplayParts": [ + { + "text": "t", + "kind": "localName" + }, + { + "text": "(", + "kind": "punctuation" + } + ], + "suffixDisplayParts": [ + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "separatorDisplayParts": [ + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + } + ], + "parameters": [ + { + "name": "eventName", + "documentation": [ + { + "text": "- So many words", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName2", + "documentation": [ + { + "text": "- Silence is golden", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName2", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName3", + "documentation": [ + { + "text": "- Osterreich mos def", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName3", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + } + ], + "documentation": [], + "tags": [ + { + "name": "type", + "text": "{FooHandler} callback" + } + ] + } + ], + "applicableSpan": { + "start": { + "line": 22, + "offset": 3 + }, + "end": { + "line": 22, + "offset": 17 + } + }, + "selectedItemIndex": 0, + "argumentIndex": 0, + "argumentCount": 3 + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 22, + "offset": 8 + }, + "command": "signatureHelp" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "signatureHelp", + "request_seq": 2, + "success": true, + "body": { + "items": [ + { + "isVariadic": false, + "prefixDisplayParts": [ + { + "text": "t", + "kind": "localName" + }, + { + "text": "(", + "kind": "punctuation" + } + ], + "suffixDisplayParts": [ + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "separatorDisplayParts": [ + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + } + ], + "parameters": [ + { + "name": "eventName", + "documentation": [ + { + "text": "- So many words", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName2", + "documentation": [ + { + "text": "- Silence is golden", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName2", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName3", + "documentation": [ + { + "text": "- Osterreich mos def", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName3", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + } + ], + "documentation": [], + "tags": [ + { + "name": "type", + "text": "{FooHandler} callback" + } + ] + } + ], + "applicableSpan": { + "start": { + "line": 22, + "offset": 3 + }, + "end": { + "line": 22, + "offset": 17 + } + }, + "selectedItemIndex": 0, + "argumentIndex": 1, + "argumentCount": 3 + } + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/jsdocCallbackTag.js", + "line": 22, + "offset": 12 + }, + "command": "signatureHelp" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "signatureHelp", + "request_seq": 3, + "success": true, + "body": { + "items": [ + { + "isVariadic": false, + "prefixDisplayParts": [ + { + "text": "t", + "kind": "localName" + }, + { + "text": "(", + "kind": "punctuation" + } + ], + "suffixDisplayParts": [ + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "separatorDisplayParts": [ + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + } + ], + "parameters": [ + { + "name": "eventName", + "documentation": [ + { + "text": "- So many words", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName2", + "documentation": [ + { + "text": "- Silence is golden", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName2", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + }, + { + "name": "eventName3", + "documentation": [ + { + "text": "- Osterreich mos def", + "kind": "text" + } + ], + "displayParts": [ + { + "text": "eventName3", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "any", + "kind": "keyword" + } + ], + "isOptional": false, + "isRest": false + } + ], + "documentation": [], + "tags": [ + { + "name": "type", + "text": "{FooHandler} callback" + } + ] + } + ], + "applicableSpan": { + "start": { + "line": 22, + "offset": 3 + }, + "end": { + "line": 22, + "offset": 17 + } + }, + "selectedItemIndex": 0, + "argumentIndex": 2, + "argumentCount": 3 + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js b/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js new file mode 100644 index 00000000000..4ac1d227cc4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js @@ -0,0 +1,304 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +/// +pkgImportGlobal; +export {}; + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/pkg/import.d.ts] +export {}; +export interface PkgImportInterface { field: any; } +declare global { const pkgImportGlobal: PkgImportInterface; } + +//// [/node_modules/pkg/package.json] +{ "name": "pkg", "version": "0.0.1", "exports": { "require": "./require.cjs", "default": "./import.js" }, "type": "module" } + +//// [/node_modules/pkg/require.d.cts] +export {}; +export interface PkgRequireInterface { member: any; } +declare global { const pkgRequireGlobal: PkgRequireInterface; } + +//// [/package.json] +{ "private": true, "type": "commonjs" } + +//// [/tsconfig.json] +{ "compilerOptions": { "module": "nodenext", "declaration": true, "strict": true, "outDir": "out" }, "files": ["./index.ts"] } + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /tsconfig.json :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tsconfig.json", + "reason": "Creating possible configured project for /tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { + "rootNames": [ + "/index.ts" + ], + "options": { + "module": 199, + "declaration": true, + "strict": true, + "outDir": "/out", + "configFilePath": "/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/pkg/import.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.esnext.full.d.ts 500 undefined Project: /tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /node_modules/pkg/import.d.ts Text-1 "export {};\nexport interface PkgImportInterface { field: any; }\ndeclare global { const pkgImportGlobal: PkgImportInterface; }" + /index.ts Text-1 "/// \npkgImportGlobal;\nexport {};" + + + node_modules/pkg/import.d.ts + Type library referenced via 'pkg' from file 'index.ts' with packageId 'pkg/import.d.ts@0.0.1' + File is ECMAScript module because 'node_modules/pkg/package.json' has field "type" with value "module" + index.ts + Part of 'files' list in tsconfig.json + File is CommonJS module because 'package.json' has field "type" whose value is not "module" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tsconfig.json", + "configFile": "/tsconfig.json", + "diagnostics": [ + { + "text": "File '/lib.esnext.full.d.ts' not found.\n The file is in the program because:\n Default library for target 'esnext'", + "code": 6053, + "category": "error" + }, + { + "text": "Cannot find global type 'Array'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Boolean'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'CallableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Function'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'IArguments'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'NewableFunction'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Number'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'Object'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'RegExp'.", + "code": 2318, + "category": "error" + }, + { + "text": "Cannot find global type 'String'.", + "code": 2318, + "category": "error" + } + ] + } + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tsconfig.json SVC-1-0 "{ \"compilerOptions\": { \"module\": \"nodenext\", \"declaration\": true, \"strict\": true, \"outDir\": \"out\" }, \"files\": [\"./index.ts\"] }" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/index.ts: *new* + {"pollingInterval":500} +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/lib.esnext.full.d.ts: *new* + {"pollingInterval":500} +/node_modules/pkg/import.d.ts: *new* + {"pollingInterval":500} +/package.json: *new* + {"pollingInterval":250} +/tsconfig.json: *new* + {"pollingInterval":2000} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /index.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: / +Info seq [hh:mm:ss:mss] For info: /index.ts :: Config file name: /tsconfig.json +Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /tsconfig.json +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/lib.esnext.full.d.ts: + {"pollingInterval":500} +/node_modules/pkg/import.d.ts: + {"pollingInterval":500} +/package.json: + {"pollingInterval":250} +/tsconfig.json: + {"pollingInterval":2000} + +watchedFiles *deleted*:: +/index.ts: + {"pollingInterval":500} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 2, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js b/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js new file mode 100644 index 00000000000..d3bbb78704e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js @@ -0,0 +1,227 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/tsconfig.json] +{ + ["oops!" + 42]: "true", + "files": [ + "nonexistentfile.ts" + ], + "compileOnSave": true +} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsconfig.json :: Config file name: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json", + "reason": "Creating possible configured project for /tests/cases/fourslash/server/tsconfig.json to open" + } + } +Info seq [hh:mm:ss:mss] Config: /tests/cases/fourslash/server/tsconfig.json : { + "rootNames": [ + "/tests/cases/fourslash/server/nonexistentfile.ts" + ], + "options": { + "configFilePath": "/tests/cases/fourslash/server/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/nonexistentfile.ts 500 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Missing file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /tests/cases/fourslash/server/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tests/cases/fourslash/server/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/tests/cases/fourslash/server/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/tests/cases/fourslash/server/tsconfig.json", + "configFile": "/tests/cases/fourslash/server/tsconfig.json", + "diagnostics": [ + { + "text": "File '/tests/cases/fourslash/server/nonexistentfile.ts' not found.\n The file is in the program because:\n Part of 'files' list in tsconfig.json", + "code": 6053, + "category": "error", + "relatedInformation": [ + { + "span": { + "start": { + "line": 4, + "offset": 9 + }, + "end": { + "line": 4, + "offset": 29 + }, + "file": "/tests/cases/fourslash/server/tsconfig.json" + }, + "message": "File is matched by 'files' list specified here.", + "category": "message", + "code": 1410 + } + ] + }, + { + "start": { + "line": 2, + "offset": 5 + }, + "end": { + "line": 2, + "offset": 19 + }, + "text": "String literal with double quotes expected.", + "code": 1327, + "category": "error", + "fileName": "/tests/cases/fourslash/server/tsconfig.json" + } + ] + } + } +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsconfig.json SVC-1-0 "{\n [\"oops!\" + 42]: \"true\",\n \"files\": [\n \"nonexistentfile.ts\"\n ],\n \"compileOnSave\": true\n}" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsconfig.json + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/tests/cases/fourslash/server/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/nonexistentfile.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} + {} +/tests/cases/fourslash/server/node_modules: *new* + {} + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsconfig.json", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 1, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/tsxIncrementalServer.js b/tests/baselines/reference/tsserver/fourslashServer/tsxIncrementalServer.js new file mode 100644 index 00000000000..2d4c9ede99e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tsxIncrementalServer.js @@ -0,0 +1,726 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/tsxIncrementalServer.ts] + + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/tsxIncrementalServer.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/tsxIncrementalServer.ts SVC-1-0 "" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + tsxIncrementalServer.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/tsxIncrementalServer.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "<" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 2, + "key": "<" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 3, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 3, + "endLine": 1, + "endOffset": 3, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 4, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 8, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 4, + "endLine": 1, + "endOffset": 4, + "insertString": "v" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 5, + "key": "v" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 10, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 6, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 7, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 16, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 7, + "endLine": 1, + "endOffset": 7, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 8, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 18, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 8, + "endLine": 1, + "endOffset": 8, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 9, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 20, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": "=" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 10, + "key": "=" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 11, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 26, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 11, + "endLine": 1, + "endOffset": 11, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 12, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 28, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 12, + "endLine": 1, + "endOffset": 12, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 13, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 30, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 13, + "endLine": 1, + "endOffset": 13, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 14, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 32, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 15, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": ">" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/tsxIncrementalServer.ts", + "line": 1, + "offset": 16, + "key": ">" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 38, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/typeReferenceOnServer.js b/tests/baselines/reference/tsserver/fourslashServer/typeReferenceOnServer.js new file mode 100644 index 00000000000..ba8f3086862 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/typeReferenceOnServer.js @@ -0,0 +1,177 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/typeReferenceOnServer.ts] +/// +var x: number; +x. + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/typeReferenceOnServer.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/typeReferenceOnServer.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/typeReferenceOnServer.ts SVC-1-0 "/// \nvar x: number;\nx." + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + typeReferenceOnServer.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/typeReferenceOnServer.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 1, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/typeReferenceOnServer.ts", + "line": 3, + "offset": 3 + }, + "command": "completionInfo" + } +Info seq [hh:mm:ss:mss] getCompletionData: Get current token: * +Info seq [hh:mm:ss:mss] getCompletionData: Is inside comment: * +Info seq [hh:mm:ss:mss] getCompletionData: Get previous token: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: isCompletionListBlocker: * +Info seq [hh:mm:ss:mss] getCompletionData: Semantic work: * +Info seq [hh:mm:ss:mss] getCompletionsAtPosition: getCompletionEntriesFromSymbols: * +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "completionInfo", + "request_seq": 2, + "success": true, + "body": { + "flags": 0, + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toExponential", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toFixed", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toLocaleString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toPrecision", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11" + } + ] + } + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/typedefinition01.js b/tests/baselines/reference/tsserver/fourslashServer/typedefinition01.js new file mode 100644 index 00000000000..9a58e8bac30 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/typedefinition01.js @@ -0,0 +1,139 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/tests/cases/fourslash/server/a.ts] +export class Foo {} + +//// [/tests/cases/fourslash/server/b.ts] +import n = require('./a'); +var x = new n.Foo(); + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] Search path: /tests/cases/fourslash/server +Info seq [hh:mm:ss:mss] For info: /tests/cases/fourslash/server/b.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/a.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /tests/cases/fourslash/server/a.ts Text-1 "export class Foo {}" + /tests/cases/fourslash/server/b.ts SVC-1-0 "import n = require('./a');\nvar x = new n.Foo();" + + + ../../../../lib.d.ts + Default library for target 'es5' + ../../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../../lib.d.ts' + ../../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../../lib.d.ts' + a.ts + Imported via './a' from file 'b.ts' + b.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /tests/cases/fourslash/server/b.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/a.ts: *new* + {"pollingInterval":500} +/tests/cases/fourslash/server/jsconfig.json: *new* + {"pollingInterval":2000} +/tests/cases/fourslash/server/tsconfig.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/tests/cases/fourslash/node_modules: *new* + {} +/tests/cases/fourslash/node_modules/@types: *new* + {} +/tests/cases/fourslash/server/node_modules: *new* + {} +/tests/cases/fourslash/server/node_modules/@types: *new* + {} + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/tests/cases/fourslash/server/b.ts", + "line": 2, + "offset": 6 + }, + "command": "typeDefinition" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "typeDefinition", + "request_seq": 1, + "success": true, + "body": [ + { + "file": "/tests/cases/fourslash/server/a.ts", + "start": { + "line": 1, + "offset": 14 + }, + "end": { + "line": 1, + "offset": 17 + }, + "contextStart": { + "line": 1, + "offset": 1 + }, + "contextEnd": { + "line": 1, + "offset": 20 + } + } + ] + } \ No newline at end of file diff --git a/tests/baselines/reference/typeErrorAfterStringCompletionsInNestedCall2.baseline b/tests/baselines/reference/typeErrorAfterStringCompletionsInNestedCall2.baseline index 29cfca778c8..fee4d606de6 100644 --- a/tests/baselines/reference/typeErrorAfterStringCompletionsInNestedCall2.baseline +++ b/tests/baselines/reference/typeErrorAfterStringCompletionsInNestedCall2.baseline @@ -1,3 +1,4 @@ +// === Syntax and Semantic Diagnostics === Syntactic Diagnostics for file '/tests/cases/fourslash/typeErrorAfterStringCompletionsInNestedCall2.ts': diff --git a/tests/cases/fourslash/cancellationWhenfindingAllRefsOnDefinition.ts b/tests/cases/fourslash/cancellationWhenfindingAllRefsOnDefinition.ts index e1385856f2e..f4ff52614d1 100644 --- a/tests/cases/fourslash/cancellationWhenfindingAllRefsOnDefinition.ts +++ b/tests/cases/fourslash/cancellationWhenfindingAllRefsOnDefinition.ts @@ -23,18 +23,10 @@ ////second./*2*/start(); ////second.stop(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: '1' }, - { - type: "customWork", - work: () => { - cancellation.setCancelled(); - verifyOperationIsCancelled(() => verify.baselineFindAllReferences('1')); +verify.baselineFindAllReferences("1"); +cancellation.setCancelled(); +verifyOperationIsCancelled(() => verify.baselineFindAllReferences('1')); - // verify that internal state is still correct - cancellation.resetCancelled(); - return "cancelled findAllReferences"; - } - }, - { type: "findAllReferences", markerOrRange: '1' }, -); \ No newline at end of file +// verify that internal state is still correct +cancellation.resetCancelled(); +verify.baselineFindAllReferences("1"); diff --git a/tests/cases/fourslash/duplicatePackageServices.ts b/tests/cases/fourslash/duplicatePackageServices.ts index 7e49d3bb956..d80ec40b82b 100644 --- a/tests/cases/fourslash/duplicatePackageServices.ts +++ b/tests/cases/fourslash/duplicatePackageServices.ts @@ -32,7 +32,5 @@ goTo.file("/src/a.ts"); verify.numberOfErrorsInCurrentFile(0); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['useAX', 'defAX', 'useBX'] }, - { type: "goToDefinition", markerOrRange: ["useAX", "useBX"] }, -); \ No newline at end of file +verify.baselineFindAllReferences('useAX', 'defAX', 'useBX'); +verify.baselineGoToDefinition("useAX", "useBX"); diff --git a/tests/cases/fourslash/findAllReferencesDynamicImport2.ts b/tests/cases/fourslash/findAllReferencesDynamicImport2.ts index ce29e3eee87..cb299da5f09 100644 --- a/tests/cases/fourslash/findAllReferencesDynamicImport2.ts +++ b/tests/cases/fourslash/findAllReferencesDynamicImport2.ts @@ -8,7 +8,5 @@ //// foo./*2*/[|bar|](); //// }) -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2'] }, - { type: "findRenameLocations", rangeText: "bar" }, -); +verify.baselineFindAllReferences('1', '2'); +verify.baselineRenameAtRangesWithText("bar"); diff --git a/tests/cases/fourslash/findAllReferencesDynamicImport3.ts b/tests/cases/fourslash/findAllReferencesDynamicImport3.ts index 1df7ff9b4b9..73ecffd3c40 100644 --- a/tests/cases/fourslash/findAllReferencesDynamicImport3.ts +++ b/tests/cases/fourslash/findAllReferencesDynamicImport3.ts @@ -5,7 +5,5 @@ ////import('./foo').then(([|{ /*1*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 2 |}bar|] }|]) => undefined); const [r0Def, r0, r1Def, r1] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1'] }, - { type: "findRenameLocations", markerOrRange: [r0, r1] }, -); +verify.baselineFindAllReferences('0', '1'); +verify.baselineRename([r0, r1]); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsClassWithStaticThisAccess.ts b/tests/cases/fourslash/findAllRefsClassWithStaticThisAccess.ts index 2c4566a9ea2..c3467820a9d 100644 --- a/tests/cases/fourslash/findAllRefsClassWithStaticThisAccess.ts +++ b/tests/cases/fourslash/findAllRefsClassWithStaticThisAccess.ts @@ -14,7 +14,5 @@ const [r0Def, r0, r1, r2] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1', '2'] }, - { type: "findRenameLocations", markerOrRange: r0 }, -); +verify.baselineFindAllReferences('0', '1', '2'); +verify.baselineRename(r0) diff --git a/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts b/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts index 48bab9357f5..cdf25ac9b09 100644 --- a/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts +++ b/tests/cases/fourslash/findAllRefsDefaultImportThroughNamespace.ts @@ -19,9 +19,7 @@ const [r0Def, r0, r1, r2, r3Def, r3, r4] = test.ranges(); goTo.rangeStart(r2); verify.renameInfoFailed(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1', '2', '3', '4'] }, - { type: "findRenameLocations", markerOrRange: r1 }, - // Can rename a default property. - { type: "findRenameLocations", markerOrRange: [r3, r4] }, -); +verify.baselineFindAllReferences('0', '1', '2', '3', '4'); +verify.baselineRename(r1); +// Can rename a default property. +verify.baselineRename([r3, r4]) \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsForDefaultExport.ts b/tests/cases/fourslash/findAllRefsForDefaultExport.ts index a0296c02726..4f849224063 100644 --- a/tests/cases/fourslash/findAllRefsForDefaultExport.ts +++ b/tests/cases/fourslash/findAllRefsForDefaultExport.ts @@ -10,7 +10,5 @@ // @Filename: c.ts ////import { f } from "./a"; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['def', 'deg'] }, - { type: "goToDefinition", markerOrRange: "ref" }, -); +verify.baselineFindAllReferences('def', 'deg'); +verify.baselineGoToDefinition("ref"); diff --git a/tests/cases/fourslash/findAllRefsForDefaultExportAnonymous.ts b/tests/cases/fourslash/findAllRefsForDefaultExportAnonymous.ts index 9d2903d54f8..4188a96a93d 100644 --- a/tests/cases/fourslash/findAllRefsForDefaultExportAnonymous.ts +++ b/tests/cases/fourslash/findAllRefsForDefaultExportAnonymous.ts @@ -11,7 +11,5 @@ const [r0Def, r0, r1Def, r1] = test.ranges(); // Verify that it doesn't try to rename "default" goTo.rangeStart(r0); verify.renameInfoFailed(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1'] }, - { type: "findRenameLocations", markerOrRange: r1 } -); +verify.baselineFindAllReferences('0', '1'); +verify.baselineRename(r1); diff --git a/tests/cases/fourslash/findAllRefsForModule.ts b/tests/cases/fourslash/findAllRefsForModule.ts index 2909e526a75..fc215ddea91 100644 --- a/tests/cases/fourslash/findAllRefsForModule.ts +++ b/tests/cases/fourslash/findAllRefsForModule.ts @@ -17,7 +17,5 @@ const [r0Def, r0, r1Def, r1, r2] = test.ranges(); const ranges = [r0, r1, r2]; // Testing that it works with documentHighlights too -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1', '2'] }, - { type: "documentHighlights", markerOrRange: ranges, options: { filesToSearch: ["/b.ts", "/c/sub.js", "/d.ts"] } }, -); +verify.baselineFindAllReferences('0', '1', '2'); +verify.baselineDocumentHighlights(ranges, { filesToSearch: ["/b.ts", "/c/sub.js", "/d.ts"] }); diff --git a/tests/cases/fourslash/findAllRefsImportStarOfExportEquals.ts b/tests/cases/fourslash/findAllRefsImportStarOfExportEquals.ts index fdd897b0209..a121fd97872 100644 --- a/tests/cases/fourslash/findAllRefsImportStarOfExportEquals.ts +++ b/tests/cases/fourslash/findAllRefsImportStarOfExportEquals.ts @@ -25,9 +25,7 @@ const [a0Def, a0, a1Def, a1, a2Def, a2, b0Def, b0, b1, b2, c0Def, c0, c1, c2] = const aRanges = [a0, a1, a2]; const bRanges = [b0, b1, b2]; const cRanges = [c0, c1, c2]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['a0', 'a1', 'a2', 'b0', 'b1', 'c0', 'c1', 'c2'] }, - { type: "findRenameLocations", markerOrRange: aRanges }, - { type: "findRenameLocations", markerOrRange: bRanges }, - { type: "findRenameLocations", markerOrRange: cRanges }, -); +verify.baselineFindAllReferences('a0', 'a1', 'a2', 'b0', 'b1', 'c0', 'c1', 'c2'); +verify.baselineRename(aRanges); +verify.baselineRename(bRanges); +verify.baselineRename(cRanges); diff --git a/tests/cases/fourslash/findAllRefsOnImportAliases2.ts b/tests/cases/fourslash/findAllRefsOnImportAliases2.ts index eeb88acb2ea..bf39e4ad121 100644 --- a/tests/cases/fourslash/findAllRefsOnImportAliases2.ts +++ b/tests/cases/fourslash/findAllRefsOnImportAliases2.ts @@ -10,7 +10,5 @@ //@Filename: c.ts ////[|export { /*class2*/[|{| "contextRangeIndex": 6 |}Class|] as /*c3*/[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 6 |}C3|] } from "./a";|] -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['class0', 'class1', 'class2', 'c2_0', 'c2_1', 'c3'] }, - { type: "findRenameLocations", rangeText: ["Class", "C2", "C3"] }, -); +verify.baselineFindAllReferences('class0', 'class1', 'class2', 'c2_0', 'c2_1', 'c3'); +verify.baselineRenameAtRangesWithText(["Class", "C2", "C3"]); diff --git a/tests/cases/fourslash/findAllRefsPrefixSuffixPreference.ts b/tests/cases/fourslash/findAllRefsPrefixSuffixPreference.ts index 40088589884..ba9ff1dd5ed 100644 --- a/tests/cases/fourslash/findAllRefsPrefixSuffixPreference.ts +++ b/tests/cases/fourslash/findAllRefsPrefixSuffixPreference.ts @@ -37,10 +37,8 @@ const zReferenceGroup2: FourSlashInterface.ReferenceGroup = { ranges: [z1, z2] }; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['q0', 'q1', 'q2', 'q3', 'z0', 'z1', 'z2'] }, - { type: "findRenameLocations", markerOrRange: [q0, q1, q2, q3], options: { providePrefixAndSuffixTextForRename: true } }, - { type: "findRenameLocations", markerOrRange: [q0, q1, q2, q3], options: { providePrefixAndSuffixTextForRename: false } }, - { type: "findRenameLocations", markerOrRange: [z0, z1, z2], options: { providePrefixAndSuffixTextForRename: true } }, - { type: "findRenameLocations", markerOrRange: [z0, z1, z2], options: { providePrefixAndSuffixTextForRename: false } }, -); +verify.baselineFindAllReferences('q0', 'q1', 'q2', 'q3', 'z0', 'z1', 'z2'); +verify.baselineRename([q0, q1, q2, q3], { providePrefixAndSuffixTextForRename: true }); +verify.baselineRename([q0, q1, q2, q3], { providePrefixAndSuffixTextForRename: false }); +verify.baselineRename([z0, z1, z2], { providePrefixAndSuffixTextForRename: true }); +verify.baselineRename([z0, z1, z2], { providePrefixAndSuffixTextForRename: false }); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsPrimitive.ts b/tests/cases/fourslash/findAllRefsPrimitive.ts index 05c4571e667..61009b6faf3 100644 --- a/tests/cases/fourslash/findAllRefsPrimitive.ts +++ b/tests/cases/fourslash/findAllRefsPrimitive.ts @@ -24,10 +24,7 @@ // @Filename: b.ts //// const z: /*17*/[|any|] = 0; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'] }, - { type: "documentHighlights", options: { filesToSearch: ["a.ts", "b.ts"] } } -); - +verify.baselineFindAllReferences('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'); +verify.baselineDocumentHighlights(undefined, { filesToSearch: ["a.ts", "b.ts"] }); goTo.rangeStart(test.ranges()[0]); verify.renameInfoFailed(); diff --git a/tests/cases/fourslash/findAllRefsReExportLocal.ts b/tests/cases/fourslash/findAllRefsReExportLocal.ts index 3240ca53a4b..3bbf73b5df3 100644 --- a/tests/cases/fourslash/findAllRefsReExportLocal.ts +++ b/tests/cases/fourslash/findAllRefsReExportLocal.ts @@ -17,11 +17,9 @@ const [ax0Def, ax0, ax1Def, ax1, ax2Def, ax2, ay, bx0Def, bx0, by0, bx1, by1] = const bxRanges = [bx0, bx1]; const byRanges = [by0, by1]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['ax0', 'ax1', 'ax2', 'bx0', 'bx1', 'ay', 'by0', 'by1'] }, - { type: "findRenameLocations", markerOrRange: [ax0, ax2] }, - { type: "findRenameLocations", markerOrRange: ax1 }, - { type: "findRenameLocations", markerOrRange: bxRanges }, - { type: "findRenameLocations", markerOrRange: ay }, - { type: "findRenameLocations", markerOrRange: byRanges }, -); +verify.baselineFindAllReferences('ax0', 'ax1', 'ax2', 'bx0', 'bx1', 'ay', 'by0', 'by1'); +verify.baselineRename([ax0, ax2]); +verify.baselineRename(ax1); +verify.baselineRename(bxRanges); +verify.baselineRename(ay); +verify.baselineRename(byRanges); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsReExportRightNameWrongSymbol.ts b/tests/cases/fourslash/findAllRefsReExportRightNameWrongSymbol.ts index 521acef2221..858e806572e 100644 --- a/tests/cases/fourslash/findAllRefsReExportRightNameWrongSymbol.ts +++ b/tests/cases/fourslash/findAllRefsReExportRightNameWrongSymbol.ts @@ -16,11 +16,9 @@ verify.noErrors(); const [aDef, a, bDef, b, cFromBDef, cFromB, cFromADef, cFromA, cUse, dDef, d] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['a', 'b', 'cFromB', 'cFromA', 'cUse', 'd'] }, - { type: "findRenameLocations", markerOrRange: a }, - { type: "findRenameLocations", markerOrRange: [cFromA, cUse] }, - { type: "findRenameLocations", markerOrRange: b }, - { type: "findRenameLocations", markerOrRange: cFromB }, - { type: "findRenameLocations", markerOrRange: d }, -); +verify.baselineFindAllReferences('a', 'b', 'cFromB', 'cFromA', 'cUse', 'd'); +verify.baselineRename(a); +verify.baselineRename([cFromA, cUse]); +verify.baselineRename(b); +verify.baselineRename(cFromB); +verify.baselineRename(d); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsReExports.ts b/tests/cases/fourslash/findAllRefsReExports.ts index 4d963a7a4d5..127d5d9b610 100644 --- a/tests/cases/fourslash/findAllRefsReExports.ts +++ b/tests/cases/fourslash/findAllRefsReExports.ts @@ -20,19 +20,14 @@ /////*bar2*/[|bar|](); /*baz1*/[|baz|](); /*bang1*/[|bang|](); /*boom1*/[|boom|](); verify.noErrors(); -const commands: FourSlashInterface.BaselineCommand[] = [ - { - type: "findAllReferences", - markerOrRange: [ - 'foo0', 'foo1', 'foo2', - 'bar0', 'bar1', 'bar2', - 'defaultC', 'defaultE', 'defaultD', - 'baz0', 'baz1', - 'bang0', 'bang1', - 'boom0', 'boom1' - ], - }, -]; +verify.baselineFindAllReferences( + 'foo0', 'foo1', 'foo2', + 'bar0', 'bar1', 'bar2', + 'defaultC', 'defaultE', 'defaultD', + 'baz0', 'baz1', + 'bang0', 'bang1', + 'boom0', 'boom1' +); test.rangesByText().forEach((ranges, text) => { if (text.indexOf("export") === 0 || text.indexOf("import") === 0) return; switch (text) { @@ -43,8 +38,7 @@ test.rangesByText().forEach((ranges, text) => { } break; default: - commands.push({ type: "findRenameLocations", markerOrRange: ranges }); + verify.baselineRename(ranges); break; } -}); -verify.baselineCommands(...commands); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsReExportsUseInImportType.ts b/tests/cases/fourslash/findAllRefsReExportsUseInImportType.ts index 49406c95227..fe057297d15 100644 --- a/tests/cases/fourslash/findAllRefsReExportsUseInImportType.ts +++ b/tests/cases/fourslash/findAllRefsReExportsUseInImportType.ts @@ -37,12 +37,9 @@ const fooExport = { ranges: exportFooRanges }; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['full0', 'full1', 'full2', 'foo0', 'foo1', 'foo2', 'foo3', 'foo4'] }, - { type: "findRenameLocations", markerOrRange: fullRanges }, - { type: "findRenameLocations", markerOrRange: foo0 }, - { type: "findRenameLocations", markerOrRange: [foo1, foo4] }, - { type: "findRenameLocations", markerOrRange: fooAppRanges }, - { type: "findRenameLocations", markerOrRange: [foo2, foo3, foo4, foo0, foo1], options: { providePrefixAndSuffixTextForRename: false } }, -); - +verify.baselineFindAllReferences('full0', 'full1', 'full2', 'foo0', 'foo1', 'foo2', 'foo3', 'foo4'); +verify.baselineRename(fullRanges); +verify.baselineRename(foo0); +verify.baselineRename([foo1, foo4]); +verify.baselineRename(fooAppRanges); +verify.baselineRename([foo2, foo3, foo4, foo0, foo1], { providePrefixAndSuffixTextForRename: false }); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefsRenameImportWithSameName.ts b/tests/cases/fourslash/findAllRefsRenameImportWithSameName.ts index d1a6f516ecd..0c0706b0877 100644 --- a/tests/cases/fourslash/findAllRefsRenameImportWithSameName.ts +++ b/tests/cases/fourslash/findAllRefsRenameImportWithSameName.ts @@ -10,7 +10,5 @@ verify.noErrors(); const [r0Def, r0, r1Def, r1, r2, r3] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1', '2', '3'] }, - { type: "findRenameLocations", markerOrRange: [r0, r1, r2, r3] }, -); +verify.baselineFindAllReferences('0', '1', '2', '3'); +verify.baselineRename([r0, r1, r2, r3]); \ No newline at end of file diff --git a/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts b/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts index 2d86d1a4d83..2b815911a1b 100644 --- a/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts +++ b/tests/cases/fourslash/findAllRefs_importType_exportEquals.ts @@ -13,10 +13,8 @@ verify.noErrors(); const [r0Def, r0, r1Def, r1, r2Def, rExport, r2, r3Def, r3, r3b, r4Def, r4, r4b] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['0', '1', '2', '3', '4', 'export'] }, - { type: "findRenameLocations", markerOrRange: [r0, r1, r2] }, -); +verify.baselineFindAllReferences('0', '1', '2', '3', '4', 'export'); +verify.baselineRename([r0, r1, r2]); for (const range of [r3b, r4b]) { goTo.rangeStart(range); verify.renameInfoSucceeded(/*displayName*/ "/a.ts", /*fullDisplayName*/ "/a.ts", /*kind*/ "module", /*kindModifiers*/ "", /*fileToRename*/ "/a.ts", range); diff --git a/tests/cases/fourslash/findReferencesAfterEdit.ts b/tests/cases/fourslash/findReferencesAfterEdit.ts index 0b0f39fec55..4204adb14ed 100644 --- a/tests/cases/fourslash/findReferencesAfterEdit.ts +++ b/tests/cases/fourslash/findReferencesAfterEdit.ts @@ -12,15 +12,7 @@ //// x./*2*/foo ////} -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2'] }, - { - type: "customWork", - work: () => { - goTo.marker(""); - edit.insert("\n"); - return "edits"; - } - }, - { type: "findAllReferences", markerOrRange: ['1', '2'] }, -); \ No newline at end of file +verify.baselineFindAllReferences("1", "2"); +goTo.marker(""); +edit.insert("\n"); +verify.baselineFindAllReferences("1", "2"); \ No newline at end of file diff --git a/tests/cases/fourslash/findReferencesJSXTagName3.ts b/tests/cases/fourslash/findReferencesJSXTagName3.ts index b4675ca272c..8b16c743967 100644 --- a/tests/cases/fourslash/findReferencesJSXTagName3.ts +++ b/tests/cases/fourslash/findReferencesJSXTagName3.ts @@ -25,17 +25,12 @@ const [d0Def, d0, c0Def, c0, d1Def, d1, d2Def, d2, d3, d4, c1Def, c1, c2] = test const allD = [d0, d1, d2, d3, d4]; const allC = [c0, c1, c2]; -verify.baselineCommands( - { - type: "findAllReferences", - markerOrRange: [ - // div occurrences - '1', '2', '3', '4', '5', - // Comp occurrences - '6', '7', '8' - ] - }, - // For document highlights, we will just do tag matching if on a tag. Otherwise we find-all-references. - { type: "documentHighlights", markerOrRange: allD }, - { type: "documentHighlights", markerOrRange: allC }, -); \ No newline at end of file +verify.baselineFindAllReferences( + // div occurrences + '1', '2', '3', '4', '5', + // Comp occurrences + '6', '7', '8' +); +// For document highlights, we will just do tag matching if on a tag. Otherwise we find-all-references. +verify.baselineDocumentHighlights(allD); +verify.baselineDocumentHighlights(allC); \ No newline at end of file diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 858f545e416..927a03bc7e7 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -318,7 +318,6 @@ declare namespace FourSlashInterface { formatDocumentChangesNothing(): void; verifyGetEmitOutputForCurrentFile(expected: string): void; verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void; - baselineCommands(...commands: BaselineCommand[]): void; baselineFindAllReferences(...markerOrRange: MarkerOrNameOrRange[]): void; baselineFindAllReferencesAtRangesWithText(...rangeText: string[]): void; baselineGetFileReferences(...fileName: string[]): void; @@ -850,27 +849,6 @@ declare namespace FourSlashInterface { type RenameOptions = { readonly findInStrings?: boolean, readonly findInComments?: boolean, readonly providePrefixAndSuffixTextForRename?: boolean, readonly quotePreference?: "auto" | "double" | "single" }; type RenameLocationOptions = Range | { readonly range: Range, readonly prefixText?: string, readonly suffixText?: string }; type DiagnosticIgnoredInterpolations = { template: string } - type BaselineCommand = { - type: "findAllReferences" | "goToDefinition" | "getDefinitionAtPosition" | "goToSourceDefinition" | "goToType" | "goToImplementation"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; - } | { - type: "getFileReferences"; - fileName: ArrayOrSingle; - } | { - type: "findRenameLocations"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; - options?: RenameOptions; - } | { - type: "documentHighlights"; - markerOrRange?: ArrayOrSingle; - rangeText?: ArrayOrSingle; - options?: VerifyDocumentHighlightsOptions; - } | { - type: "customWork"; - work: () => string | undefined; - }; } /** Wraps a diagnostic message to be compared ignoring interpolated strings */ declare function ignoreInterpolations(diagnostic: string | ts.DiagnosticMessage): FourSlashInterface.DiagnosticIgnoredInterpolations; diff --git a/tests/cases/fourslash/getOccurrencesAbstract02.ts b/tests/cases/fourslash/getOccurrencesAbstract02.ts index 32c212a5eda..5c3557dd9ec 100644 --- a/tests/cases/fourslash/getOccurrencesAbstract02.ts +++ b/tests/cases/fourslash/getOccurrencesAbstract02.ts @@ -11,7 +11,5 @@ //// abstract bar(): void; ////} -verify.baselineCommands( - { type: "documentHighlights", markerOrRange: ["1", "2"] }, - { type: "documentHighlights" } -); \ No newline at end of file +verify.baselineDocumentHighlights(["1", "2"]); +verify.baselineDocumentHighlights(); diff --git a/tests/cases/fourslash/getOccurrencesAfterEdit.ts b/tests/cases/fourslash/getOccurrencesAfterEdit.ts index 80f65974fce..c442d0460c7 100644 --- a/tests/cases/fourslash/getOccurrencesAfterEdit.ts +++ b/tests/cases/fourslash/getOccurrencesAfterEdit.ts @@ -8,15 +8,7 @@ //// x.f/*1*/oo ////} -verify.baselineCommands( - { type: "documentHighlights", markerOrRange: "1" }, - { - type: "customWork", - work: () => { - goTo.marker("0"); - edit.insert("\n"); - return "Added new line"; - }, - }, - { type: "documentHighlights", markerOrRange: "1" }, -); \ No newline at end of file +verify.baselineDocumentHighlights("1"); +goTo.marker("0"); +edit.insert("\n"); +verify.baselineDocumentHighlights("1"); diff --git a/tests/cases/fourslash/getOccurrencesConst01.ts b/tests/cases/fourslash/getOccurrencesConst01.ts index de67ff050ca..5f952849461 100644 --- a/tests/cases/fourslash/getOccurrencesConst01.ts +++ b/tests/cases/fourslash/getOccurrencesConst01.ts @@ -7,7 +7,5 @@ //// /////*2*/const c = 0; -verify.baselineCommands( - { type: "documentHighlights" }, - { type: "documentHighlights", markerOrRange: "2" } -); \ No newline at end of file +verify.baselineDocumentHighlights(); +verify.baselineDocumentHighlights("2"); diff --git a/tests/cases/fourslash/getOccurrencesConst02.ts b/tests/cases/fourslash/getOccurrencesConst02.ts index 5c16fb94512..8b0d759f617 100644 --- a/tests/cases/fourslash/getOccurrencesConst02.ts +++ b/tests/cases/fourslash/getOccurrencesConst02.ts @@ -10,7 +10,5 @@ ////declare [|const|] enum E { ////} -verify.baselineCommands( - { type: "documentHighlights" }, // They are in different scopes, so not counted together. - { type: "documentHighlights", markerOrRange: test.markers() }, -); \ No newline at end of file +verify.baselineDocumentHighlights(); // They are in different scopes, so not counted together. +verify.baselineDocumentHighlights(test.markers()); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesConst03.ts b/tests/cases/fourslash/getOccurrencesConst03.ts index 6403ffefcad..d596512c610 100644 --- a/tests/cases/fourslash/getOccurrencesConst03.ts +++ b/tests/cases/fourslash/getOccurrencesConst03.ts @@ -10,7 +10,5 @@ ////export [|const|] enum E { ////} -verify.baselineCommands( - { type: "documentHighlights" }, // They are in different scopes, so not counted together. - { type: "documentHighlights", markerOrRange: test.markers() }, -); \ No newline at end of file +verify.baselineDocumentHighlights(); // They are in different scopes, so not counted together. +verify.baselineDocumentHighlights(test.markers()); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesIfElseBroken.ts b/tests/cases/fourslash/getOccurrencesIfElseBroken.ts index 6bd57a42b9d..c15cd7f0de5 100644 --- a/tests/cases/fourslash/getOccurrencesIfElseBroken.ts +++ b/tests/cases/fourslash/getOccurrencesIfElseBroken.ts @@ -12,7 +12,5 @@ // It would be nice if in the future, // We could include that last 'else'. -verify.baselineCommands( - { type: "documentHighlights" }, - { type: "documentHighlights", markerOrRange: "" } -); \ No newline at end of file +verify.baselineDocumentHighlights(); +verify.baselineDocumentHighlights(""); diff --git a/tests/cases/fourslash/getOccurrencesReadonly3.ts b/tests/cases/fourslash/getOccurrencesReadonly3.ts index 6664c4a8d61..c6512fddcf1 100644 --- a/tests/cases/fourslash/getOccurrencesReadonly3.ts +++ b/tests/cases/fourslash/getOccurrencesReadonly3.ts @@ -9,7 +9,5 @@ //// } ////} -verify.baselineCommands( - { type: "documentHighlights" }, - { type: "documentHighlights", markerOrRange: "" }, -); \ No newline at end of file +verify.baselineDocumentHighlights(); +verify.baselineDocumentHighlights(""); diff --git a/tests/cases/fourslash/getOccurrencesReturnBroken.ts b/tests/cases/fourslash/getOccurrencesReturnBroken.ts index 6e847827ba3..1b0a622ff77 100644 --- a/tests/cases/fourslash/getOccurrencesReturnBroken.ts +++ b/tests/cases/fourslash/getOccurrencesReturnBroken.ts @@ -30,7 +30,5 @@ // where if an arrow function starts with a statement, we try to parse a body // as if it was missing curly braces. If the behavior changes in the future, // a change to this test is very much welcome. -verify.baselineCommands( - { type: "documentHighlights" }, - { type: "documentHighlights", markerOrRange: test.markers() }, -); \ No newline at end of file +verify.baselineDocumentHighlights(); +verify.baselineDocumentHighlights(test.markers()); diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts index 1decee7fff1..bca33e69ca0 100644 --- a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts @@ -10,7 +10,5 @@ //// contin/*2*/ue foo; ////} -verify.baselineCommands( - { type: "documentHighlights" }, - { type: "documentHighlights", markerOrRange: test.markers() }, -); +verify.baselineDocumentHighlights(); +verify.baselineDocumentHighlights(test.markers()); diff --git a/tests/cases/fourslash/goToTypeDefinition4.ts b/tests/cases/fourslash/goToTypeDefinition4.ts index 21a6404b719..b94a7164960 100644 --- a/tests/cases/fourslash/goToTypeDefinition4.ts +++ b/tests/cases/fourslash/goToTypeDefinition4.ts @@ -8,7 +8,5 @@ ////import { T } from "./foo"; ////let x: [|/*reference*/T|]; -verify.baselineCommands( - { type: "goToType", markerOrRange: "reference" }, - { type: "goToDefinition", markerOrRange: "reference" }, -); \ No newline at end of file +verify.baselineGoToType("reference"); +verify.baselineGoToDefinition("reference"); diff --git a/tests/cases/fourslash/hoverOverComment.ts b/tests/cases/fourslash/hoverOverComment.ts index 5d4d2e48278..215557faf15 100644 --- a/tests/cases/fourslash/hoverOverComment.ts +++ b/tests/cases/fourslash/hoverOverComment.ts @@ -6,7 +6,5 @@ goTo.marker(); verify.quickInfoIs(""); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: "" }, - { type: "getDefinitionAtPosition", markerOrRange: "" }, -); +verify.baselineFindAllReferences(""); +verify.baselineGetDefinitionAtPosition(""); \ No newline at end of file diff --git a/tests/cases/fourslash/jsDocServices.ts b/tests/cases/fourslash/jsDocServices.ts index e0cb13d35b2..82efc3e7e83 100644 --- a/tests/cases/fourslash/jsDocServices.ts +++ b/tests/cases/fourslash/jsDocServices.ts @@ -17,10 +17,8 @@ const ranges = [r0, r1, r2]; goTo.marker("use"); verify.quickInfoIs("(parameter) foo: I", "I pity the foo"); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ["use", "def", "use2"] }, - { type: "findRenameLocations", markerOrRange: ranges }, - { type: "documentHighlights", markerOrRange: ranges }, - { type: "goToType", markerOrRange: "use" }, - { type: "getDefinitionAtPosition", markerOrRange: "use" }, -); +verify.baselineFindAllReferences("use", "def", "use2"); +verify.baselineRename(ranges); +verify.baselineDocumentHighlights(ranges); +verify.baselineGoToType("use"); +verify.baselineGetDefinitionAtPosition("use"); diff --git a/tests/cases/fourslash/jsdocTypedefTagServices.ts b/tests/cases/fourslash/jsdocTypedefTagServices.ts index 885c85f9b43..267cdba7bbb 100644 --- a/tests/cases/fourslash/jsdocTypedefTagServices.ts +++ b/tests/cases/fourslash/jsdocTypedefTagServices.ts @@ -21,9 +21,7 @@ const desc = `type Product = { const [r0Def, ...ranges] = test.ranges(); verify.quickInfoAt("use", desc, "Doc comment"); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ["use", "def"] }, - { type: "findRenameLocations", markerOrRange: ranges }, - { type: "documentHighlights", markerOrRange: ranges }, - { type: "goToDefinition", markerOrRange: "use" }, -); +verify.baselineFindAllReferences("use", "def"); +verify.baselineRename(ranges); +verify.baselineDocumentHighlights(ranges); +verify.baselineGoToDefinition("use"); diff --git a/tests/cases/fourslash/jsxSpreadReference.ts b/tests/cases/fourslash/jsxSpreadReference.ts index 2a4b6704a08..6cb72d5d12f 100644 --- a/tests/cases/fourslash/jsxSpreadReference.ts +++ b/tests/cases/fourslash/jsxSpreadReference.ts @@ -17,7 +17,5 @@ //// [|var [|/*dst*/{| "contextRangeIndex": 0 |}nn|]: {name?: string; size?: number};|] //// var x = ; -verify.baselineCommands( - { type: "findRenameLocations", rangeText: "nn" }, - { type: "goToDefinition", markerOrRange: "src" }, -); +verify.baselineRenameAtRangesWithText("nn") +verify.baselineGoToDefinition("src"); \ No newline at end of file diff --git a/tests/cases/fourslash/qualifiedName_import-declaration-with-variable-entity-names.ts b/tests/cases/fourslash/qualifiedName_import-declaration-with-variable-entity-names.ts index e3804c7794b..1320bc09d08 100644 --- a/tests/cases/fourslash/qualifiedName_import-declaration-with-variable-entity-names.ts +++ b/tests/cases/fourslash/qualifiedName_import-declaration-with-variable-entity-names.ts @@ -13,7 +13,5 @@ goTo.marker('import'); verify.completions({ includes: { name: "x", text: "var Alpha.x: number" } }); -verify.baselineCommands( - { type: "documentHighlights", markerOrRange: "import" }, - { type: "getDefinitionAtPosition", markerOrRange: "import" }, -); \ No newline at end of file +verify.baselineDocumentHighlights("import"); +verify.baselineGetDefinitionAtPosition("import"); \ No newline at end of file diff --git a/tests/cases/fourslash/quickInfoUntypedModuleImport.ts b/tests/cases/fourslash/quickInfoUntypedModuleImport.ts index 3e741b67326..a10b260cc70 100644 --- a/tests/cases/fourslash/quickInfoUntypedModuleImport.ts +++ b/tests/cases/fourslash/quickInfoUntypedModuleImport.ts @@ -15,8 +15,5 @@ verify.quickInfoIs(""); goTo.marker("foo"); verify.quickInfoIs("import foo"); - -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['foo', 'fooModule', 'fooCall'] }, - { type: "getDefinitionAtPosition", markerOrRange: ["fooModule", "foo"] }, -); +verify.baselineFindAllReferences('foo', 'fooModule', 'fooCall'); +verify.baselineGetDefinitionAtPosition("fooModule", "foo"); diff --git a/tests/cases/fourslash/renameDefaultImport.ts b/tests/cases/fourslash/renameDefaultImport.ts index f977ee10015..ec7f0fc8239 100644 --- a/tests/cases/fourslash/renameDefaultImport.ts +++ b/tests/cases/fourslash/renameDefaultImport.ts @@ -13,8 +13,6 @@ const [CDef, C, B0Def, B0, B1] = test.ranges();; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2'] }, - { type: "findRenameLocations", markerOrRange: [C, B0, B1] }, - { type: "documentHighlights", markerOrRange: "1" }, -); +verify.baselineFindAllReferences('1', '2'); +verify.baselineRename([C, B0, B1]); +verify.baselineDocumentHighlights("1"); \ No newline at end of file diff --git a/tests/cases/fourslash/renameDefaultImportDifferentName.ts b/tests/cases/fourslash/renameDefaultImportDifferentName.ts index e3f5ddc6fb4..7315a928363 100644 --- a/tests/cases/fourslash/renameDefaultImportDifferentName.ts +++ b/tests/cases/fourslash/renameDefaultImportDifferentName.ts @@ -14,9 +14,7 @@ const [CDef, C, B0Def, B0, B1] = test.ranges(); const bRanges = [B0, B1]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2'] }, - { type: "findRenameLocations", markerOrRange: C }, - { type: "findRenameLocations", markerOrRange: bRanges }, - { type: "documentHighlights", markerOrRange: "1" }, -); +verify.baselineFindAllReferences('1', '2'); +verify.baselineRename(C); +verify.baselineRename(bRanges); +verify.baselineDocumentHighlights("1"); diff --git a/tests/cases/fourslash/renameImportAndExportInDiffFiles.ts b/tests/cases/fourslash/renameImportAndExportInDiffFiles.ts index 5a39e1cd0b4..f0b6b87482b 100644 --- a/tests/cases/fourslash/renameImportAndExportInDiffFiles.ts +++ b/tests/cases/fourslash/renameImportAndExportInDiffFiles.ts @@ -9,7 +9,5 @@ const [r0Def, r0, r1Def, r1, r2Def, r2] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2', '3'] }, - { type: "findRenameLocations", markerOrRange: [r0, r1, r2] }, -); +verify.baselineFindAllReferences('1', '2', '3'); +verify.baselineRename([r0, r1, r2]); \ No newline at end of file diff --git a/tests/cases/fourslash/renameImportOfExportEquals.ts b/tests/cases/fourslash/renameImportOfExportEquals.ts index d13e66f12ea..f1bcfb8d552 100644 --- a/tests/cases/fourslash/renameImportOfExportEquals.ts +++ b/tests/cases/fourslash/renameImportOfExportEquals.ts @@ -21,11 +21,9 @@ const aRanges = [a0, a1]; const bRanges = [b0, b1]; const xRanges = [x0, x1]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['N', 'a', 'b', 'x'] }, - { type: "findRenameLocations", markerOrRange: nRanges }, - { type: "findRenameLocations", markerOrRange: a0 }, - { type: "findRenameLocations", markerOrRange: a1 }, - { type: "findRenameLocations", markerOrRange: bRanges }, - { type: "findRenameLocations", markerOrRange: xRanges }, -); +verify.baselineFindAllReferences('N', 'a', 'b', 'x'); +verify.baselineRename(nRanges); +verify.baselineRename(a0); +verify.baselineRename(a1); +verify.baselineRename(bRanges); +verify.baselineRename(xRanges); \ No newline at end of file diff --git a/tests/cases/fourslash/renameImportOfExportEquals2.ts b/tests/cases/fourslash/renameImportOfExportEquals2.ts index 30d031dbc57..0508dad037b 100644 --- a/tests/cases/fourslash/renameImportOfExportEquals2.ts +++ b/tests/cases/fourslash/renameImportOfExportEquals2.ts @@ -16,7 +16,5 @@ ////} verify.noErrors(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ["N", "O", "P", "Q"] }, - { type: "findRenameLocations", rangeText: ["N", "O", "P", "Q"] }, -); +verify.baselineFindAllReferences("N", "O", "P", "Q"); +verify.baselineRenameAtRangesWithText(["N", "O", "P", "Q"]); \ No newline at end of file diff --git a/tests/cases/fourslash/renameImportOfReExport.ts b/tests/cases/fourslash/renameImportOfReExport.ts index a7ee2e2dc26..7fa2401e392 100644 --- a/tests/cases/fourslash/renameImportOfReExport.ts +++ b/tests/cases/fourslash/renameImportOfReExport.ts @@ -17,9 +17,7 @@ verify.noErrors(); const ranges = test.ranges(); const [r0Def, r0, r1Def, r1, r2Def, r2, r3] = ranges; const importRanges = [r2, r3]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2', '3'] }, - { type: "findRenameLocations", markerOrRange: r0 }, - { type: "findRenameLocations", markerOrRange: r1 }, - { type: "findRenameLocations", markerOrRange: importRanges }, -); +verify.baselineFindAllReferences('1', '2', '3'); +verify.baselineRename(r0); +verify.baselineRename(r1); +verify.baselineRename(importRanges); \ No newline at end of file diff --git a/tests/cases/fourslash/renameImportOfReExport2.ts b/tests/cases/fourslash/renameImportOfReExport2.ts index c27d695253f..8946379f9e3 100644 --- a/tests/cases/fourslash/renameImportOfReExport2.ts +++ b/tests/cases/fourslash/renameImportOfReExport2.ts @@ -18,9 +18,7 @@ const cRanges = ranges.get("C"); const dRanges = ranges.get("D"); const [d0, d1, d2] = dRanges; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2', '3'] }, - { type: "findRenameLocations", markerOrRange: cRanges }, - { type: "findRenameLocations", markerOrRange: d0 }, - { type: "findRenameLocations", markerOrRange: [d1, d2] }, -); +verify.baselineFindAllReferences('1', '2', '3'); +verify.baselineRename(cRanges); +verify.baselineRename(d0); +verify.baselineRename([d1, d2]); \ No newline at end of file diff --git a/tests/cases/fourslash/renameJsExports01.ts b/tests/cases/fourslash/renameJsExports01.ts index 425df3781ee..95ea21840ae 100644 --- a/tests/cases/fourslash/renameJsExports01.ts +++ b/tests/cases/fourslash/renameJsExports01.ts @@ -8,7 +8,5 @@ ////var mod = require('./a'); ////var t = mod./*1*/[|area|](10); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: '1' }, - { type: "findRenameLocations", rangeText: "area" }, -); \ No newline at end of file +verify.baselineFindAllReferences('1'); +verify.baselineRenameAtRangesWithText("area"); \ No newline at end of file diff --git a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts index 33df2bc3307..d192c92a846 100644 --- a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts +++ b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInline.ts @@ -76,9 +76,7 @@ goTo.file("/index.ts"); verify.getEmitOutput(["/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); -verify.baselineCommands( - { type: "goToImplementation", markerOrRange: "1" }, // getImplementationAtPosition - { type: "goToType", markerOrRange: "1" }, // getTypeDefinitionAtPosition, - { type: "goToDefinition", markerOrRange: "1" }, // getDefinitionAndBoundSpan - { type: "getDefinitionAtPosition", markerOrRange: "1" }, // getDefinitionAtPosition -); \ No newline at end of file +verify.baselineGoToImplementation("1");// getImplementationAtPosition +verify.baselineGoToType("1");// getTypeDefinitionAtPosition +verify.baselineGoToDefinition("1");// getDefinitionAndBoundSpan +verify.baselineGetDefinitionAtPosition("1"); // getDefinitionAtPosition \ No newline at end of file diff --git a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts index 1a9ff5f0f14..d45861f1bcf 100644 --- a/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts +++ b/tests/cases/fourslash/server/declarationMapsEnableMapping_NoInlineSources.ts @@ -77,9 +77,7 @@ goTo.file("/index.ts"); verify.getEmitOutput(["/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); -verify.baselineCommands( - { type: "goToImplementation", markerOrRange: "1" }, // getImplementationAtPosition - { type: "goToType", markerOrRange: "1" }, // getTypeDefinitionAtPosition - { type: "goToDefinition", markerOrRange: "1" }, // getDefinitionAndBoundSpan - { type: "getDefinitionAtPosition", markerOrRange: "1" }, // getDefinitionAtPosition -); \ No newline at end of file +verify.baselineGoToImplementation("1");// getImplementationAtPosition +verify.baselineGoToType("1");// getTypeDefinitionAtPosition +verify.baselineGoToDefinition("1");// getDefinitionAndBoundSpan +verify.baselineGetDefinitionAtPosition("1"); // getDefinitionAtPosition \ No newline at end of file diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts index 1286b95b2bd..89e44897191 100644 --- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts +++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping.ts @@ -75,9 +75,7 @@ goTo.file("/index.ts"); verify.getEmitOutput(["/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); -verify.baselineCommands( - { type: "goToImplementation", markerOrRange: "1" }, // getImplementationAtPosition - { type: "goToType", markerOrRange: "1" }, // getTypeDefinitionAtPosition - { type: "goToDefinition", markerOrRange: "1" }, // getDefinitionAndBoundSpan - { type: "getDefinitionAtPosition", markerOrRange: "1" }, // getDefinitionAtPosition -); +verify.baselineGoToImplementation("1");// getImplementationAtPosition +verify.baselineGoToType("1");// getTypeDefinitionAtPosition +verify.baselineGoToDefinition("1");// getDefinitionAndBoundSpan +verify.baselineGetDefinitionAtPosition("1"); // getDefinitionAtPosition \ No newline at end of file diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts index 6a3476c373b..94cecd15bf4 100644 --- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts +++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping2.ts @@ -80,9 +80,7 @@ goTo.file("/index.ts"); verify.getEmitOutput(["/dist/index.js.map", "/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); -verify.baselineCommands( - { type: "goToImplementation", markerOrRange: "1" }, // getImplementationAtPosition - { type: "goToType", markerOrRange: "1" }, // getTypeDefinitionAtPosition - { type: "goToDefinition", markerOrRange: "1" }, // getDefinitionAndBoundSpan - { type: "getDefinitionAtPosition", markerOrRange: "1" }, // getDefinitionAtPosition -); +verify.baselineGoToImplementation("1");// getImplementationAtPosition +verify.baselineGoToType("1");// getTypeDefinitionAtPosition +verify.baselineGoToDefinition("1");// getDefinitionAndBoundSpan +verify.baselineGetDefinitionAtPosition("1"); // getDefinitionAtPosition diff --git a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts index faeb064b62f..05366f5fe56 100644 --- a/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts +++ b/tests/cases/fourslash/server/declarationMapsGeneratedMapsEnableMapping3.ts @@ -76,9 +76,7 @@ goTo.file("/index.ts"); verify.getEmitOutput(["/dist/index.js", "/dist/index.d.ts.map", "/dist/index.d.ts"]); -verify.baselineCommands( - { type: "goToImplementation", markerOrRange: "1" }, // getImplementationAtPosition - { type: "goToType", markerOrRange: "1" }, // getTypeDefinitionAtPosition - { type: "goToDefinition", markerOrRange: "1" }, // getDefinitionAndBoundSpan - { type: "getDefinitionAtPosition", markerOrRange: "1" }, // getDefinitionAtPosition -); +verify.baselineGoToImplementation("1");// getImplementationAtPosition +verify.baselineGoToType("1");// getTypeDefinitionAtPosition +verify.baselineGoToDefinition("1");// getDefinitionAndBoundSpan +verify.baselineGetDefinitionAtPosition("1"); // getDefinitionAtPosition \ No newline at end of file diff --git a/tests/cases/fourslash/server/goToSource5_sameAsGoToDef1.ts b/tests/cases/fourslash/server/goToSource5_sameAsGoToDef1.ts index b70485aedcc..63e64ce0b91 100644 --- a/tests/cases/fourslash/server/goToSource5_sameAsGoToDef1.ts +++ b/tests/cases/fourslash/server/goToSource5_sameAsGoToDef1.ts @@ -13,7 +13,5 @@ //// import { a } from './a'; //// [|a/*start*/|] -verify.baselineCommands( - { type: "goToSourceDefinition", markerOrRange: "start" }, - { type: "goToDefinition", markerOrRange: "start" }, -); +verify.baselineGoToSourceDefinition("start"); +verify.baselineGoToDefinition("start"); diff --git a/tests/cases/fourslash/server/goToSource6_sameAsGoToDef2.ts b/tests/cases/fourslash/server/goToSource6_sameAsGoToDef2.ts index d3bc2852d79..304167a1502 100644 --- a/tests/cases/fourslash/server/goToSource6_sameAsGoToDef2.ts +++ b/tests/cases/fourslash/server/goToSource6_sameAsGoToDef2.ts @@ -20,8 +20,6 @@ //// import { a } from 'foo/a'; //// [|a/*start*/|] -verify.baselineCommands( - { type: "goToSourceDefinition", markerOrRange: "start" }, - { type: "goToDefinition", markerOrRange: "start" }, -); +verify.baselineGoToSourceDefinition("start"); +verify.baselineGoToDefinition("start"); diff --git a/tests/cases/fourslash/transitiveExportImports.ts b/tests/cases/fourslash/transitiveExportImports.ts index c48beac1687..33af6d354a5 100644 --- a/tests/cases/fourslash/transitiveExportImports.ts +++ b/tests/cases/fourslash/transitiveExportImports.ts @@ -21,9 +21,7 @@ const aRanges = [a0, a1]; const bRanges = [b0, c2]; const cRanges = [c0, c1]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['1', '2', '3', '4'] }, - { type: "findRenameLocations", markerOrRange: aRanges }, - { type: "findRenameLocations", markerOrRange: bRanges }, - { type: "findRenameLocations", markerOrRange: cRanges }, -); +verify.baselineFindAllReferences('1', '2', '3', '4'); +verify.baselineRename(aRanges); +verify.baselineRename(bRanges); +verify.baselineRename(cRanges); \ No newline at end of file diff --git a/tests/cases/fourslash/transitiveExportImports2.ts b/tests/cases/fourslash/transitiveExportImports2.ts index f028ffe1344..31dbd3cdc87 100644 --- a/tests/cases/fourslash/transitiveExportImports2.ts +++ b/tests/cases/fourslash/transitiveExportImports2.ts @@ -19,9 +19,7 @@ const aRanges = [A0, A1]; const bRanges = [B0, B1]; const cRanges = [B2]; -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ["A", "B", "C"] }, - { type: "findRenameLocations", markerOrRange: aRanges }, - { type: "findRenameLocations", markerOrRange: [B0, B1] }, - { type: "findRenameLocations", markerOrRange: B2 }, -); \ No newline at end of file +verify.baselineFindAllReferences("A", "B", "C"); +verify.baselineRename(aRanges); +verify.baselineRename([B0, B1]); +verify.baselineRename(B2); \ No newline at end of file diff --git a/tests/cases/fourslash/transitiveExportImports3.ts b/tests/cases/fourslash/transitiveExportImports3.ts index a1b5555dcd3..15e64f7add5 100644 --- a/tests/cases/fourslash/transitiveExportImports3.ts +++ b/tests/cases/fourslash/transitiveExportImports3.ts @@ -11,10 +11,8 @@ verify.noErrors(); const [f0Def, f0, f1Def, f1, g0, f2Def, f2, g1Def, g1] = test.ranges(); -verify.baselineCommands( - { type: "findAllReferences", markerOrRange: ['f', 'g0', 'g1', 'f2'] }, - { type: "findRenameLocations", markerOrRange: [f0, f1] }, - { type: "findRenameLocations", markerOrRange: f2 }, - { type: "findRenameLocations", markerOrRange: g0 }, - { type: "findRenameLocations", markerOrRange: g1 }, -); +verify.baselineFindAllReferences('f', 'g0', 'g1', 'f2'); +verify.baselineRename([f0, f1]); +verify.baselineRename(f2); +verify.baselineRename(g0); +verify.baselineRename(g1);