diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 227d3b5a3983f..5b03fe49694f4 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -936,7 +936,8 @@ export function getResolutionModeOverrideForClause(clause: AssertClause | undefi return elem.value.text === "import" ? ModuleKind.ESNext : ModuleKind.CommonJS; } -const emptyResolution: ResolvedModuleWithFailedLookupLocations & ResolvedTypeReferenceDirectiveWithFailedLookupLocations = { +/** @internal */ +export const emptyResolution: ResolvedModuleWithFailedLookupLocations & ResolvedTypeReferenceDirectiveWithFailedLookupLocations = { resolvedModule: undefined, resolvedTypeReferenceDirective: undefined, }; @@ -1101,13 +1102,21 @@ function forEachProjectReference( /** @internal */ export const inferredTypesContainingFile = "__inferred type names__.ts"; +/** @internal */ +export function getAutomaticTypeDirectiveContainingFile(options: CompilerOptions, currentDirectory: string) { + // This containingFilename needs to match with the one used in managed-side + const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; + return combinePaths(containingDirectory, inferredTypesContainingFile); +} + /** @internal */ export function getInferredLibraryNameResolveFrom(options: CompilerOptions, currentDirectory: string, libFileName: string) { const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; return combinePaths(containingDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`); } -function getLibraryNameFromLibFileName(libFileName: string) { +/** @internal */ +export function getLibraryNameFromLibFileName(libFileName: string) { // Support resolving to lib.dom.d.ts -> @typescript/lib-dom, and // lib.dom.iterable.d.ts -> @typescript/lib-dom/iterable // lib.es2015.symbol.wellknown.d.ts -> @typescript/lib-es2015/symbol-wellknown @@ -1496,7 +1505,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg let commonSourceDirectory: string; let typeChecker: TypeChecker; let classifiableNames: Set<__String>; - const ambientModuleNameToUnmodifiedFileName = new Map(); + let ambientModuleNameToUnmodifiedFileName: Map | undefined; let fileReasons = createMultiMap(); const cachedBindAndCheckDiagnosticsForFile: DiagnosticCache = {}; const cachedDeclarationDiagnosticsForFile: DiagnosticCache = {}; @@ -1560,6 +1569,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ) => readonly ResolvedModuleWithFailedLookupLocations[]; const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse; if (host.resolveModuleNameLiterals) { @@ -1741,10 +1751,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg automaticTypeDirectiveResolutions = createModeAwareCache(); if (automaticTypeDirectiveNames.length) { tracing?.push(tracing.Phase.Program, "processTypeReferences", { count: automaticTypeDirectiveNames.length }); - // This containingFilename needs to match with the one used in managed-side - const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; - const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile); - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, containingFilename); + const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, getAutomaticTypeDirectiveContainingFile(options, currentDirectory)); for (let i = 0; i < automaticTypeDirectiveNames.length; i++) { // under node16/nodenext module resolution, load `types`/ata include names as cjs resolution results by passing an `undefined` mode automaticTypeDirectiveResolutions.set(automaticTypeDirectiveNames[i], /*mode*/ undefined, resolutions[i]); @@ -1761,6 +1768,9 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } tracing?.pop(); } + else { + host.reusedTypeReferenceDirectiveResolutions?.(/*reusedNames*/ undefined, /*containingSourceFile*/ undefined); + } // Do not process the default library if: // - The '--noLib' flag is used. @@ -1966,13 +1976,13 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg if (fromCache) addResolutionDiagnostics(fromCache); } - function resolveModuleNamesWorker(moduleNames: readonly StringLiteralLike[], containingFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[] { + function resolveModuleNamesWorker(moduleNames: readonly StringLiteralLike[], containingFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[] { if (!moduleNames.length) return emptyArray; const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); const redirectedReference = getRedirectReferenceForResolution(containingFile); tracing?.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName }); performance.mark("beforeResolveModule"); - const result = actualResolveModuleNamesWorker(moduleNames, containingFileName, redirectedReference, options, containingFile, reusedNames); + const result = actualResolveModuleNamesWorker(moduleNames, containingFileName, redirectedReference, options, containingFile, reusedNames, ambientModuleNames); performance.mark("afterResolveModule"); performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); tracing?.pop(); @@ -2071,13 +2081,17 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } function resolveModuleNamesReusingOldState(moduleNames: readonly StringLiteralLike[], file: SourceFile): readonly ResolvedModuleWithFailedLookupLocations[] { + if (!moduleNames.length) { + host.reusedModuleResolutions?.(moduleNames, file, /*ambientModuleNames*/ undefined); + return emptyArray; + } if (structureIsReused === StructureIsReused.Not && !file.ambientModuleNames.length) { // If the old program state does not permit reusing resolutions and `file` does not contain locally defined ambient modules, // the best we can do is fallback to the default logic. - return resolveModuleNamesWorker(moduleNames, file, /*reusedNames*/ undefined); + return resolveModuleNamesWorker(moduleNames, file, /*reusedNames*/ undefined, /*ambientModuleNames*/ undefined); } - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); + const oldSourceFile = oldProgram?.getSourceFileByPath(file.path); if (oldSourceFile !== file && file.resolvedModules) { // `file` was created for the new program. // @@ -2101,6 +2115,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg /** An ordered list of module names for which we cannot recover the resolution. */ let unknownModuleNames: StringLiteralLike[] | undefined; + let unknownModuleNamesIndices: number[] | undefined; /** * The indexing of elements in this list matches that of `moduleNames`. * @@ -2112,11 +2127,10 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg */ let result: ResolvedModuleWithFailedLookupLocations[] | undefined; let reusedNames: StringLiteralLike[] | undefined; - /** A transient placeholder used to mark predicted resolution in the result list. */ - const predictedToResolveToAmbientModuleMarker: ResolvedModuleWithFailedLookupLocations = emptyResolution; + let ambientModuleNames: StringLiteralLike[] | undefined; - for (let i = 0; i < moduleNames.length; i++) { - const moduleName = moduleNames[i]; + for (let index = 0; index < moduleNames.length; index++) { + const moduleName = moduleNames[index]; // If the source file is unchanged and doesnt have invalidated resolution, reuse the module resolutions if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) { const mode = getModeForUsageLocation(file, moduleName); @@ -2133,7 +2147,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg oldResolution.resolvedModule.packageId && packageIdToString(oldResolution.resolvedModule.packageId) ); } - (result ??= new Array(moduleNames.length))[i] = oldResolution; + (result ??= new Array(moduleNames.length))[index] = oldResolution; (reusedNames ??= []).push(moduleName); continue; } @@ -2154,34 +2168,28 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } if (resolvesToAmbientModuleInNonModifiedFile) { - (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker; + // No need to resolve resolutions that are predicted to resolve to ambient modules. + (result || (result = new Array(moduleNames.length)))[index] = emptyResolution; + (ambientModuleNames ??= []).push(moduleName); } else { // Resolution failed in the old program, or resolved to an ambient module for which we can't reuse the result. (unknownModuleNames ??= []).push(moduleName); + (unknownModuleNamesIndices ??= []).push(index); } } - const resolutions = unknownModuleNames && unknownModuleNames.length - ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) - : emptyArray; - - // Combine results of resolutions and predicted results - if (!result) { - // There were no unresolved/ambient resolutions. - Debug.assert(resolutions.length === moduleNames.length); - return resolutions; + if (!unknownModuleNames) { + host.reusedModuleResolutions?.(reusedNames, file, ambientModuleNames); + return result!; } - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } - } - Debug.assert(j === resolutions.length); + const resolutions = resolveModuleNamesWorker(unknownModuleNames, file, reusedNames, ambientModuleNames); + if (!result) return resolutions; + resolutions.forEach((resolution, index) => { + result![unknownModuleNamesIndices![index]] = resolution; + }); return result; // If we change our policy of rechecking failed lookups on each program create, @@ -2189,7 +2197,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName: StringLiteralLike): boolean { const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName)); const resolvedFile = resolutionToFile && oldProgram!.getSourceFile(resolutionToFile.resolvedFileName); - if (resolutionToFile && resolvedFile) { + if (resolvedFile) { // In the old program, we resolved to an ambient module that was in the same // place as we expected to find an actual module file. // We actually need to return 'false' here even though this seems like a 'true' case @@ -2198,7 +2206,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } // at least one of declarations should come from non-modified source file - const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName.text); + const unmodifiedFile = ambientModuleNameToUnmodifiedFileName?.get(moduleName.text); if (!unmodifiedFile) { return false; @@ -2214,6 +2222,11 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames: readonly FileReference[], containingFile: SourceFile): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames: string[], containingFile: string): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames: readonly T[], containingFile: string | SourceFile): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[] { + const containingSourceFile = !isString(containingFile) ? containingFile : undefined; + if (!typeDirectiveNames.length) { + host.reusedTypeReferenceDirectiveResolutions?.(typeDirectiveNames, containingSourceFile); + return emptyArray; + } if (structureIsReused === StructureIsReused.Not) { // If the old program state does not permit reusing resolutions and `file` does not contain locally defined ambient modules, // the best we can do is fallback to the default logic. @@ -2243,14 +2256,14 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg /** An ordered list of module names for which we cannot recover the resolution. */ let unknownTypeReferenceDirectiveNames: T[] | undefined; + let unknownTypeReferenceDirectiveNamesIndices: number[] | undefined; let result: ResolvedTypeReferenceDirectiveWithFailedLookupLocations[] | undefined; let reusedNames: T[] | undefined; - const containingSourceFile = !isString(containingFile) ? containingFile : undefined; const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath(containingFile)); - for (let i = 0; i < typeDirectiveNames.length; i++) { - const entry = typeDirectiveNames[i]; + for (let index = 0; index < typeDirectiveNames.length; index++) { + const entry = typeDirectiveNames[index]; if (canReuseResolutions) { const typeDirectiveName = getTypeReferenceResolutionName(entry); const mode = getModeForFileReference(entry, containingSourceFile?.impliedNodeFormat); @@ -2267,37 +2280,30 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg oldResolution.resolvedTypeReferenceDirective.packageId && packageIdToString(oldResolution.resolvedTypeReferenceDirective.packageId) ); } - (result ??= new Array(typeDirectiveNames.length))[i] = oldResolution; + (result ??= new Array(typeDirectiveNames.length))[index] = oldResolution; (reusedNames ??= []).push(entry); continue; } } // Resolution failed in the old program, or resolved to an ambient module for which we can't reuse the result. (unknownTypeReferenceDirectiveNames ??= []).push(entry); + (unknownTypeReferenceDirectiveNamesIndices ??= []).push(index); } - if (!unknownTypeReferenceDirectiveNames) return result || emptyArray; + if (!unknownTypeReferenceDirectiveNames) { + host.reusedTypeReferenceDirectiveResolutions?.(reusedNames, containingSourceFile); + return result!; + } const resolutions = resolveTypeReferenceDirectiveNamesWorker( unknownTypeReferenceDirectiveNames, containingFile, reusedNames, ); + if (!result) return resolutions; - // Combine results of resolutions - if (!result) { - // There were no unresolved resolutions. - Debug.assert(resolutions.length === typeDirectiveNames.length); - return resolutions; - } - - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } - } - Debug.assert(j === resolutions.length); + resolutions.forEach((resolution, index) => { + result![unknownTypeReferenceDirectiveNamesIndices![index]] = resolution; + }); return result; } @@ -2355,7 +2361,9 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg // check if program source files has changed in the way that can affect structure of the program const newSourceFiles: SourceFile[] = []; - const modifiedSourceFiles: { oldFile: SourceFile, newFile: SourceFile }[] = []; + const filesToReResolveResolutions = new Set(); + // Temparaory cache of ambient module names to file name and set to use only if we can reuse program structure safely for modules + const ambientModuleNameToUnmodifiedFileNameProcessing = new Map(); structureIsReused = StructureIsReused.Completely; // If the missing file paths are now present, it can change the progam structure, @@ -2464,34 +2472,33 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } // tentatively approve the file - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + filesToReResolveResolutions.add(newSourceFile); } - else if (hasInvalidatedResolutions(oldSourceFile.path)) { - // 'module/types' references could have changed - structureIsReused = StructureIsReused.SafeModules; + else { + for (const moduleName of oldSourceFile.ambientModuleNames) { + ambientModuleNameToUnmodifiedFileNameProcessing.set(moduleName, oldSourceFile.fileName); + } + if (hasInvalidatedResolutions(oldSourceFile.path)) { + // 'module/types' references could have changed + structureIsReused = StructureIsReused.SafeModules; - // add file to the modified list so that we will resolve it later - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + // add file to the modified list so that we will resolve it later + filesToReResolveResolutions.add(newSourceFile); + } } // if file has passed all checks it should be safe to reuse it newSourceFiles.push(newSourceFile); } + ambientModuleNameToUnmodifiedFileName = ambientModuleNameToUnmodifiedFileNameProcessing; if (structureIsReused !== StructureIsReused.Completely) { return structureIsReused; } - const modifiedFiles = modifiedSourceFiles.map(f => f.oldFile); - for (const oldFile of oldSourceFiles) { - if (!contains(modifiedFiles, oldFile)) { - for (const moduleName of oldFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldFile.fileName); - } - } - } // try to verify results of module resolution - for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { + for (const newSourceFile of filesToReResolveResolutions) { + const oldSourceFile = oldProgram.getSourceFileByPath(newSourceFile.path)!; const moduleNames = getModuleNames(newSourceFile); const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); // ensure that module resolution results are still correct @@ -3813,6 +3820,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg const typeDirectives = file.typeReferenceDirectives; if (!typeDirectives.length) { file.resolvedTypeReferenceDirectiveNames = undefined; + host.reusedTypeReferenceDirectiveResolutions?.(/*reusedNames*/ undefined, file); return; } @@ -4049,6 +4057,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg else { // no imports - drop cached module resolutions file.resolvedModules = undefined; + host.reusedModuleResolutions?.(/*reusedNames*/ undefined, file, /*ambientModuleNames*/ undefined); } } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index bf7972763a568..81e0a0610ff89 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -4,10 +4,10 @@ import { clearMap, closeFileWatcher, closeFileWatcherOf, + CompilerHostSupportingResolutionCache, CompilerOptions, createModeAwareCache, createModuleResolutionCache, - createMultiMap, createTypeReferenceDirectiveResolutionCache, createTypeReferenceResolutionLoader, Debug, @@ -23,6 +23,7 @@ import { FileWatcher, FileWatcherCallback, firstDefinedIterator, + getAutomaticTypeDirectiveContainingFile, GetCanonicalFileName, getDirectoryPath, getEffectiveTypeRoots, @@ -54,6 +55,7 @@ import { normalizePath, PackageId, packageIdToString, + PackageJsonInfo, parseNodeModuleFromPath, Path, PathPathComponents, @@ -63,6 +65,7 @@ import { resolutionExtensionIsTSOrJson, ResolutionLoader, ResolutionMode, + ResolutionNameAndModeGetter, ResolvedModuleWithFailedLookupLocations, ResolvedProjectReference, ResolvedTypeReferenceDirectiveWithFailedLookupLocations, @@ -75,6 +78,7 @@ import { stringContains, StringLiteralLike, trace, + typeReferenceResolutionNameAndModeGetter, updateResolutionField, WatchDirectoryFlags, } from "./_namespaces/ts"; @@ -89,10 +93,27 @@ export interface HasInvalidatedFromResolutionCache { * * @internal */ -export interface ResolutionCache { +export interface ResolutionCache extends Required { + rootDirForResolution: string; + resolvedModuleNames: Map>; + resolvedTypeReferenceDirectives: Map>; + resolvedLibraries: Map; + resolvedFileToResolution: Map>; + resolutionsWithFailedLookups: Set; + resolutionsWithOnlyAffectingLocations: Set; + directoryWatchesOfFailedLookups: Map; + fileWatchesOfAffectingLocations: Map; startRecordingFilesWithChangedResolutions(): void; finishRecordingFilesWithChangedResolutions(): Path[] | undefined; + watchFailedLookupLocationsOfExternalModuleResolutions( + name: string, + resolution: T, + filePath: Path, + getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + deferWatchingNonRelativeResolution: boolean, + ): void; + resolveModuleNameLiterals( moduleLiterals: readonly StringLiteralLike[], containingFile: string, @@ -100,6 +121,7 @@ export interface ResolutionCache { options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences( typeDirectiveReferences: readonly T[], @@ -122,7 +144,7 @@ export interface ResolutionCache { invalidateResolutionsOfFailedLookupLocations(): boolean; invalidateResolutionOfFile(filePath: Path): void; - removeResolutionsOfFile(filePath: Path): void; + removeResolutionsOfFile(filePath: Path, syncDirWatcherRemove?: boolean): void; removeResolutionsFromProjectReferenceRedirects(filePath: Path): void; setFilesWithInvalidatedNonRelativeUnresolvedImports(filesWithUnresolvedImports: Map): void; createHasInvalidatedResolutions( @@ -156,7 +178,8 @@ export interface ResolutionWithFailedLookupLocations { node10Result?: string; } -interface ResolutionWithResolvedFileName { +/** @internal */ +export interface ResolutionWithResolvedFileName { resolvedFileName: string | undefined; packageId?: PackageId; } @@ -165,7 +188,8 @@ interface ResolutionWithResolvedFileName { export interface CachedResolvedModuleWithFailedLookupLocations extends ResolvedModuleWithFailedLookupLocations, ResolutionWithFailedLookupLocations { } -interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations { +/** @internal */ +export interface CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations extends ResolvedTypeReferenceDirectiveWithFailedLookupLocations, ResolutionWithFailedLookupLocations { } /** @internal */ @@ -189,15 +213,17 @@ export interface ResolutionCacheHost extends MinimalResolutionCacheHost { onDiscoveredSymlink?(): void; } -interface FileWatcherOfAffectingLocation { +/** @internal */ +export interface FileWatcherOfAffectingLocation { /** watcher for the lookup */ watcher: FileWatcher; resolutions: number; files: number; - paths: Set; + symlinks: Set | undefined; } -interface DirectoryWatchesOfFailedLookup { +/** @internal */ +export interface DirectoryWatchesOfFailedLookup { /** watcher for the lookup */ watcher: FileWatcher; /** ref count keeping this watch alive */ @@ -410,7 +436,65 @@ export function getRootPathSplitLength(rootPath: Path) { return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0); } -type GetResolutionWithResolvedFileName = +/** @internal */ +export function createModuleResolutionLoaderUsingGlobalCache( + containingFile: string, + redirectedReference: ResolvedProjectReference | undefined, + options: CompilerOptions, + resolutionHost: ResolutionCacheHost, + moduleResolutionCache: ModuleResolutionCache, +): ResolutionLoader { + return { + nameAndMode: moduleResolutionNameAndModeGetter, + resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache( + resolutionHost, + moduleResolutionCache, + moduleName, + containingFile, + options, + redirectedReference, + resoluionMode, + ), + }; +} + +function resolveModuleNameUsingGlobalCache( + resolutionHost: ResolutionCacheHost, + moduleResolutionCache: ModuleResolutionCache, + moduleName: string, + containingFile: string, + compilerOptions: CompilerOptions, + redirectedReference?: ResolvedProjectReference, + mode?: ResolutionMode, +): ResolvedModuleWithFailedLookupLocations { + const host = resolutionHost.getCompilerHost?.() || resolutionHost; + const result = ts_resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); + // try to load typings from @types + const globalCache = resolutionHost.getGlobalCache?.(); + if (globalCache !== undefined && !isExternalModuleNameRelative(moduleName) && !(result.resolvedModule && extensionIsTS(result.resolvedModule.extension))) { + // create different collection of failed lookup locations for second pass + // if it will fail and we've already found something during the first pass - we don't want to pollute its results + const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( + Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), + resolutionHost.projectName, + compilerOptions, + host, + globalCache, + moduleResolutionCache, + ); + if (resolvedModule) { + // Modify existing resolution so its saved in the directory cache as well + (result.resolvedModule as any) = resolvedModule; + result.failedLookupLocations = updateResolutionField(result.failedLookupLocations, failedLookupLocations); + result.affectingLocations = updateResolutionField(result.affectingLocations, affectingLocations); + result.resolutionDiagnostics = updateResolutionField(result.resolutionDiagnostics, resolutionDiagnostics); + } + } + return result; +} + +/** @internal */ +export type GetResolutionWithResolvedFileName = (resolution: T) => R | undefined; /** @internal */ @@ -418,11 +502,11 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD let filesWithChangedSetOfUnresolvedImports: Path[] | undefined; let filesWithInvalidatedResolutions: Set | undefined; let filesWithInvalidatedNonRelativeUnresolvedImports: ReadonlyMap | undefined; - const nonRelativeExternalModuleResolutions = createMultiMap(); + const nonRelativeExternalModuleResolutions = new Set(); const resolutionsWithFailedLookups = new Set(); const resolutionsWithOnlyAffectingLocations = new Set(); - const resolvedFileToResolution = new Map>(); + const resolvedFileToResolution = new Map>(); const impliedFormatPackageJsons = new Map(); let hasChangedAutomaticTypeDirectiveNames = false; @@ -462,7 +546,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD moduleResolutionCache.getPackageJsonInfoCache(), ); - const directoryWatchesOfFailedLookups = new Map(); + const directoryWatchesOfFailedLookups = new Map(); const fileWatchesOfAffectingLocations = new Map(); const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory); const rootPath = resolutionHost.toPath(rootDir); @@ -472,6 +556,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD const typeRootsWatches = new Map(); return { + rootDirForResolution, + resolvedModuleNames, + resolvedTypeReferenceDirectives, + resolvedLibraries, + resolvedFileToResolution, + resolutionsWithFailedLookups, + resolutionsWithOnlyAffectingLocations, + directoryWatchesOfFailedLookups, + fileWatchesOfAffectingLocations, + watchFailedLookupLocationsOfExternalModuleResolutions, getModuleResolutionCache: () => moduleResolutionCache, startRecordingFilesWithChangedResolutions, finishRecordingFilesWithChangedResolutions, @@ -485,6 +579,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolveSingleModuleNameWithoutWatching, removeResolutionsFromProjectReferenceRedirects, removeResolutionsOfFile, + reusedModuleResolutions, + reusedTypeReferenceDirectiveResolutions, hasChangedAutomaticTypeDirectiveNames: () => hasChangedAutomaticTypeDirectiveNames, invalidateResolutionOfFile, invalidateResolutionsOfFailedLookupLocations, @@ -583,8 +679,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); + watchFailedLookupLocationOfNonRelativeModuleResolutions(); } function cleanupLibResolutionWatching(newProgram: Program | undefined) { @@ -592,7 +687,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD if (!newProgram?.resolvedLibReferences?.has(libFileName)) { stopWatchFailedLookupLocationOfResolution( resolution, - resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram!.getCompilerOptions(), getCurrentDirectory(), libFileName)), + resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), getResolvedModule, ); resolvedLibraries.delete(libFileName); @@ -603,8 +698,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD function finishCachingPerDirectoryResolution(newProgram: Program | undefined, oldProgram: Program | undefined) { filesWithInvalidatedNonRelativeUnresolvedImports = undefined; allModuleAndTypeResolutionsAreInvalidated = false; - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); + watchFailedLookupLocationOfNonRelativeModuleResolutions(); // Update file watches if (newProgram !== oldProgram) { cleanupLibResolutionWatching(newProgram); @@ -629,72 +723,23 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } }); } - directoryWatchesOfFailedLookups.forEach((watcher, path) => { - if (watcher.refCount === 0) { - directoryWatchesOfFailedLookups.delete(path); - watcher.watcher.close(); - } - }); - fileWatchesOfAffectingLocations.forEach((watcher, path) => { - if (watcher.files === 0 && watcher.resolutions === 0) { - fileWatchesOfAffectingLocations.delete(path); - watcher.watcher.close(); - } - }); - + directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup); + fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation); hasChangedAutomaticTypeDirectiveNames = false; } - function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, redirectedReference?: ResolvedProjectReference, mode?: ResolutionMode): CachedResolvedModuleWithFailedLookupLocations { - const host = resolutionHost.getCompilerHost?.() || resolutionHost; - const primaryResult = ts_resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - // return result immediately only if global cache support is not enabled or if it is .ts, .tsx or .d.ts - if (!resolutionHost.getGlobalCache) { - return primaryResult; - } - - // otherwise try to load typings from @types - const globalCache = resolutionHost.getGlobalCache(); - if (globalCache !== undefined && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { - // create different collection of failed lookup locations for second pass - // if it will fail and we've already found something during the first pass - we don't want to pollute its results - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( - Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), - resolutionHost.projectName, - compilerOptions, - host, - globalCache, - moduleResolutionCache, - ); - if (resolvedModule) { - // Modify existing resolution so its saved in the directory cache as well - (primaryResult.resolvedModule as any) = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); - return primaryResult; - } + function closeDirectoryWatchesOfFailedLookup(watcher: DirectoryWatchesOfFailedLookup, path: Path) { + if (watcher.refCount === 0) { + directoryWatchesOfFailedLookups.delete(path); + watcher.watcher.close(); } - - // Default return the result from the first pass - return primaryResult; } - function createModuleResolutionLoader( - containingFile: string, - redirectedReference: ResolvedProjectReference | undefined, - options: CompilerOptions, - ): ResolutionLoader { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resoluionMode) => resolveModuleName( - moduleName, - containingFile, - options, - redirectedReference, - resoluionMode, - ), - }; + function closeFileWatcherOfAffectingLocation(watcher: FileWatcherOfAffectingLocation, path: string) { + if (watcher.files === 0 && watcher.resolutions === 0 && !watcher.symlinks?.size) { + fileWatchesOfAffectingLocations.delete(path); + watcher.watcher.close(); + } } interface ResolveNamesWithLocalCacheInput { @@ -703,7 +748,8 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD containingSourceFile: SourceFile; redirectedReference: ResolvedProjectReference | undefined; options: CompilerOptions; - reusedNames?: readonly Entry[]; + reusedNames: readonly Entry[] | undefined; + ambientModuleNames?: readonly Entry[] | undefined, perFileCache: Map>; loader: ResolutionLoader; getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName; @@ -713,7 +759,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } function resolveNamesWithLocalCache({ entries, containingFile, containingSourceFile, redirectedReference, options, - perFileCache, reusedNames, + perFileCache, reusedNames, ambientModuleNames, loader, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution, shouldRetryResolution, logChanges, }: ResolveNamesWithLocalCacheInput): readonly T[] { @@ -745,9 +791,11 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolutionHost.onDiscoveredSymlink(); } resolutionsInFile.set(name, mode, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + if (resolution !== existingResolution) { + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); + if (existingResolution) { + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + } } if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { @@ -784,20 +832,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD seenNamesInFile.set(name, mode, true); resolvedModules.push(resolution); } - reusedNames?.forEach(entry => seenNamesInFile.set( - loader.nameAndMode.getName(entry), - loader.nameAndMode.getMode(entry, containingSourceFile), - true, - )); - if (resolutionsInFile.size() !== seenNamesInFile.size()) { - // Stop watching and remove the unused name - resolutionsInFile.forEach((resolution, name, mode) => { - if (!seenNamesInFile.has(name, mode)) { - stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); - resolutionsInFile.delete(name, mode); - } - }); - } + reuseResolutionsWorker( + reusedNames, + containingSourceFile, + path, + resolutionsInFile, + seenNamesInFile, + loader.nameAndMode, + getResolutionWithResolvedFileName, + ambientModuleNames, + ); return resolvedModules; function resolutionIsEqualTo(oldResolution: T | undefined, newResolution: T | undefined): boolean { @@ -855,6 +899,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ): readonly ResolvedModuleWithFailedLookupLocations[] { return resolveNamesWithLocalCache({ entries: moduleLiterals, @@ -863,11 +908,14 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD redirectedReference, options, reusedNames, + ambientModuleNames, perFileCache: resolvedModuleNames, - loader: createModuleResolutionLoader( + loader: createModuleResolutionLoaderUsingGlobalCache( containingFile, redirectedReference, options, + resolutionHost, + moduleResolutionCache, ), getResolutionWithResolvedFileName: getResolvedModule, shouldRetryResolution: resolution => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), @@ -914,12 +962,105 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD return resolution; } + function reuseResolutionsWorker( + reusedNames: readonly Entry[] | undefined, + containingSourceFile: SourceFile, + path: Path, + resolutionsInFile: ModeAwareCache, + seenNamesInFile: ModeAwareCache, + nameAndModeGetter: ResolutionNameAndModeGetter, + getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + ambientModuleNames: readonly Entry[] | undefined, + ) { + reusedNames?.forEach(entry => seenNamesInFile.set( + nameAndModeGetter.getName(entry), + nameAndModeGetter.getMode(entry, containingSourceFile), + true, + )); + // For ambient module names, if its not invalidated keep it + ambientModuleNames?.forEach(entry => { + const name = nameAndModeGetter.getName(entry); + const mode = nameAndModeGetter.getMode(entry, containingSourceFile); + if (!seenNamesInFile.has(name, mode)) { + const resolution = resolutionsInFile.get(name, mode); + // Keep this resolution from old time for ambient module names + if (resolution && !resolution.isInvalidated) { + seenNamesInFile.set(name, mode, true); + } + } + }); + if (resolutionsInFile.size() !== seenNamesInFile.size()) { + // Stop watching and remove the unused name + resolutionsInFile.forEach((resolution, name, mode) => { + if (!seenNamesInFile.has(name, mode)) { + stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); + resolutionsInFile.delete(name, mode); + } + }); + } + } + + function reuseResolutions( + reusedNames: readonly Entry[] | undefined, + containingSourceFile: SourceFile, + path: Path, + perFileCache: Map>, + nameAndModeGetter: ResolutionNameAndModeGetter, + getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + ambientModuleNames?: readonly Entry[] | undefined, + ) { + const resolutionsInFile = perFileCache.get(path); + if (!resolutionsInFile) return; + const seenNamesInFile = createModeAwareCache(); + reuseResolutionsWorker( + reusedNames, + containingSourceFile, + path, resolutionsInFile, + seenNamesInFile, + nameAndModeGetter, + getResolutionWithResolvedFileName, + ambientModuleNames, + ); + } + + function reusedModuleResolutions( + reusedNames: readonly StringLiteralLike[] | undefined, + containingSourceFile: SourceFile, + ambientModuleNames: readonly StringLiteralLike[] | undefined, + ) { + reuseResolutions( + reusedNames, + containingSourceFile, + containingSourceFile.path, + resolvedModuleNames, + moduleResolutionNameAndModeGetter, + getResolvedModule, + ambientModuleNames, + ); + } + + function reusedTypeReferenceDirectiveResolutions( + reusedNames: readonly T[] | undefined, + containingSourceFile: SourceFile | undefined, + ) { + reuseResolutions( + reusedNames, + containingSourceFile, + containingSourceFile ? + containingSourceFile.path : + resolutionHost.toPath(getAutomaticTypeDirectiveContainingFile(resolutionHost.getCompilationSettings(), getCurrentDirectory())), + resolvedTypeReferenceDirectives, + typeReferenceResolutionNameAndModeGetter, + getResolvedTypeReferenceDirective, + ); + } + function resolveSingleModuleNameWithoutWatching(moduleName: string, containingFile: string) { const path = resolutionHost.toPath(containingFile); const resolutionsInFile = resolvedModuleNames.get(path); const resolution = resolutionsInFile?.get(moduleName, /*mode*/ undefined); if (resolution && !resolution.isInvalidated) return resolution; - return resolveModuleName(moduleName, containingFile, resolutionHost.getCompilationSettings()); + return resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, resolutionHost.getCompilationSettings()); } function isNodeModulesAtTypesDirectory(dirPath: Path) { @@ -944,7 +1085,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD watchFailedLookupLocationOfResolution(resolution); } else { - nonRelativeExternalModuleResolutions.add(name, resolution); + nonRelativeExternalModuleResolutions.add(resolution); } const resolved = getResolutionWithResolvedFileName(resolution); if (resolved && resolved.resolvedFileName) { @@ -1020,59 +1161,66 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD return; } let locationToWatch = affectingLocation; + let isSymlink = false; + let symlinkWatcher: FileWatcherOfAffectingLocation | undefined; if (resolutionHost.realpath) { locationToWatch = resolutionHost.realpath(affectingLocation); if (affectingLocation !== locationToWatch) { - const fileWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); - if (fileWatcher) { - if (forResolution) fileWatcher.resolutions++; - else fileWatcher.files++; - fileWatcher.paths.add(affectingLocation); - fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher); - return; - } + isSymlink = true; + symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); } } - const paths = new Set(); - paths.add(locationToWatch); - let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? - resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { - cachedDirectoryStructureHost?.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - paths.forEach(path => { - if (watcher.resolutions) (affectingPathChecks ??= new Set()).add(path); - if (watcher.files) (affectingPathChecksForFile ??= new Set()).add(path); - packageJsonMap?.delete(resolutionHost.toPath(path)); - }); - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - }) : noopFileWatcher; - const watcher: FileWatcherOfAffectingLocation = { - watcher: actualWatcher !== noopFileWatcher ? { - close: () => { - actualWatcher.close(); - // Ensure when watching symlinked package.json, we can close the actual file watcher only once - actualWatcher = noopFileWatcher; - } - } : actualWatcher, - resolutions: forResolution ? 1 : 0, - files: forResolution ? 0 : 1, - paths, - }; - fileWatchesOfAffectingLocations.set(locationToWatch, watcher); - if (affectingLocation !== locationToWatch) { + + const resolutions = forResolution ? 1 : 0; + const files = forResolution ? 0 : 1; + if (!isSymlink || !symlinkWatcher) { + const watcher: FileWatcherOfAffectingLocation = { + watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? + resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { + cachedDirectoryStructureHost?.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); + invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap()); + resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : noopFileWatcher, + resolutions: isSymlink ? 0 : resolutions, + files: isSymlink ? 0 : files, + symlinks: undefined, + }; + fileWatchesOfAffectingLocations.set(locationToWatch, watcher); + if (isSymlink) symlinkWatcher = watcher; + } + if (isSymlink) { + Debug.assert(!!symlinkWatcher); + const watcher: FileWatcherOfAffectingLocation = { + watcher: { + close: () => { + const symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); + // Close symlink watcher if no ref + if (symlinkWatcher?.symlinks?.delete(affectingLocation) && !symlinkWatcher.symlinks.size && !symlinkWatcher.resolutions && !symlinkWatcher.files) { + fileWatchesOfAffectingLocations.delete(locationToWatch); + symlinkWatcher.watcher.close(); + } + }, + }, + resolutions, + files, + symlinks: undefined, + }; fileWatchesOfAffectingLocations.set(affectingLocation, watcher); - paths.add(affectingLocation); + (symlinkWatcher.symlinks ??= new Set()).add(affectingLocation); } } - function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions: ResolutionWithFailedLookupLocations[], name: string) { - const program = resolutionHost.getCurrentProgram(); - if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { - resolutions.forEach(watchFailedLookupLocationOfResolution); - } - else { - resolutions.forEach(resolution => watchAffectingLocationsOfResolution(resolution, /*addToResolutionsWithOnlyAffectingLocations*/ true)); - } + function invalidateAffectingFileWatcher(path: string, packageJsonMap: Map | undefined) { + const watcher = fileWatchesOfAffectingLocations.get(path); + if (watcher?.resolutions) (affectingPathChecks ??= new Set()).add(path); + if (watcher?.files) (affectingPathChecksForFile ??= new Set()).add(path); + watcher?.symlinks?.forEach(path => invalidateAffectingFileWatcher(path, packageJsonMap)); + packageJsonMap?.delete(resolutionHost.toPath(path)); + } + + function watchFailedLookupLocationOfNonRelativeModuleResolutions() { + nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution); + nonRelativeExternalModuleResolutions.clear(); } function setDirectoryWatcher(dir: string, dirPath: Path, nonRecursive?: boolean) { @@ -1086,7 +1234,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD } } - function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean) { + function stopWatchFailedLookupLocation(failedLookupLocation: string, removeAtRoot: boolean, syncDirWatcherRemove: boolean | undefined) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -1102,7 +1250,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD removeAtRoot = true; } else { - removeDirectoryWatcher(dirPath); + removeDirectoryWatcher(dirPath, syncDirWatcherRemove); } } return removeAtRoot; @@ -1112,6 +1260,7 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolution: T, filePath: Path, getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + syncDirWatcherRemove?: boolean, ) { Debug.checkDefined(resolution.files).delete(filePath); resolution.refCount!--; @@ -1130,11 +1279,11 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD let removeAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove); } } - if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); - if (removeAtRoot) removeDirectoryWatcher(rootPath); + if (node10Result) removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove); + if (removeAtRoot) removeDirectoryWatcher(rootPath, syncDirWatcherRemove); } else if (affectingLocations?.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); @@ -1144,14 +1293,16 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation)!; watcher.resolutions--; + if (syncDirWatcherRemove) closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath: string) { + function removeDirectoryWatcher(dirPath: Path, syncDirWatcherRemove: boolean | undefined) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath)!; // Do not close the watcher yet since it might be needed by other failed lookup locations. dirWatcher.refCount--; + if (syncDirWatcherRemove) closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); } function createDirectoryWatcher(directory: string, dirPath: Path, nonRecursive: boolean | undefined) { @@ -1170,11 +1321,17 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD cache: Map>, filePath: Path, getResolutionWithResolvedFileName: GetResolutionWithResolvedFileName, + syncDirWatcherRemove: boolean | undefined, ) { // Deleted file, stop watching failed lookups for all the resolutions in the file const resolutions = cache.get(filePath); if (resolutions) { - resolutions.forEach(resolution => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName)); + resolutions.forEach(resolution => stopWatchFailedLookupLocationOfResolution( + resolution, + filePath, + getResolutionWithResolvedFileName, + syncDirWatcherRemove, + )); cache.delete(filePath); } } @@ -1193,9 +1350,9 @@ export function createResolutionCache(resolutionHost: ResolutionCacheHost, rootD resolvedProjectReference.commandLine.fileNames.forEach(f => removeResolutionsOfFile(resolutionHost.toPath(f))); } - function removeResolutionsOfFile(filePath: Path) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective); + function removeResolutionsOfFile(filePath: Path, syncDirWatcherRemove?: boolean) { + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove); } function invalidateResolutions(resolutions: Set | Map | undefined, canInvalidate: (resolution: ResolutionWithFailedLookupLocations) => boolean | undefined) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 873554db78278..191368e66776e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -7800,6 +7800,7 @@ export interface CompilerHost extends ModuleResolutionHost { options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?( typeDirectiveReferences: readonly T[], @@ -7840,6 +7841,22 @@ export interface CompilerHost extends ModuleResolutionHost { /** @internal */ getBuildInfo?(fileName: string, configFilePath: string | undefined): BuildInfo | undefined; } +/** @internal */ +export interface CompilerHostSupportingResolutionCache { + reusedModuleResolutions?( + reusedNames: readonly StringLiteralLike[] | undefined, + containingSourceFile: SourceFile, + ambientModuleNames: readonly StringLiteralLike[] | undefined, + ): void; + reusedTypeReferenceDirectiveResolutions?( + reusedNames: readonly T[] | undefined, + containingSourceFile: SourceFile | undefined, + ): void; +} +/** @internal */ +export interface CompilerHost extends CompilerHostSupportingResolutionCache { +} + /** true if --out otherwise source file name * * @internal */ diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts index b216c8cb75de0..1c458d635bedd 100644 --- a/src/compiler/watchPublic.ts +++ b/src/compiler/watchPublic.ts @@ -64,6 +64,7 @@ import { perfLogger, PollingInterval, ProjectReference, + ResolutionCache, ResolutionCacheHost, ResolutionMode, ResolvedModule, @@ -221,6 +222,7 @@ export interface ProgramHost { options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?( typeDirectiveReferences: readonly T[], @@ -333,6 +335,8 @@ export interface Watch { getCurrentProgram(): T; /** Closes the watch */ close(): void; + /** @internal */ + getResolutionCache(): ResolutionCache; } /** @@ -511,11 +515,13 @@ export function createWatchProgram(host: WatchCompiler compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames); if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) { compilerHost.resolveModuleNameLiterals = resolutionCache.resolveModuleNameLiterals.bind(resolutionCache); + compilerHost.reusedModuleResolutions = resolutionCache.reusedModuleResolutions.bind(resolutionCache); } compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences); compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives); if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) { - compilerHost.resolveTypeReferenceDirectiveReferences = resolutionCache.resolveTypeReferenceDirectiveReferences.bind(resolutionCache); + compilerHost.resolveTypeReferenceDirectiveReferences = resolutionCache.resolveTypeReferenceDirectiveReferences.bind(resolutionCache); + compilerHost.reusedTypeReferenceDirectiveResolutions = resolutionCache.reusedTypeReferenceDirectiveResolutions.bind(resolutionCache); } compilerHost.resolveLibrary = !host.resolveLibrary ? resolutionCache.resolveLibrary.bind(resolutionCache) : @@ -543,8 +549,8 @@ export function createWatchProgram(host: WatchCompiler if (configFileName) updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); return configFileName ? - { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : - { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close }; + { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : + { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache }; function close() { clearInvalidateResolutionsOfFailedLookupLocations(); @@ -584,6 +590,10 @@ export function createWatchProgram(host: WatchCompiler } } + function getResolutionCache() { + return resolutionCache; + } + function getCurrentBuilderProgram() { return builderProgram; } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index c34050f8f8bc1..4956aad652345 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -7,6 +7,7 @@ import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; +import { Logger } from "./tsserverLogger"; export const enum FourSlashTestType { Native, @@ -202,6 +203,12 @@ const enum CallHierarchyItemDirection { Outgoing } +interface BaselineTest { + command: string; + baselineFile: string; + actual: string; +} + export class TestState { // Language service instance private languageServiceAdapterHost: Harness.LanguageService.LanguageServiceAdapterHost; @@ -225,6 +232,7 @@ export class TestState { public formatCodeSettings: ts.FormatCodeSettings; private inputFiles = new Map(); // Map between inputFile's fileName and its content for easily looking up when resolving references + logger: Logger | undefined; private static getDisplayPartsJson(displayParts: ts.SymbolDisplayPart[] | undefined) { let result = ""; @@ -338,6 +346,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) { @@ -426,6 +435,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); @@ -462,6 +476,39 @@ export class TestState { } } + private baselineFromTest: BaselineTest | BaselineTest[] | undefined; + + private baseline(command: string, baselineFile: string, actual: string) { + if (!this.baselineFromTest) this.baselineFromTest = { command, baselineFile, actual }; + else if (ts.isArray(this.baselineFromTest)) this.baselineFromTest.push({ command, baselineFile, actual }); + else this.baselineFromTest = [this.baselineFromTest, { command, baselineFile, actual }]; + } + + baselineTest() { + if (this.baselineFromTest) { + if (ts.isArray(this.baselineFromTest)) { + Harness.Baseline.runBaseline( + this.baselineFromTest[0].baselineFile, + this.baselineFromTest.map(({ command, actual }) => + `/// ${command}::\n${actual}` + ).join("\n\n\n"), + ); + } + else { + Harness.Baseline.runBaseline(this.baselineFromTest.baselineFile, this.baselineFromTest.actual); + } + } + } + + 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)); } @@ -1273,7 +1320,7 @@ export class TestState { ts.Debug.assertNever(command); } }); - Harness.Baseline.runBaseline(this.getBaselineFileNameForContainingTestFile(".baseline.jsonc"), baselineContent); + this.baseline(commands.length > 1 ? "Commands" : commands[0].type, this.getBaselineFileNameForContainingTestFile(".baseline.jsonc"), baselineContent); function baselineArrayOrSingle( command: FourSlashInterface.BaselineCommand, @@ -2168,7 +2215,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", baselineFile, this.baselineCurrentFileLocations(pos => this.getBreakpointStatementLocation(pos)!)); } private getEmitFiles(): readonly FourSlashFile[] { @@ -2232,7 +2279,7 @@ export class TestState { resultString += Harness.IO.newLine(); } - Harness.Baseline.runBaseline(ts.Debug.checkDefined(this.testData.globalOptions[MetadataOptionNames.baselineFile]), resultString); + this.baseline("EmitOutput", ts.Debug.checkDefined(this.testData.globalOptions[MetadataOptionNames.baselineFile]), resultString); } private flattenChainedMessage(diag: ts.DiagnosticMessageChain, indent = " ") { @@ -2249,7 +2296,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", this.getBaselineFileNameForContainingTestFile(), result); } private getCompilerTestFiles() { @@ -2264,7 +2311,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", this.getBaselineFileNameForContainingTestFile(), result); } private getSyntacticDiagnosticBaselineText(files: Harness.Compiler.TestFile[]) { @@ -2302,7 +2349,7 @@ export class TestState { ...(documentation?.length ? documentation.map(p => p.text).join("").split("\n") : []), ...(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", baselineFile, annotations + "\n\n" + stringify(result)); } public baselineSignatureHelp() { @@ -2337,7 +2384,7 @@ export class TestState { return tooltip; } ); - Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result)); + this.baseline("SignatureHelp", baselineFile, annotations + "\n\n" + stringify(result)); } public baselineCompletions(preferences?: ts.UserPreferences) { @@ -2381,7 +2428,7 @@ export class TestState { } } } - Harness.Baseline.runBaseline(baselineFile, annotations + "\n\n" + stringify(result, (key, value) => { + this.baseline("Completions", baselineFile, annotations + "\n\n" + stringify(result, (key, value) => { return key === "exportMapKey" ? value.replace(/\|[0-9]+/g, "|*") : value; @@ -2462,7 +2509,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", baselineFile, text); } public printBreakpointLocation(pos: number) { @@ -2931,7 +2978,8 @@ export class TestState { } public baselineCurrentFileNameOrDottedNameSpans() { - Harness.Baseline.runBaseline( + this.baseline( + "NameOrDottedNameSpans", this.testData.globalOptions[MetadataOptionNames.baselineFile], this.baselineCurrentFileLocations(pos => this.getNameOrDottedNameSpan(pos)!)); } @@ -3576,7 +3624,7 @@ export class TestState { } } - Harness.Baseline.runBaseline(baselineFile, baselineText); + this.baseline("Auto Imports", baselineFile, baselineText); } public verifyJsxClosingTag(map: { [markerName: string]: ts.JsxClosingTagInfo | undefined }): void { @@ -3607,7 +3655,7 @@ export class TestState { offset = result.offset; } - Harness.Baseline.runBaseline(baselineFile, baselineContent); + this.baseline("Linked Editing", baselineFile, baselineContent); function getLinkedEditingBaselineWorker(activeFile: FourSlashFile, offset: number, languageService: ts.LanguageService) { const fileName = activeFile.fileName; @@ -4190,7 +4238,7 @@ export class TestState { 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", baselineFile, text); } private getLineContent(index: number) { @@ -4413,12 +4461,15 @@ function renameKeys(obj: { readonly [key: string]: T }, renameKey: (key: stri return res; } -export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string) { +export interface FourSlashServerLogBaseliner { + baseline?: () => void; +} +export function runFourSlashTest(basePath: string, testType: FourSlashTestType, fileName: string, serverLogBaseliner?: FourSlashServerLogBaseliner) { const content = Harness.IO.readFile(fileName)!; - runFourSlashTestContent(basePath, testType, content, fileName); + runFourSlashTestContent(basePath, testType, content, fileName, serverLogBaseliner); } -export function runFourSlashTestContent(basePath: string, testType: FourSlashTestType, content: string, fileName: string): void { +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); @@ -4426,12 +4477,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/harnessIO.ts b/src/harness/harnessIO.ts index d727cd82e928d..3f981407944e6 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -261,7 +261,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 26682df5cdf1e..f36735f7eef9b 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -10,6 +10,12 @@ import { getNewLineCharacter } from "./_namespaces/ts"; import * as vfs from "./_namespaces/vfs"; 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 @@ -133,6 +139,7 @@ export interface LanguageServiceAdapter { getLanguageService(): ts.LanguageService; getClassifier(): ts.Classifier; getPreProcessedFileInfo(fileName: string, fileContents: string): ts.PreProcessedFileInfo; + getLogger(): Logger | undefined; } export abstract class LanguageServiceAdapterHost { @@ -327,6 +334,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); } @@ -683,6 +691,7 @@ class LanguageServiceShimProxy implements ts.LanguageService { export class ShimLanguageServiceAdapter implements LanguageServiceAdapter { private host: ShimLanguageServiceHost; private factory: ts.TypeScriptServicesFactory; + getLogger = ts.returnUndefined; constructor(preprocessToResolve: boolean, cancellationToken?: ts.HostCancellationToken, options?: ts.CompilerOptions) { this.host = new ShimLanguageServiceHost(preprocessToResolve, cancellationToken, options); this.factory = new ts.TypeScriptServicesFactory(); @@ -762,10 +771,11 @@ class SessionClientHost extends NativeLanguageServiceHost implements ts.server.S } } -class SessionServerHost implements ts.server.ServerHost, ts.server.Logger { +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(); @@ -832,57 +842,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 }; - } - - watchDirectory(): ts.FileWatcher { - return { close: ts.noop }; - } - - close = ts.noop; - - info(message: string): void { - this.host.log(message); - } - - msg(message: string): void { - this.host.log(message); + watchFile(file: string, cb: ts.FileWatcherCallback, pollingInterval: ts.PollingInterval): ts.FileWatcher { + return this.watchUtils.watchFile(file, cb, pollingInterval); } - loggingEnabled() { - return true; + watchDirectory(dir: string, cb: ts.DirectoryWatcherCallback, recursive: boolean): ts.FileWatcher { + return this.watchUtils.fsWatch(dir, recursive, cb); } - getLogFileName(): string | undefined { - return undefined; + 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 } - hasLevel() { - return false; + 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 } - startGroup() { throw ts.notImplemented(); } - endGroup() { throw ts.notImplemented(); } - - perftrc(message: string): void { - return this.host.log(message); + 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 } - 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) { @@ -984,22 +965,30 @@ 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)!); } + 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; + 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); @@ -1008,6 +997,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, @@ -1016,12 +1006,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); @@ -1035,6 +1030,7 @@ export class ServerLanguageServiceAdapter implements LanguageServiceAdapter { this.client = client; this.host = clientHost; } + getLogger() { return this.logger; } getHost() { return this.host; } getLanguageService(): ts.LanguageService { return this.client; } getClassifier(): ts.Classifier { throw new Error("getClassifier is not available using the server interface."); } diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts index b1f517b2fd89f..01a95ab0ec273 100644 --- a/src/harness/incrementalUtils.ts +++ b/src/harness/incrementalUtils.ts @@ -94,7 +94,423 @@ function verifyDocumentRegistry(service: ts.server.ProjectService) { service.forEachProject(collectStats); verifyDocumentRegistryStats(service.documentRegistry, stats); } +interface ResolutionInfo { + cacheType: string; + fileName: string; + name: string; + mode: ts.ResolutionMode; +} + +function getResolutionCacheDetails( + baseline: string[], + cacheType: string, + cache: ts.ModeAwareCache | undefined, + getResolvedFileName: (resolution: T) => string | undefined, + indent: string, +) { + let addedCacheType = false; + cache?.forEach((resolved, key, mode) => { + if (!addedCacheType) { + addedCacheType = true; + baseline.push(`${indent}${cacheType}:`); + } + baseline.push(`${indent} ${key}: ${mode ? ts.getNameOfCompilerOptionValue(mode, ts.moduleOptionDeclaration.type) + ":" : ""}${getResolvedFileName(resolved)}`); + }); +} + +function getResolvedModuleFileName(r: ts.ResolvedModuleWithFailedLookupLocations) { + return r.resolvedModule?.resolvedFileName; +} + +function getResolvedTypeRefFileName(r: ts.ResolvedTypeReferenceDirectiveWithFailedLookupLocations) { + return r.resolvedTypeReferenceDirective?.resolvedFileName; +} + +function getLibResolutionCacheDetails( + baseline: string[], + cache: Map | undefined, + indent: string, +) { + let addedCacheType = false; + cache?.forEach((resolved, libFileName) => { + if (!addedCacheType) { + addedCacheType = true; + baseline.push(`${indent}Libs:`); + } + baseline.push(`${indent} ${libFileName}: Actual: ${resolved.actual} Resolution: ${getResolvedModuleFileName(resolved.resolution)}`); + }); +} + +function getProgramStructure(program: ts.Program | undefined) { + const baseline: string[] = []; + program?.getSourceFiles().slice().sort((f1, f2) => ts.comparePathsCaseSensitive(f1.path, f2.path)).forEach(f => { + baseline.push(` File: ${f.fileName} Path: ${f.path} ResolvedPath: ${f.resolvedPath} impliedNodeFormat: ${f.impliedNodeFormat}`); + baseline.push(f.text.split(/\r?\n/g).map(l => l ? " " + l : "").join("\n")); + getResolutionCacheDetails( + baseline, + "Modules", + f.resolvedModules, + getResolvedModuleFileName, + " ", + ); + getResolutionCacheDetails( + baseline, + "TypeRefs", + f.resolvedTypeReferenceDirectiveNames, + getResolvedTypeRefFileName, + " ", + ); + }); + getResolutionCacheDetails( + baseline, + "AutoTypeRefs", + program?.getAutomaticTypeDirectiveResolutions(), + getResolvedTypeRefFileName, + " ", + ); + getLibResolutionCacheDetails( + baseline, + program?.resolvedLibReferences, + " ", + ); + return baseline.join("\n"); +} + +export function verifyProgramStructure(expectedProgram: ts.Program, actualProgram: ts.Program, projectName: string) { + const actual = getProgramStructure(actualProgram); + const expected = getProgramStructure(expectedProgram); + ts.Debug.assert(actual === expected, `Program verification:: ${projectName}`, () => `Program Details::\nExpected:\n${expected}\nActual:\n${actual}`); +} + +export function verifyResolutionCache( + actual: ts.ResolutionCache, + actualProgram: ts.Program, + resolutionHostCacheHost: ts.ResolutionCacheHost, + projectName: string, + userResolvedModuleNames?: true, +) { + const currentDirectory = resolutionHostCacheHost.getCurrentDirectory!(); + const expected = ts.createResolutionCache(resolutionHostCacheHost, actual.rootDirForResolution, /*logChangesWhenResolvingModule*/ false); + expected.startCachingPerDirectoryResolution(); + + type ExpectedResolution = ts.CachedResolvedModuleWithFailedLookupLocations & ts.CachedResolvedTypeReferenceDirectiveWithFailedLookupLocations; + + const expectedToResolution = new Map(); + const resolutionToExpected = new Map(); + const resolutionToRefs = new Map(); + const inferredTypesPath = resolutionHostCacheHost.toPath(ts.getAutomaticTypeDirectiveContainingFile(actualProgram.getCompilerOptions(), currentDirectory)); + actual.resolvedModuleNames.forEach((resolutions, path) => collectResolutionToRefFromCache( + "Modules", + path, + resolutions, + getResolvedModuleFileName, + /*deferWatchingNonRelativeResolution*/ true, + expected.resolvedModuleNames, + actualProgram.getSourceFileByPath(path)!.resolvedModules, + )); + actual.resolvedTypeReferenceDirectives.forEach((resolutions, path) => collectResolutionToRefFromCache( + "TypeRefs", + path, + resolutions, + getResolvedTypeRefFileName, + /*deferWatchingNonRelativeResolution*/ false, + expected.resolvedTypeReferenceDirectives, + path !== inferredTypesPath ? + actualProgram.getSourceFileByPath(path)!.resolvedTypeReferenceDirectiveNames : + actualProgram.getAutomaticTypeDirectiveResolutions(), + )); + actual.resolvedLibraries.forEach((resolved, libFileName) => { + const expectedResolution = collectResolution( + "Libs", + resolutionHostCacheHost.toPath( + ts.getInferredLibraryNameResolveFrom(actualProgram.getCompilerOptions(), currentDirectory, libFileName) + ), + resolved, + getResolvedModuleFileName(resolved), + ts.getLibraryNameFromLibFileName(libFileName), + /*mode*/ undefined, + /*deferWatchingNonRelativeResolution*/ false, + ); + expected.resolvedLibraries.set(libFileName, expectedResolution); + }); + // Check for resolutions in program but not in cache to empty resolutions + // Resolutions in cache are checked during collection so that we dont need to re-iterate over them + actualProgram.getSourceFiles().forEach(f => { + // If this is redirect file, then its not used for resolving module names + if (f.redirectInfo?.unredirected.fileName === f.fileName) return; + if (!userResolvedModuleNames && !actual.resolvedModuleNames.has(f.path)) verifyEveryResolutionInCache(/*cache*/ undefined, f.resolvedModules, f.fileName); + if (!actual.resolvedTypeReferenceDirectives.has(f.path)) verifyEveryResolutionInCache(/*cache*/ undefined, f.resolvedTypeReferenceDirectiveNames, f.fileName); + }); + if (!actual.resolvedTypeReferenceDirectives.has(inferredTypesPath)) verifyEveryResolutionInCache(/*cache*/ undefined, actualProgram.getAutomaticTypeDirectiveResolutions(), "auto inferred types"); + + expected.finishCachingPerDirectoryResolution(actualProgram, /*oldProgram*/ undefined); + + // Verify ref count + resolutionToRefs.forEach((info, resolution) => { + ts.Debug.assert( + resolution.refCount === info.length, + `${projectName}:: Expected Resolution ref count ${info.length} but got ${resolution.refCount}`, + () => `Expected from:: ${JSON.stringify(info, undefined, " ")}` + + `Actual from: ${resolution.refCount}` + ); + ts.Debug.assert( + !resolution.isInvalidated, + `${projectName}:: Resolution should not be invalidated` + ); + ts.Debug.assert( + resolutionToExpected.get(resolution)!.refCount === resolution.refCount, + `${projectName}:: Expected Resolution ref count ${resolutionToExpected.get(resolution)!.refCount} but got ${resolution.refCount}` + ); + verifySet(resolutionToExpected.get(resolution)!.files, resolution.files, `Resolution files`); + }); + verifyMapOfResolutionSet(expected.resolvedFileToResolution, actual.resolvedFileToResolution, `resolvedFileToResolution`); + verifyResolutionSet(expected.resolutionsWithFailedLookups, actual.resolutionsWithFailedLookups, `resolutionsWithFailedLookups`); + verifyResolutionSet(expected.resolutionsWithOnlyAffectingLocations, actual.resolutionsWithOnlyAffectingLocations, `resolutionsWithOnlyAffectingLocations`); + verifyDirectoryWatchesOfFailedLookups(expected.directoryWatchesOfFailedLookups, actual.directoryWatchesOfFailedLookups); + verifyFileWatchesOfAffectingLocations(expected.fileWatchesOfAffectingLocations, actual.fileWatchesOfAffectingLocations); + + // Stop watching resolutions to verify everything gets closed. + actual.resolvedModuleNames.forEach((_resolutions, path) => expected.removeResolutionsOfFile(path)); + actual.resolvedTypeReferenceDirectives.forEach((_resolutions, path) => expected.removeResolutionsOfFile(path)); + expected.finishCachingPerDirectoryResolution(/*newProgram*/ undefined, actualProgram); + + resolutionToExpected.forEach(expected => { + ts.Debug.assert(!expected.refCount, `${projectName}:: All the resolution should be released`); + ts.Debug.assert(!expected.files?.size, `${projectName}:: Shouldnt ref to any files`); + }); + ts.Debug.assert(expected.resolvedFileToResolution.size === 0, `${projectName}:: resolvedFileToResolution should be released`); + ts.Debug.assert(expected.resolutionsWithFailedLookups.size === 0, `${projectName}:: resolutionsWithFailedLookups should be released`); + ts.Debug.assert(expected.resolutionsWithOnlyAffectingLocations.size === 0, `${projectName}:: resolutionsWithOnlyAffectingLocations should be released`); + ts.Debug.assert(expected.directoryWatchesOfFailedLookups.size === 0, `${projectName}:: directoryWatchesOfFailedLookups should be released`); + ts.Debug.assert(expected.fileWatchesOfAffectingLocations.size === 0, `${projectName}:: fileWatchesOfAffectingLocations should be released`); + + function verifyEveryResolutionInCache( + cache: ts.ModeAwareCache | undefined, + fromProgramResolutions: ts.ModeAwareCache | undefined, + fileName: string, + ) { + fromProgramResolutions?.forEach((resolved, name, mode) => { + if (resolved as unknown !== ts.emptyResolution) { + // Resolutions should match + ts.Debug.assert(cache?.get(name, mode) === resolved, `${projectName}:: ${name}:: ${mode} Expected resolution to be in cache ${fileName}`); + } + else { + // EmptyResolution is place holder and shouldnt be in the cache + ts.Debug.assert(!cache?.has(name, mode), `${projectName}:: ${name}:: ${mode} Ambient moduleResolution, should not be watched ${fileName}`); + } + }); + } + + function collectResolutionToRefFromCache( + cacheType: string, + fileName: ts.Path, + cache: ts.ModeAwareCache | undefined, + getResolvedFileName: (resolution: T) => string | undefined, + deferWatchingNonRelativeResolution: boolean, + storeExpcted: Map>, + fromProgramResolutions: ts.ModeAwareCache | undefined, + ) { + ts.Debug.assert( + actualProgram.getSourceFileByPath(fileName) || inferredTypesPath === fileName, + `${projectName}:: ${cacheType} ${fileName} Expect cache for file in program or auto type ref`, + ); + let expectedCache: ts.ModeAwareCache | undefined; + cache?.forEach((resolved, name, mode) => { + const resolvedFileName = getResolvedFileName(resolved); + const expected = collectResolution(cacheType, fileName, resolved, resolvedFileName, name, mode, deferWatchingNonRelativeResolution); + if (!expectedCache) storeExpcted.set(fileName, expectedCache = ts.createModeAwareCache()); + expectedCache.set(name, mode, expected); + // Resolution in program should be same as in resolution cache + ts.Debug.assert(resolved === fromProgramResolutions?.get(name, mode)); + }); + verifyEveryResolutionInCache(cache, fromProgramResolutions, fileName); + } + + function collectResolution( + cacheType: string, + fileName: ts.Path, + resolved: T, + resolvedFileName: string | undefined, + name: string, + mode: ts.ResolutionMode, + deferWatchingNonRelativeResolution: boolean, + ): ExpectedResolution { + const existing = resolutionToRefs.get(resolved); + let expectedResolution: ExpectedResolution; + if (existing) { + existing.push({ cacheType, fileName, name, mode }); + expectedResolution = resolutionToExpected.get(resolved)!; + } + else { + resolutionToRefs.set(resolved, [{ cacheType, fileName, name, mode }]); + expectedResolution = { + resolvedModule: (resolved as any).resolvedModule, + resolvedTypeReferenceDirective: (resolved as any).resolvedTypeReferenceDirective, + failedLookupLocations: resolved.failedLookupLocations, + affectingLocations: resolved.affectingLocations, + node10Result: resolved.node10Result, + }; + expectedToResolution.set(expectedResolution, resolved); + resolutionToExpected.set(resolved, expectedResolution); + } + expected.watchFailedLookupLocationsOfExternalModuleResolutions(name, expectedResolution, fileName, () => ({ resolvedFileName }), deferWatchingNonRelativeResolution); + return expectedResolution; + } + + function verifyMap( + expected: Map | undefined, + actual: Map | undefined, + verifyValue: (expected: Expected | undefined, actual: Actual | undefined, key: string) => void, + caption: string, + ) { + expected?.forEach((expected, path) => verifyValue(expected, actual?.get(path), `${caption}:: ${path}`)); + actual?.forEach((actual, path) => verifyValue(expected?.get(path), actual, `${caption}:: ${path}`)); + } + + function verifySet( + expected: Set | undefined, + actual: Set | undefined, + caption: string, + ) { + expected?.forEach(expected => ts.Debug.assert( + actual?.has(expected), + `${projectName}:: ${caption}:: Expected should be present in actual`, + )); + actual?.forEach(actual => ts.Debug.assert( + expected?.has(actual), + `${projectName}:: ${caption}:: Actual should be present in expected`, + )); + } + + function verifyMapOfResolutionSet( + expected: Map> | undefined, + actual: Map> | undefined, + caption: string, + ) { + verifyMap(expected, actual, verifyResolutionSet, caption); + } + + function verifyResolutionSet( + expected: Set | undefined, + actual: Set | undefined, + caption: string, + ) { + expected?.forEach(resolution => ts.Debug.assert( + actual?.has(expectedToResolution.get(resolution as ExpectedResolution)!), + `${projectName}:: ${caption}:: Expected resolution should be present in actual resolutions`, + )); + actual?.forEach(resolution => ts.Debug.assert( + expected?.has(resolutionToExpected.get(resolution)!), + `${projectName}:: ${caption}:: Actual resolution should be present in expected resolutions` + )); + } + + function verifyDirectoryWatchesOfFailedLookups(expected: Map, actual: Map) { + verifyMap(expected, actual, (expected, actual, caption) => { + ts.Debug.assert(expected?.refCount === actual?.refCount, `${projectName}:: ${caption}:: refCount`); + ts.Debug.assert(!!expected?.refCount, `${projectName}:: ${caption}:: expected refCount to be non zero`); + ts.Debug.assert(expected?.nonRecursive === actual?.nonRecursive, `${projectName}:: ${caption}:: nonRecursive`); + }, "directoryWatchesOfFailedLookups"); + } + + function verifyFileWatchesOfAffectingLocations( + expected: Map, + actual: Map, + ) { + verifyMap(expected, actual, verifyFileWatcherOfAffectingLocation, "fileWatchesOfAffectingLocations"); + } + + function verifyFileWatcherOfAffectingLocation( + expected: ts.FileWatcherOfAffectingLocation | undefined, + actual: ts.FileWatcherOfAffectingLocation | undefined, + caption: string, + ) { + ts.Debug.assert(expected?.resolutions === actual?.resolutions, `${projectName}:: ${caption}:: resolutions`); + ts.Debug.assert(expected?.files === actual?.files, `${projectName}:: ${caption}:: files`); + verifySet(expected?.symlinks, actual?.symlinks, `${projectName}:: ${caption}:: symlinks`); + } +} + +function verifyProgram(service: ts.server.ProjectService, project: ts.server.Project) { + if (service.serverMode === ts.LanguageServiceMode.Syntactic) return; + const options = project.getCompilerOptions(); + const compilerHost = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, service.host); + compilerHost.useSourceOfProjectReferenceRedirect = project.useSourceOfProjectReferenceRedirect?.bind(project); + compilerHost.getCurrentDirectory = project.getCurrentDirectory.bind(project); + const getDefaultLibLocation = compilerHost.getDefaultLibLocation!; + compilerHost.getDefaultLibLocation = () => ts.getNormalizedAbsolutePath(getDefaultLibLocation(), service.host.getCurrentDirectory()); + compilerHost.getDefaultLibFileName = options => ts.combinePaths(compilerHost.getDefaultLibLocation!(), ts.getDefaultLibFileName(options)); + const readFile = compilerHost.readFile; + compilerHost.readFile = fileName => { + const path = project.toPath(fileName); + const info = project.projectService.filenameToScriptInfo.get(path); + if (info?.isDynamicOrHasMixedContent() || project.fileIsOpen(path)) { + return ts.getSnapshotText(info!.getSnapshot()); + } + // Read only rooted disk paths from host similar to ProjectService + if (!ts.isRootedDiskPath(fileName) || !compilerHost.fileExists(fileName)) return undefined; + if (ts.hasTSFileExtension(fileName)) return readFile(fileName); + let text: string | undefined | false; + let fileSize: number; + if (service.host.getFileSize) fileSize = service.host.getFileSize(fileName); + else { + text = readFile(fileName); + fileSize = text?.length || 0; + text = text !== undefined ? text : false; + } + // Large js files like project service + if (fileSize > ts.server.maxFileSize) return ""; + return text !== undefined ? text || undefined : readFile(fileName); + }; + const resolutionHostCacheHost: ts.ResolutionCacheHost = { + ...compilerHost, + + getCompilerHost: () => compilerHost, + toPath: project.toPath.bind(project), + getCompilationSettings: project.getCompilationSettings.bind(project), + projectName: project.projectName, + getGlobalCache: project.getGlobalCache.bind(project), + globalCacheResolutionModuleName: project.globalCacheResolutionModuleName.bind(project), + fileIsOpen: project.fileIsOpen.bind(project), + getCurrentProgram: () => project.getCurrentProgram(), + + watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher, + watchAffectingFileLocation: ts.returnNoopFileWatcher, + onInvalidatedResolution: ts.noop, + watchTypeRootsDirectory: ts.returnNoopFileWatcher, + onChangedAutomaticTypeDirectiveNames: ts.noop, + scheduleInvalidateResolutionsOfFailedLookupLocations: ts.noop, + getCachedDirectoryStructureHost: ts.returnUndefined, + writeLog: ts.noop, + }; + const moduleResolutionCache = ts.createModuleResolutionCache(compilerHost.getCurrentDirectory(), compilerHost.getCanonicalFileName, project.getCompilerOptions()); + compilerHost.resolveModuleNameLiterals = (moduleNames, containingFile, redirectedReference, options, containingSourceFile) => + ts.loadWithModeAwareCache( + moduleNames, + containingFile, + redirectedReference, + options, + containingSourceFile, + compilerHost, + moduleResolutionCache, + (containingFile, redirectedReference, options) => ts.createModuleResolutionLoaderUsingGlobalCache( + containingFile, + redirectedReference, + options, + resolutionHostCacheHost, + moduleResolutionCache, + ), + ); + verifyProgramStructure(ts.createProgram({ + rootNames: project.getScriptFileNames(), + options: project.getCompilationSettings(), + projectReferences: project.getProjectReferences(), + host: compilerHost, + }), project.getCurrentProgram()!, project.projectName); + verifyResolutionCache(project.resolutionCache, project.getCurrentProgram()!, resolutionHostCacheHost, project.projectName); +} export function incrementalVerifier(service: ts.server.ProjectService) { service.verifyDocumentRegistry = () => verifyDocumentRegistry(service); + service.verifyProgram = project => verifyProgram(service, project); } \ No newline at end of file diff --git a/src/harness/tsserverLogger.ts b/src/harness/tsserverLogger.ts new file mode 100644 index 0000000000000..083cda0c041df --- /dev/null +++ b/src/harness/tsserverLogger.ts @@ -0,0 +1,152 @@ +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, host: ts.server.ServerHost | 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); + logger.log = write; + return logger; + + function msg(s: string, type = ts.server.Msg.Err) { + s = `[${nowString(logger.host!)}] ${s}`; + if (!inGroup || firstInGroup) s = padStringRight(type + " seq", " ") + s; + write(s); + } + + function write(s: string) { + if (ts.Debug.isDebugging) console.log(s); + originalInfo.call(logger, s); + } + + function padStringRight(str: string, padding: string) { + return (str + padding).slice(0, padding.length); + } +} + +export function nowString(host: ts.server.ServerHost) { + // 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: ts.server.ServerHost): 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*"[_$a-zA-Z][_$_$a-zA-Z0-9]*\|\d+\|/g, match => match.replace(/\|\d+\|/, `|*|`)); + s = s.replace(/getIndentationAtPosition: getCurrentSourceFile: \d+(?:\.\d+)?/g, `getIndentationAtPosition: getCurrentSourceFile: *`); + s = s.replace(/getIndentationAtPosition: computeIndentation\s+: \d+(?:\.\d+)?/g, `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); +} \ No newline at end of file diff --git a/src/harness/watchUtils.ts b/src/harness/watchUtils.ts new file mode 100644 index 0000000000000..7dd85fbebeda1 --- /dev/null +++ b/src/harness/watchUtils.ts @@ -0,0 +1,133 @@ +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 function createWatchUtils( + watchFilesName: string, + fsWatchesName: string, +) { + let hasWatchChanges: boolean | undefined; + const watchedFiles = createMultiMap(); + const fsWatches = createMultiMap>(); + const fsWatchesRecursive = createMultiMap>(); + let serializedWatchedFiles: Map | undefined; + let serializedFsWatches: Map[]> | undefined; + let serializedFsWatchesRecursive: Map[]> | undefined; + return { + watchedFiles, + fsWatches, + fsWatchesRecursive, + watchFile, + fsWatch, + serializeWatches, + }; + 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 watchFile(fileName: Path, cb: FileWatcherCallback, pollingInterval: PollingInterval) { + return createWatcher( + watchedFiles, + fileName, + { cb, pollingInterval } + ); + } + + function fsWatch(dir: Path, recursive: boolean, cb: DirCallback, getInode?: (dir: Path) => number | undefined) { + return createWatcher( + recursive ? fsWatchesRecursive : fsWatches, + dir, + { + cb, + inode: getInode?.(dir) + } + ); + } + + function serializeWatches(baseline: string[] = []) { + if (!hasWatchChanges) return baseline; + serializedWatchedFiles = serializeMultiMap(baseline, watchFilesName, watchedFiles, serializedWatchedFiles); + serializedFsWatches = serializeMultiMap(baseline, fsWatchesName, fsWatches, serializedFsWatches); + serializedFsWatchesRecursive = serializeMultiMap(baseline, `${fsWatchesName}Recursive`, fsWatchesRecursive, serializedFsWatchesRecursive); + hasWatchChanges = false; + return baseline; + } +} + +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/server/editorServices.ts b/src/server/editorServices.ts index 354198918b5e8..b3ee267bdf455 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -996,6 +996,7 @@ export class ProjectService { private currentPluginEnablementPromise?: Promise; /** @internal */ verifyDocumentRegistry = noop; + /** @internal */ verifyProgram: (project: Project) => void = noop; constructor(opts: ProjectServiceOptions) { this.host = opts.host; diff --git a/src/server/project.ts b/src/server/project.ts index 1c9e985c83c50..5d83b0c08efc3 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -530,7 +530,6 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo // If files are listed explicitly or allowJs is specified, allow all extensions this.compilerOptions.allowNonTsExtensions = true; } - switch (projectService.serverMode) { case LanguageServiceMode.Semantic: this.languageServiceEnabled = true; @@ -712,8 +711,13 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo } /** @internal */ - resolveModuleNameLiterals(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[] { - return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames); + resolveModuleNameLiterals(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[] { + return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames, ambientModuleNames); + } + + /** @internal */ + reusedModuleResolutions(reusedNames: readonly StringLiteralLike[] | undefined, containingSourceFile: SourceFile, ambientModuleNames: readonly StringLiteralLike[] | undefined) { + return this.resolutionCache.reusedModuleResolutions(reusedNames, containingSourceFile, ambientModuleNames); } getModuleResolutionCache(): ModuleResolutionCache | undefined { @@ -732,6 +736,11 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo ); } + /** @internal */ + reusedTypeReferenceDirectiveResolutions?(reusedNames: readonly T[] | undefined, containingSourceFile: SourceFile | undefined) { + return this.resolutionCache.reusedTypeReferenceDirectiveResolutions(reusedNames, containingSourceFile); + } + /** @internal */ resolveLibrary(libraryName: string, resolveFrom: string, options: CompilerOptions, libFileName: string): ResolvedModuleWithFailedLookupLocations { return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName); @@ -1529,13 +1538,13 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo if (!newFile || (f.resolvedPath === f.path && newFile.resolvedPath !== f.path)) { // new program does not contain this file - detach it from the project // - remove resolutions only if the new program doesnt contain source file by the path (not resolvedPath since path is used for resolution) - this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path)); + this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path), /*syncDirWatcherRemove*/ true); } } oldProgram.forEachResolvedProjectReference(resolvedProjectReference => { if (!this.program!.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { - this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName); + this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName, /*noRemoveResolution*/ undefined, /*syncDirWatcherRemove*/ true); } }); } @@ -1587,6 +1596,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo } } + this.projectService.verifyProgram(this); if (this.exportMapCache && !this.exportMapCache.isEmpty()) { this.exportMapCache.releaseSymbols(); if (this.hasAddedorRemovedFiles || oldProgram && !this.program!.structureIsReused) { @@ -1653,12 +1663,12 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo this.projectService.sendPerformanceEvent(kind, durationMs); } - private detachScriptInfoFromProject(uncheckedFileName: string, noRemoveResolution?: boolean) { + private detachScriptInfoFromProject(uncheckedFileName: string, noRemoveResolution?: boolean, syncDirWatcherRemove?: boolean) { const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName); if (scriptInfoToDetach) { scriptInfoToDetach.detachFromProject(this); if (!noRemoveResolution) { - this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path); + this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove); } } } diff --git a/src/server/types.ts b/src/server/types.ts index 8e1c38f9a42a3..f8199f030c849 100644 --- a/src/server/types.ts +++ b/src/server/types.ts @@ -29,4 +29,5 @@ export interface ServerHost extends System { require?(initialPath: string, moduleName: string): ModuleImportResult; /** @internal */ importPlugin?(root: string, moduleName: string): Promise; + /** @internal */ now?(): Date; } diff --git a/src/services/services.ts b/src/services/services.ts index 51dcb93f7dd58..7ca25688e8960 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1684,6 +1684,8 @@ export function createLanguageService( resolveModuleNameLiterals: maybeBind(host, host.resolveModuleNameLiterals), resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences), resolveLibrary: maybeBind(host, host.resolveLibrary), + reusedModuleResolutions: maybeBind(host, host.reusedModuleResolutions), + reusedTypeReferenceDirectiveResolutions: maybeBind(host, host.reusedTypeReferenceDirectiveResolutions), useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), getParsedCommandLine, }; diff --git a/src/services/types.ts b/src/services/types.ts index 571e677b208f2..ed214b48072a1 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -1,6 +1,7 @@ import { CancellationToken, CompilerHost, + CompilerHostSupportingResolutionCache, CompilerOptions, CustomTransformers, Diagnostic, @@ -369,6 +370,7 @@ export interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalR options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, + ambientModuleNames: readonly StringLiteralLike[] | undefined, ): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?( typeDirectiveReferences: readonly T[], @@ -429,6 +431,10 @@ export interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalR /** @internal */ getIncompleteCompletionsCache?(): IncompleteCompletionsCache; } +/** @internal */ +export interface LanguageServiceHost extends CompilerHostSupportingResolutionCache { +} + /** @internal */ export const emptyOptions = {}; diff --git a/src/testRunner/fourslashRunner.ts b/src/testRunner/fourslashRunner.ts index 3e79a035c4ecb..2256c396bb500 100644 --- a/src/testRunner/fourslashRunner.ts +++ b/src/testRunner/fourslashRunner.ts @@ -60,8 +60,15 @@ export class FourSlashRunner extends RunnerBase { if (testIndex >= 0) fn = fn.substr(testIndex); if (justName !== "fourslash.ts") { + let serverLogBaseliner: FourSlash.FourSlashServerLogBaseliner = {}; + after(() => { + serverLogBaseliner = undefined!; + }); it(this.testSuiteName + " test " + justName + " runs correctly", () => { - FourSlash.runFourSlashTest(this.basePath, this.testType, fn); + FourSlash.runFourSlashTest(this.basePath, this.testType, fn, serverLogBaseliner); + }); + it(this.testSuiteName + " test " + justName + " tsserver log", () => { + serverLogBaseliner.baseline?.(); }); } }); diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts index e3075686be24d..3c1a8396a426b 100644 --- a/src/testRunner/unittests/helpers/baseline.ts +++ b/src/testRunner/unittests/helpers/baseline.ts @@ -40,12 +40,10 @@ export function commandLineCallbacks( }; } -export function baselinePrograms(baseline: string[], getPrograms: () => readonly CommandLineProgram[], oldPrograms: readonly (CommandLineProgram | undefined)[], baselineDependencies: boolean | undefined) { - const programs = getPrograms(); +export function baselinePrograms(baseline: string[], programs: readonly CommandLineProgram[], oldPrograms: readonly (CommandLineProgram | undefined)[], baselineDependencies: boolean | undefined) { for (let i = 0; i < programs.length; i++) { baselineProgram(baseline, programs[i], oldPrograms[i], baselineDependencies); } - return programs; } function baselineProgram(baseline: string[], [program, builderProgram]: CommandLineProgram, oldProgram: CommandLineProgram | undefined, baselineDependencies: boolean | undefined) { diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index d6681047f9664..12f329ce59b6e 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -152,10 +152,11 @@ export function testTscCompile(input: TestTscCompile) { function additionalBaseline(sys: TscCompileSystem) { const { baselineSourceMap, baselineReadFileCalls, baselinePrograms: shouldBaselinePrograms, baselineDependencies } = input; - if (input.computeDtsSignatures) storeDtsSignatures(sys, getPrograms!()); + const programs = getPrograms!(); + if (input.computeDtsSignatures) storeDtsSignatures(sys, programs); if (shouldBaselinePrograms) { const baseline: string[] = []; - baselinePrograms(baseline, getPrograms!, ts.emptyArray, baselineDependencies); + baselinePrograms(baseline, programs, ts.emptyArray, baselineDependencies); sys.write(baseline.join("\n")); } if (baselineReadFileCalls) { diff --git a/src/testRunner/unittests/helpers/tscWatch.ts b/src/testRunner/unittests/helpers/tscWatch.ts index 4b8a3a6076866..b6c0e3793948e 100644 --- a/src/testRunner/unittests/helpers/tscWatch.ts +++ b/src/testRunner/unittests/helpers/tscWatch.ts @@ -1,3 +1,7 @@ +import { + verifyProgramStructure, + verifyResolutionCache, +} from "../../../harness/incrementalUtils"; import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes"; import { Baseline } from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; @@ -34,6 +38,9 @@ export interface TscWatchCompileChange ) => void; + userResolvedModuleNames?: true; + // TODO:: sheetal: Needing these fields are technically issues that need to be fixed later + symlinksNotReflected?: readonly string[]; } export interface TscWatchCheckOptions { baselineSourceMap?: boolean; @@ -212,12 +219,13 @@ export interface RunWatchBaseline extends BaselineB sys: TscWatchSystem; getPrograms: () => readonly CommandLineProgram[]; watchOrSolution: WatchOrSolution; + useSourceOfProjectReferenceRedirect?: () => boolean; } export function runWatchBaseline({ scenario, subScenario, commandLineArgs, getPrograms, sys, baseline, oldSnap, baselineSourceMap, baselineDependencies, - edits, watchOrSolution + edits, watchOrSolution, useSourceOfProjectReferenceRedirect, }: RunWatchBaseline) { baseline.push(`${sys.getExecutingFilePath()} ${commandLineArgs.join(" ")}`); let programs = watchBaseline({ @@ -231,7 +239,7 @@ export function runWatchBaseline | undefined)?.getResolutionCache?.(), + useSourceOfProjectReferenceRedirect, + symlinksNotReflected, + userResolvedModuleNames, }); } } @@ -259,20 +272,101 @@ export function isWatch(commandLineArgs: readonly string[]) { export interface WatchBaseline extends BaselineBase, TscWatchCheckOptions { oldPrograms: readonly (CommandLineProgram | undefined)[]; getPrograms: () => readonly CommandLineProgram[]; + caption?: string; + resolutionCache?: ts.ResolutionCache; + useSourceOfProjectReferenceRedirect?: () => boolean; + userResolvedModuleNames?: true; + symlinksNotReflected?: readonly string[] } -export function watchBaseline({ baseline, getPrograms, oldPrograms, sys, oldSnap, baselineSourceMap, baselineDependencies }: WatchBaseline) { +export function watchBaseline({ + baseline, + getPrograms, + oldPrograms, + sys, + oldSnap, + baselineSourceMap, + baselineDependencies, + caption, + resolutionCache, + useSourceOfProjectReferenceRedirect, + userResolvedModuleNames, + symlinksNotReflected, +}: WatchBaseline) { if (baselineSourceMap) generateSourceMapBaselineFiles(sys); sys.serializeOutput(baseline); - const programs = baselinePrograms(baseline, getPrograms, oldPrograms, baselineDependencies); + const programs = getPrograms(); + baselinePrograms(baseline, programs, oldPrograms, baselineDependencies); sys.serializeWatches(baseline); baseline.push(`exitCode:: ExitStatus.${ts.ExitStatus[sys.exitCode as ts.ExitStatus]}`, ""); sys.diff(baseline, oldSnap); sys.writtenFiles.forEach((value, key) => { assert.equal(value, 1, `Expected to write file ${key} only once`); }); + // Verify program structure and resolution cache when incremental edit with tsc --watch (without build mode) + if (resolutionCache && programs.length) { + ts.Debug.assert(programs.length === 1); + verifyProgramStructureAndResolutionCache( + caption!, + sys, + programs[0][0], + resolutionCache, + useSourceOfProjectReferenceRedirect, + userResolvedModuleNames, + symlinksNotReflected, + ); + } sys.writtenFiles.clear(); return programs; } +function verifyProgramStructureAndResolutionCache( + caption: string, + sys: TscWatchSystem, + program: ts.Program, + resolutionCache: ts.ResolutionCache, + useSourceOfProjectReferenceRedirect?: () => boolean, + userResolvedModuleNames?: true, + symlinksNotReflected?: readonly string[], +) { + const options = program.getCompilerOptions(); + const compilerHost = ts.createCompilerHostWorker(options, /*setParentNodes*/ undefined, sys); + compilerHost.trace = ts.noop; + compilerHost.writeFile = ts.notImplemented; + compilerHost.useSourceOfProjectReferenceRedirect = useSourceOfProjectReferenceRedirect; + const readFile = compilerHost.readFile; + compilerHost.readFile = fileName => { + const text = readFile.call(compilerHost, fileName); + if (!ts.contains(symlinksNotReflected, fileName)) return text; + // Handle symlinks that dont reflect the watch change + ts.Debug.assert(sys.toPath(sys.realpath(fileName)) !== sys.toPath(fileName)); + const file = program.getSourceFile(fileName)!; + ts.Debug.assert(file.text !== text); + return file.text; + }; + verifyProgramStructure(ts.createProgram({ + rootNames: program.getRootFileNames(), + options, + projectReferences: program.getProjectReferences(), + host: compilerHost, + }), program, caption); + verifyResolutionCache(resolutionCache, program, { + ...compilerHost, + + getCompilerHost: () => compilerHost, + toPath: fileName => sys.toPath(fileName), + getCompilationSettings: () => options, + fileIsOpen: ts.returnFalse, + getCurrentProgram: () => program, + + watchDirectoryOfFailedLookupLocation: ts.returnNoopFileWatcher, + watchAffectingFileLocation: ts.returnNoopFileWatcher, + onInvalidatedResolution: ts.noop, + watchTypeRootsDirectory: ts.returnNoopFileWatcher, + onChangedAutomaticTypeDirectiveNames: ts.noop, + scheduleInvalidateResolutionsOfFailedLookupLocations: ts.noop, + getCachedDirectoryStructureHost: ts.returnUndefined, + writeLog: ts.noop, + }, caption, userResolvedModuleNames); +} export interface VerifyTscWatch extends TscWatchCompile { baselineIncremental?: boolean; } diff --git a/src/testRunner/unittests/helpers/tsserver.ts b/src/testRunner/unittests/helpers/tsserver.ts index 3a9b6c1e33505..e18785564380e 100644 --- a/src/testRunner/unittests/helpers/tsserver.ts +++ b/src/testRunner/unittests/helpers/tsserver.ts @@ -1,4 +1,12 @@ import { incrementalVerifier } from "../../../harness/incrementalUtils"; +import { + createHasErrorMessageLogger, + createLoggerWithInMemoryLogs, + Logger, + nowString, + replaceAll, + sanitizeLog, +} from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { ActionWatchTypingLocations } from "../../_namespaces/ts.server"; @@ -36,30 +44,6 @@ export const customTypesMap = { } }` }; - -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 PostExecAction { readonly success: boolean; requestId: number; @@ -67,111 +51,6 @@ export interface PostExecAction { readonly callback: ts.server.typingsInstaller.RequestCompletedAction; } -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); - } -} - -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); -} - -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*"[_$a-zA-Z][_$_$a-zA-Z0-9]*\|\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")); diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index 5702e3bca76ee..ee5c1c5b5c4a1 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -1,18 +1,15 @@ +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, @@ -278,14 +275,12 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, private fs = new Map(); private time = timeIncrements; getCanonicalFileName: (s: string) => string; - private toPath: (f: string) => Path; + toPath: (f: string) => Path; readonly timeoutCallbacks = new Callbacks(this, "Timeout"); 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; @@ -612,27 +607,8 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, this.removeFileOrFolder(currentEntry); } - private 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, - this.toFullPath(fileName), - { cb, pollingInterval } - ); + return this.watchUtils.watchFile(this.toFullPath(fileName), cb, pollingInterval); } private fsWatchWorker( @@ -644,20 +620,13 @@ 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, - path, - { - cb, - inode: this.inodes?.get(path) - } - ) as FsWatchWorkerWatcher; + const result = this.watchUtils.fsWatch(path, recursive, cb, path => this.inodes?.get(path)) as FsWatchWorkerWatcher; result.on = noop; return result; } invokeFileWatcher(fileFullPath: string, eventKind: FileWatcherEventKind, modifiedTime: Date | undefined) { - invokeWatcherCallbacks(this.watchedFiles.get(this.toPath(fileFullPath)), ({ cb }) => cb(fileFullPath, eventKind, modifiedTime)); + invokeWatcherCallbacks(this.watchUtils.watchedFiles.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) { @@ -673,11 +642,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) { @@ -993,16 +962,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; + return this.watchUtils.serializeWatches(baseline); } realpath(s: string): string { @@ -1104,56 +1065,6 @@ function diffFsEntry(baseline: string[], oldFsEntry: FSEntry | undefined, newFsE } } -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/tsbuild/publicApi.ts b/src/testRunner/unittests/tsbuild/publicApi.ts index 0359a62a7a42a..ad79121eb8365 100644 --- a/src/testRunner/unittests/tsbuild/publicApi.ts +++ b/src/testRunner/unittests/tsbuild/publicApi.ts @@ -74,7 +74,7 @@ export function f22() { } // trailing`, sys.exit(exitStatus); sys.write(`exitCode:: ExitStatus.${ts.ExitStatus[sys.exitCode as ts.ExitStatus]}\n`); const baseline: string[] = []; - baselinePrograms(baseline, getPrograms, ts.emptyArray, /*baselineDependencies*/ false); + baselinePrograms(baseline, getPrograms(), ts.emptyArray, /*baselineDependencies*/ false); sys.write(baseline.join("\n")); fs.makeReadonly(); sys.baseLine = () => { diff --git a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts index da9db45871b84..85acc56cc5acf 100644 --- a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts @@ -211,6 +211,7 @@ a;b; edit: sys => sys.prependFile(diskPath, `// some comment `), timeouts: sys => sys.runQueuedTimeoutCallbacks(), + symlinksNotReflected: [`/user/username/projects/myproject/link.ts`] } ], }); @@ -262,6 +263,7 @@ a;b; edit: sys => sys.prependFile(`${diskPath}/a.ts`, `// some comment `), timeouts: sys => sys.runQueuedTimeoutCallbacks(), + symlinksNotReflected: [`/user/username/projects/myproject/link/a.ts`] } ], }); diff --git a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts index e8f6810564ca4..8a50825695dbe 100644 --- a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts +++ b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts @@ -45,7 +45,8 @@ describe("unittests:: tsc-watch:: watchAPI:: with sourceOfProjectReferenceRedire baseline, oldSnap, getPrograms, - watchOrSolution: watch + watchOrSolution: watch, + useSourceOfProjectReferenceRedirect: ts.returnTrue, }); } diff --git a/src/testRunner/unittests/tscWatch/watchApi.ts b/src/testRunner/unittests/tscWatch/watchApi.ts index 81274cbbf1932..32e8bb69cb790 100644 --- a/src/testRunner/unittests/tscWatch/watchApi.ts +++ b/src/testRunner/unittests/tscWatch/watchApi.ts @@ -103,11 +103,13 @@ describe("unittests:: tsc-watch:: watchAPI:: tsc-watch with custom module resolu caption: "write other with same contents", edit: sys => sys.appendFile(`/user/username/projects/myproject/other.d.ts`, ""), timeouts: sys => sys.runQueuedTimeoutCallbacks(), + userResolvedModuleNames: true, }, { caption: "change other file", edit: sys => sys.appendFile(`/user/username/projects/myproject/other.d.ts`, "export function bar(): void;"), timeouts: sys => sys.runQueuedTimeoutCallbacks(), + userResolvedModuleNames: true, }, { caption: "write other with same contents but write ts file", @@ -116,6 +118,7 @@ describe("unittests:: tsc-watch:: watchAPI:: tsc-watch with custom module resolu sys.writeFile(`/user/username/projects/myproject/other.ts`, "export function foo() {}"); }, timeouts: sys => sys.runQueuedTimeoutCallbacks(), + userResolvedModuleNames: true, }, ], watchOrSolution: watch @@ -583,7 +586,8 @@ describe("unittests:: tsc-watch:: watchAPI:: when getParsedCommandLine is implem timeouts: sys => sys.logTimeoutQueueLength(), }, ], - watchOrSolution: watch + watchOrSolution: watch, + useSourceOfProjectReferenceRedirect: ts.returnTrue, }); }); diff --git a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts index d78e6168b0470..057f4ac42f2ea 100644 --- a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts +++ b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts @@ -1,3 +1,4 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -5,7 +6,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 f07a52f9112eb..f26ffe58917e4 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -1,7 +1,7 @@ +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 36f0e6cb45a69..e95141ec14c90 100644 --- a/src/testRunner/unittests/tsserver/auxiliaryProject.ts +++ b/src/testRunner/unittests/tsserver/auxiliaryProject.ts @@ -1,7 +1,7 @@ +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/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 250a9ffc94a8f..c0a7c35c0b194 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -1,11 +1,13 @@ +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 b095bd690de59..dd41ef9d17787 100644 --- a/src/testRunner/unittests/tsserver/cancellationToken.ts +++ b/src/testRunner/unittests/tsserver/cancellationToken.ts @@ -1,7 +1,7 @@ +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 9e8f783d65186..ff6fc62e16809 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 e385dad6c06e6..d34ea3da18157 100644 --- a/src/testRunner/unittests/tsserver/completions.ts +++ b/src/testRunner/unittests/tsserver/completions.ts @@ -1,7 +1,7 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, TestTypingsInstaller, diff --git a/src/testRunner/unittests/tsserver/completionsIncomplete.ts b/src/testRunner/unittests/tsserver/completionsIncomplete.ts index ad52b6ebe3c16..dc2c58c11b6ff 100644 --- a/src/testRunner/unittests/tsserver/completionsIncomplete.ts +++ b/src/testRunner/unittests/tsserver/completionsIncomplete.ts @@ -1,7 +1,7 @@ +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 17682e3042056..60b2229a93e76 100644 --- a/src/testRunner/unittests/tsserver/configFileSearch.ts +++ b/src/testRunner/unittests/tsserver/configFileSearch.ts @@ -1,6 +1,6 @@ +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 a496d5612849c..509b49f5cd3e6 100644 --- a/src/testRunner/unittests/tsserver/configuredProjects.ts +++ b/src/testRunner/unittests/tsserver/configuredProjects.ts @@ -1,3 +1,4 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { ensureErrorFreeBuild } from "../helpers/solutionBuilder"; import { @@ -6,7 +7,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 1539380be3728..c302fda6e6b4a 100644 --- a/src/testRunner/unittests/tsserver/declarationFileMaps.ts +++ b/src/testRunner/unittests/tsserver/declarationFileMaps.ts @@ -1,8 +1,8 @@ +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 3b3a5b63150dd..f9e3323398836 100644 --- a/src/testRunner/unittests/tsserver/documentRegistry.ts +++ b/src/testRunner/unittests/tsserver/documentRegistry.ts @@ -1,9 +1,9 @@ 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 3d4f31cba11e1..8c02d8af69add 100644 --- a/src/testRunner/unittests/tsserver/duplicatePackages.ts +++ b/src/testRunner/unittests/tsserver/duplicatePackages.ts @@ -1,7 +1,7 @@ +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 4d1c79c582891..c4fd9811b8d95 100644 --- a/src/testRunner/unittests/tsserver/dynamicFiles.ts +++ b/src/testRunner/unittests/tsserver/dynamicFiles.ts @@ -1,7 +1,7 @@ +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 c62579832b33e..43ec2011395de 100644 --- a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts +++ b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts @@ -1,7 +1,7 @@ +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 6ce697771b67a..a13b6eda309b3 100644 --- a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts +++ b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts @@ -1,7 +1,7 @@ +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 90781f75c8bba..e9d0002bd383d 100644 --- a/src/testRunner/unittests/tsserver/events/projectLoading.ts +++ b/src/testRunner/unittests/tsserver/events/projectLoading.ts @@ -1,7 +1,7 @@ +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 19be7628c980b..b1396abfb8fdc 100644 --- a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts +++ b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts @@ -1,7 +1,7 @@ +import { createLoggerWithInMemoryLogs } from "../../../../harness/tsserverLogger"; import * as ts from "../../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, createSessionWithCustomEventHandler, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/exportMapCache.ts b/src/testRunner/unittests/tsserver/exportMapCache.ts index 601be84a76f4a..3624e463a9187 100644 --- a/src/testRunner/unittests/tsserver/exportMapCache.ts +++ b/src/testRunner/unittests/tsserver/exportMapCache.ts @@ -1,7 +1,7 @@ +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 da16b435cd1d8..ad64ece0c1f13 100644 --- a/src/testRunner/unittests/tsserver/extends.ts +++ b/src/testRunner/unittests/tsserver/extends.ts @@ -1,7 +1,7 @@ +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 ff20e0c081fb1..58a98ef9de7fe 100644 --- a/src/testRunner/unittests/tsserver/externalProjects.ts +++ b/src/testRunner/unittests/tsserver/externalProjects.ts @@ -1,8 +1,8 @@ +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 85b1b4b05fcaa..f30ffad17828d 100644 --- a/src/testRunner/unittests/tsserver/findAllReferences.ts +++ b/src/testRunner/unittests/tsserver/findAllReferences.ts @@ -1,5 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import { protocol } from "../../_namespaces/ts.server"; -import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession } from "../helpers/tsserver"; +import { + baselineTsserverLogs, + createSession, +} from "../helpers/tsserver"; import { createServerHost, File } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: services:: findAllReferences", () => { diff --git a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts index 6dbfe687f421e..7ce8213a2ea55 100644 --- a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts @@ -1,8 +1,8 @@ +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 2978804b91d8a..5f526376c1077 100644 --- a/src/testRunner/unittests/tsserver/formatSettings.ts +++ b/src/testRunner/unittests/tsserver/formatSettings.ts @@ -1,5 +1,10 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession, openFilesForSession } from "../helpers/tsserver"; +import { + baselineTsserverLogs, + createSession, + openFilesForSession, +} from "../helpers/tsserver"; import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: formatSettings", () => { diff --git a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts index 793ee5cfd0979..e98905c29955c 100644 --- a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts +++ b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts @@ -1,7 +1,7 @@ +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 e9e717cce003b..5086a538a6c28 100644 --- a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts +++ b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts @@ -1,7 +1,7 @@ +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 1219a07c2f3b1..b947d363ffffd 100644 --- a/src/testRunner/unittests/tsserver/getExportReferences.ts +++ b/src/testRunner/unittests/tsserver/getExportReferences.ts @@ -1,7 +1,7 @@ +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 147f9091c3f1d..6ebb4f298226d 100644 --- a/src/testRunner/unittests/tsserver/getFileReferences.ts +++ b/src/testRunner/unittests/tsserver/getFileReferences.ts @@ -1,7 +1,7 @@ +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 e70ab769cb052..a964858474ae5 100644 --- a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts +++ b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts @@ -1,7 +1,7 @@ +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 852fc7d5588b3..a2514c9dc7b97 100644 --- a/src/testRunner/unittests/tsserver/goToDefinition.ts +++ b/src/testRunner/unittests/tsserver/goToDefinition.ts @@ -1,5 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import { protocol } from "../../_namespaces/ts.server"; -import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession } from "../helpers/tsserver"; +import { + baselineTsserverLogs, + createSession, +} from "../helpers/tsserver"; import { createServerHost, File } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: services:: goToDefinition", () => { diff --git a/src/testRunner/unittests/tsserver/importHelpers.ts b/src/testRunner/unittests/tsserver/importHelpers.ts index cad9e1c491552..ef34d62b3b4c0 100644 --- a/src/testRunner/unittests/tsserver/importHelpers.ts +++ b/src/testRunner/unittests/tsserver/importHelpers.ts @@ -1,6 +1,6 @@ +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 fdee92a017186..9e18428883cbf 100644 --- a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts +++ b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts @@ -1,7 +1,7 @@ +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 abe55289e5222..8af1cad41867b 100644 --- a/src/testRunner/unittests/tsserver/inferredProjects.ts +++ b/src/testRunner/unittests/tsserver/inferredProjects.ts @@ -1,9 +1,10 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; +import { dedent } from "../../_namespaces/Utils"; import { commonFile1 } from "../helpers/tscWatch"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, logInferredProjectsOrphanStatus, @@ -289,4 +290,41 @@ describe("unittests:: tsserver:: inferredProjects", () => { session.testhost.logTimeoutQueueLength(); baselineTsserverLogs("inferredProjects", "Setting compiler options for inferred projects when there are no open files should not schedule any refresh", session); }); + + it("when existing inferred project has no root files", () => { + const host = createServerHost({ + "/user/username/projects/myproject/app.ts": dedent` + import {x} from "./module"; + `, + // Removing resolutions of this happens after program gets created and we are removing not needed files + "/user/username/projects/myproject/module.d.ts": dedent` + import {y} from "./module2"; + import {a} from "module3"; + export const x = y; + export const b = a; + `, + "/user/username/projects/myproject/module2.d.ts": dedent` + export const y = 10; + `, + "/user/username/projects/myproject/node_modules/module3/package.json": JSON.stringify({ + name: "module3", + version: "1.0.0", + }), + "/user/username/projects/myproject/node_modules/module3/index.d.ts": dedent` + export const a = 10; + `, + [libFile.path]: libFile.content, + }); + const session = createSession(host, { logger: createLoggerWithInMemoryLogs(host) }); + openFilesForSession([{ + file: "/user/username/projects/myproject/app.ts", + projectRootPath: "/user/username/projects/myproject", + }], session); + closeFilesForSession(["/user/username/projects/myproject/app.ts"], session); + openFilesForSession([{ + file: "/user/username/projects/myproject/module.d.ts", + projectRootPath: "/user/username/projects/myproject", + }], session); + baselineTsserverLogs("inferredProjects", "when existing inferred project has no root files", session); + }); }); diff --git a/src/testRunner/unittests/tsserver/inlayHints.ts b/src/testRunner/unittests/tsserver/inlayHints.ts index 375393932892b..89ef5cdf339dd 100644 --- a/src/testRunner/unittests/tsserver/inlayHints.ts +++ b/src/testRunner/unittests/tsserver/inlayHints.ts @@ -1,3 +1,4 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -5,7 +6,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 1c1ffd51a1003..bc1a345ea715d 100644 --- a/src/testRunner/unittests/tsserver/jsdocTag.ts +++ b/src/testRunner/unittests/tsserver/jsdocTag.ts @@ -1,7 +1,7 @@ +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 ae95669213adb..8edc21ab52ab5 100644 --- a/src/testRunner/unittests/tsserver/languageService.ts +++ b/src/testRunner/unittests/tsserver/languageService.ts @@ -1,5 +1,10 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as Utils from "../../_namespaces/Utils"; -import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createProjectService, logDiagnostics } from "../helpers/tsserver"; +import { + baselineTsserverLogs, + createProjectService, + logDiagnostics, +} from "../helpers/tsserver"; import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: languageService", () => { diff --git a/src/testRunner/unittests/tsserver/libraryResolution.ts b/src/testRunner/unittests/tsserver/libraryResolution.ts index 213e538ed70c7..93daadce49680 100644 --- a/src/testRunner/unittests/tsserver/libraryResolution.ts +++ b/src/testRunner/unittests/tsserver/libraryResolution.ts @@ -1,7 +1,7 @@ +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 02b722bf0165d..d641d025cf80a 100644 --- a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts +++ b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts @@ -1,8 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; +import { dedent } from "../../_namespaces/Utils"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, setCompilerOptionsForInferredProjectsRequestForSession, @@ -59,4 +60,29 @@ describe("unittests:: tsserver:: maxNodeModuleJsDepth for inferred projects", () session.logger.log(`maxNodeModuleJsDepth: ${session.getProjectService().inferredProjects[0].getCompilationSettings().maxNodeModuleJsDepth}`); baselineTsserverLogs("maxNodeModuleJsDepth", "should return to normal state when all js root files are removed from project", session); }); + + it("handles resolutions when currentNodeModulesDepth changes when referencing file from another file", () => { + const host = createServerHost({ + "/user/username/projects/project1/src/file1.js": dedent` + import {x} from 'glob'; + import {y} from 'minimatch'; // This imported file will add imports from minimatch to program + `, + "/user/username/projects/project1/src/node_modules/glob/index.js": dedent` + import { y } from "minimatch"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program + export const x = y; + `, + "/user/username/projects/project1/src/node_modules/minimatch/index.js": dedent` + import { z } from "path"; // This will be resolved two times + export const y = z; + `, + "/user/username/projects/project1/src/node_modules/path/index.js": dedent` + export const z = 10; + `, + [libFile.path]: libFile.content, + }); + const session = createSession(host, { useSingleInferredProject: true, logger: createLoggerWithInMemoryLogs(host) }); + + openFilesForSession(["/user/username/projects/project1/src/file1.js"], session); + baselineTsserverLogs("maxNodeModuleJsDepth", "handles resolutions when currentNodeModulesDepth changes when referencing file from another file", session); + }); }); diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts index e69b1ab1f198c..e3b165f4f7e12 100644 --- a/src/testRunner/unittests/tsserver/metadataInResponse.ts +++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts @@ -1,8 +1,8 @@ +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 f0ff49c993cfb..511d31383e089 100644 --- a/src/testRunner/unittests/tsserver/moduleResolution.ts +++ b/src/testRunner/unittests/tsserver/moduleResolution.ts @@ -1,8 +1,8 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as Utils from "../../_namespaces/Utils"; import { getFsConentsForNode10ResultAtTypesPackageJson, getFsContentsForNode10Result, getFsContentsForNode10ResultDts, getFsContentsForNode10ResultPackageJson } from "../helpers/node10Result"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, verifyGetErrRequest, diff --git a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts index 5e06f62d75a52..124d9341d5951 100644 --- a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts +++ b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts @@ -1,7 +1,7 @@ +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 db9303a635ee2..13c69d4d4ccd9 100644 --- a/src/testRunner/unittests/tsserver/navTo.ts +++ b/src/testRunner/unittests/tsserver/navTo.ts @@ -1,7 +1,7 @@ +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 e9eb1552bf3e3..68b77e99aa3ec 100644 --- a/src/testRunner/unittests/tsserver/occurences.ts +++ b/src/testRunner/unittests/tsserver/occurences.ts @@ -1,7 +1,7 @@ +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 3d3c9c1929a85..da3302a6bd472 100644 --- a/src/testRunner/unittests/tsserver/openFile.ts +++ b/src/testRunner/unittests/tsserver/openFile.ts @@ -1,8 +1,8 @@ +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 1f7e4a740c5f1..bd29cb5702da5 100644 --- a/src/testRunner/unittests/tsserver/packageJsonInfo.ts +++ b/src/testRunner/unittests/tsserver/packageJsonInfo.ts @@ -1,7 +1,7 @@ +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 ed8d7a988dad4..b9e502f9256d1 100644 --- a/src/testRunner/unittests/tsserver/partialSemanticServer.ts +++ b/src/testRunner/unittests/tsserver/partialSemanticServer.ts @@ -1,8 +1,8 @@ +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 df0befc74e0d1..a1363dbe450bb 100644 --- a/src/testRunner/unittests/tsserver/plugins.ts +++ b/src/testRunner/unittests/tsserver/plugins.ts @@ -1,8 +1,8 @@ +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 1dda2ff6d5dce..7bb3129f1b490 100644 --- a/src/testRunner/unittests/tsserver/pluginsAsync.ts +++ b/src/testRunner/unittests/tsserver/pluginsAsync.ts @@ -1,9 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { defer } from "../../_namespaces/Utils"; 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 20f38c4ab8fc4..5aabbcbbf4edc 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -1,9 +1,9 @@ +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 e9f24f00bf8b0..b804fbe0ca804 100644 --- a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts +++ b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts @@ -1,8 +1,8 @@ +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 e9d07963f0cab..42b04adca120e 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1,9 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { solutionBuildWithBaseline } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, createHostWithSolutionBuild, - createLoggerWithInMemoryLogs, createProjectService, createSession, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts index d4b0637994224..b168260266573 100644 --- a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts +++ b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts @@ -1,9 +1,9 @@ +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 4745650a853d6..2b298e7378935 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1,3 +1,4 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { commonFile1, @@ -6,7 +7,6 @@ import { import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, customTypesMap, diff --git a/src/testRunner/unittests/tsserver/projectsWithReferences.ts b/src/testRunner/unittests/tsserver/projectsWithReferences.ts index 1594df78fffc5..e2ce3f926d341 100644 --- a/src/testRunner/unittests/tsserver/projectsWithReferences.ts +++ b/src/testRunner/unittests/tsserver/projectsWithReferences.ts @@ -1,6 +1,6 @@ +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 f27d828a93ec9..fcfdccaaad628 100644 --- a/src/testRunner/unittests/tsserver/refactors.ts +++ b/src/testRunner/unittests/tsserver/refactors.ts @@ -1,7 +1,7 @@ +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 1930c9b5e5cc2..1b17c43593ba4 100644 --- a/src/testRunner/unittests/tsserver/reload.ts +++ b/src/testRunner/unittests/tsserver/reload.ts @@ -1,8 +1,8 @@ +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 925a080ae7a3c..649587c4a8cca 100644 --- a/src/testRunner/unittests/tsserver/reloadProjects.ts +++ b/src/testRunner/unittests/tsserver/reloadProjects.ts @@ -1,7 +1,7 @@ +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 01d657dadce77..5695765c2c99b 100644 --- a/src/testRunner/unittests/tsserver/rename.ts +++ b/src/testRunner/unittests/tsserver/rename.ts @@ -1,7 +1,7 @@ +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 4458e2307db00..c1bd73c76fb4d 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -1,10 +1,10 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; import { compilerOptionsToConfigJson } 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 572ee1974b300..2093b76f9982f 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -1,12 +1,12 @@ import { expect } from "chai"; +import { mockHash } from "../../../harness/harnessIO"; 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 ts from "../../_namespaces/ts"; let lastWrittenToHost: string; const noopFileWatcher: ts.FileWatcher = { close: ts.noop }; @@ -31,7 +31,7 @@ const mockHost: ts.server.ServerHost = { clearTimeout: ts.noop, setImmediate: () => 0, clearImmediate: ts.noop, - createHash: Harness.mockHash, + createHash: mockHash, watchFile: () => noopFileWatcher, watchDirectory: () => noopFileWatcher }; diff --git a/src/testRunner/unittests/tsserver/skipLibCheck.ts b/src/testRunner/unittests/tsserver/skipLibCheck.ts index f14917af5d70e..6d84036352b40 100644 --- a/src/testRunner/unittests/tsserver/skipLibCheck.ts +++ b/src/testRunner/unittests/tsserver/skipLibCheck.ts @@ -1,7 +1,7 @@ +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 8b6285deac2bd..7ec4aa7312653 100644 --- a/src/testRunner/unittests/tsserver/smartSelection.ts +++ b/src/testRunner/unittests/tsserver/smartSelection.ts @@ -1,7 +1,7 @@ +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 0da7e4779aa4a..43248402bca10 100644 --- a/src/testRunner/unittests/tsserver/symLinks.ts +++ b/src/testRunner/unittests/tsserver/symLinks.ts @@ -1,7 +1,7 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createSession, openFilesForSession, protocolLocationFromSubstring, diff --git a/src/testRunner/unittests/tsserver/symlinkCache.ts b/src/testRunner/unittests/tsserver/symlinkCache.ts index 4729f2c69a2ce..0a05780a3e843 100644 --- a/src/testRunner/unittests/tsserver/symlinkCache.ts +++ b/src/testRunner/unittests/tsserver/symlinkCache.ts @@ -1,7 +1,7 @@ +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 d862f671d2ee9..110173c102c9b 100644 --- a/src/testRunner/unittests/tsserver/syntacticServer.ts +++ b/src/testRunner/unittests/tsserver/syntacticServer.ts @@ -1,8 +1,8 @@ +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 7e9b236627f7e..d092a11bb8114 100644 --- a/src/testRunner/unittests/tsserver/syntaxOperations.ts +++ b/src/testRunner/unittests/tsserver/syntaxOperations.ts @@ -1,7 +1,7 @@ +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 8110855af22d3..e2c030026953b 100644 --- a/src/testRunner/unittests/tsserver/telemetry.ts +++ b/src/testRunner/unittests/tsserver/telemetry.ts @@ -1,8 +1,8 @@ +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 1fd554836296d..917ac7c7bc2cc 100644 --- a/src/testRunner/unittests/tsserver/textStorage.ts +++ b/src/testRunner/unittests/tsserver/textStorage.ts @@ -1,5 +1,9 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createProjectService } from "../helpers/tsserver"; +import { + baselineTsserverLogs, + createProjectService, +} from "../helpers/tsserver"; import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: Text storage", () => { diff --git a/src/testRunner/unittests/tsserver/typeAquisition.ts b/src/testRunner/unittests/tsserver/typeAquisition.ts index a8b1ef9105189..f5d91336d0710 100644 --- a/src/testRunner/unittests/tsserver/typeAquisition.ts +++ b/src/testRunner/unittests/tsserver/typeAquisition.ts @@ -1,7 +1,7 @@ +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, - createLoggerWithInMemoryLogs, createProjectService, TestTypingsInstaller, toExternalFile, diff --git a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts index 8c94118ace930..07966b03b645f 100644 --- a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts +++ b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts @@ -1,7 +1,7 @@ +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 cd655c090180f..48e0978c6774e 100644 --- a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts +++ b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts @@ -1,6 +1,6 @@ +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 efd8f60423965..3603fa7bf3f9e 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -1,13 +1,15 @@ +import { + createLoggerWithInMemoryLogs, + Logger, +} from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; import { baselineTsserverLogs, closeFilesForSession, - createLoggerWithInMemoryLogs, createProjectService, createSession, createTypesRegistry, customTypesMap, - Logger, openFilesForSession, TestSessionAndServiceHost, TestSessionRequest, diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts index 56ed33c1fca5e..70039afb9198e 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/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 4571351e5a9cc..8f7e325a80769 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -7513,7 +7513,7 @@ declare namespace ts { * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; getEnvironmentVariable?(name: string): string | undefined; /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ @@ -9788,7 +9788,7 @@ declare namespace ts { * If provided, used to resolve type reference directives, otherwise typescript's default resolution */ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ hasInvalidatedResolutions?(filePath: Path): boolean; @@ -10035,7 +10035,7 @@ declare namespace ts { getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined; /** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; getDirectories?(directoryName: string): string[]; /** diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 09abb27b97058..ea347d8f8e7e2 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3455,7 +3455,7 @@ declare namespace ts { * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files */ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; getEnvironmentVariable?(name: string): string | undefined; /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ @@ -5730,7 +5730,7 @@ declare namespace ts { * If provided, used to resolve type reference directives, otherwise typescript's default resolution */ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ hasInvalidatedResolutions?(filePath: Path): boolean; @@ -6061,7 +6061,7 @@ declare namespace ts { getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined; /** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */ resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; + resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined, ambientModuleNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; getDirectories?(directoryName: string): string[]; /** diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js index d3930c936fd9e..5de105b8ed083 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-installing-something-in-node_modules-or-@types-when-there-is-no-notification-from-fs-for-index-file.js @@ -234,6 +234,8 @@ FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/ FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/ts3.6/base.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/base.d.ts 250 undefined Source file FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types/node/index.d.ts 250 undefined Source file +DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. 1 process.on("uncaughtException"); @@ -282,11 +284,13 @@ FsWatches *deleted*:: FsWatchesRecursive:: /user/username/projects/myproject: {} -/user/username/projects/myproject/node_modules: - {} /user/username/projects/myproject/node_modules/@types: {} +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/node_modules: + {} + exitCode:: ExitStatus.undefined //// [/user/username/projects/myproject/worker.js] file written with same contents @@ -299,17 +303,14 @@ export const foo = 10; Before running Timeout callback:: count: 2 -42: timerToInvalidateFailedLookupResolutions -43: timerToUpdateProgram +39: timerToInvalidateFailedLookupResolutions +40: timerToUpdateProgram After running Timeout callback:: count: 0 Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots Scheduling update Scheduling invalidateFailedLookup Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations -Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory @@ -317,9 +318,6 @@ DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules Scheduling update Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations -Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory @@ -327,9 +325,6 @@ DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules Scheduling update Scheduling invalidateFailedLookup, Cancelled earlier one Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots -DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations -Scheduling invalidateFailedLookup, Cancelled earlier one -Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory Scheduling update Elapsed:: *ms DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts :: WatchInfo: /user/username/projects/myproject 1 undefined Wild card directory @@ -340,6 +335,8 @@ Synchronizing program CreatingProgramWith:: roots: ["/user/username/projects/myproject/worker.ts"] options: {"watch":true,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Failed Lookup Locations FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types/mocha/index.d.ts 250 undefined Source file worker.ts:1:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. @@ -381,7 +378,7 @@ FsWatches:: FsWatchesRecursive:: /user/username/projects/myproject: {} -/user/username/projects/myproject/node_modules: +/user/username/projects/myproject/node_modules: *new* {} /user/username/projects/myproject/node_modules/@types: {} @@ -394,8 +391,8 @@ Change:: npm ci step three: create atTypes node folder Input:: Before running Timeout callback:: count: 2 -46: timerToInvalidateFailedLookupResolutions -47: timerToUpdateProgram +43: timerToInvalidateFailedLookupResolutions +44: timerToUpdateProgram After running Timeout callback:: count: 0 Output:: DirectoryWatcher:: Triggered with /user/username/projects/myproject/node_modules/@types/node :: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots @@ -487,8 +484,8 @@ declare namespace NodeJS { Before running Timeout callback:: count: 2 -52: timerToUpdateProgram -54: timerToInvalidateFailedLookupResolutions +49: timerToUpdateProgram +51: timerToInvalidateFailedLookupResolutions After running Timeout callback:: count: 0 Before running Timeout callback:: count: 0 After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js index 25b4f698510e2..5f2c75676b330 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-module-resolution-changes-to-ambient-module.js @@ -145,12 +145,10 @@ Shape signatures in builder refreshed for:: /users/username/projects/project/node_modules/@types/node/index.d.ts (used version) PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: /users/username/projects/node_modules: {"pollingInterval":500} +/users/username/projects/node_modules/@types: + {"pollingInterval":500} FsWatches:: /a/lib/lib.d.ts: @@ -163,12 +161,10 @@ FsWatches:: {} FsWatchesRecursive:: -/users/username/projects/project/node_modules/@types: - {} - -FsWatchesRecursive *deleted*:: /users/username/projects/project/node_modules: {} +/users/username/projects/project/node_modules/@types: + {} exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js b/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js index 1a61caf38f75c..fc24278cff15e 100644 --- a/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js +++ b/tests/baselines/reference/tsserver/cachingFileSystemInformation/loads-missing-files-from-disk.js @@ -42,8 +42,8 @@ Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] getSemanticDiagnostics:: /users/username/projects/project/foo.ts:: 1 Info seq [hh:mm:ss:mss] foo.ts(1,17): error TS2792: Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/username/projects/project/tsconfig.json","count":2},{"key":"/users/username/projects/project/jsconfig.json","count":2},{"key":"/users/username/projects/tsconfig.json","count":1},{"key":"/users/username/projects/jsconfig.json","count":1},{"key":"/users/username/tsconfig.json","count":1},{"key":"/users/username/jsconfig.json","count":1},{"key":"/users/tsconfig.json","count":1},{"key":"/users/jsconfig.json","count":1},{"key":"/tsconfig.json","count":1},{"key":"/jsconfig.json","count":1},{"key":"/users/username/projects/project/bar.ts","count":1},{"key":"/users/username/projects/project/bar.tsx","count":1},{"key":"/users/username/projects/project/bar.d.ts","count":1},{"key":"/users/username/projects/bar.ts","count":1},{"key":"/users/username/projects/bar.tsx","count":1},{"key":"/users/username/projects/bar.d.ts","count":1},{"key":"/users/username/bar.ts","count":1},{"key":"/users/username/bar.tsx","count":1},{"key":"/users/username/bar.d.ts","count":1},{"key":"/users/bar.ts","count":1},{"key":"/users/bar.tsx","count":1},{"key":"/users/bar.d.ts","count":1},{"key":"/bar.ts","count":1},{"key":"/bar.tsx","count":1},{"key":"/bar.d.ts","count":1},{"key":"/users/username/projects/project/bar.js","count":1},{"key":"/users/username/projects/project/bar.jsx","count":1},{"key":"/users/username/projects/bar.js","count":1},{"key":"/users/username/projects/bar.jsx","count":1},{"key":"/users/username/bar.js","count":1},{"key":"/users/username/bar.jsx","count":1},{"key":"/users/bar.js","count":1},{"key":"/users/bar.jsx","count":1},{"key":"/bar.js","count":1},{"key":"/bar.jsx","count":1},{"key":"/users/username/projects/project/package.json","count":1},{"key":"/users/username/projects/package.json","count":1},{"key":"/users/username/package.json","count":1},{"key":"/users/package.json","count":1},{"key":"/package.json","count":1}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/username/projects/project","count":3},{"key":"/users/username/projects","count":3},{"key":"/users/username","count":2},{"key":"/users","count":2},{"key":"/","count":2},{"key":"/users/username/projects/project/node_modules","count":2},{"key":"/users/username/projects/node_modules","count":2},{"key":"/users/username/node_modules","count":1},{"key":"/users/node_modules","count":1},{"key":"/node_modules","count":1},{"key":"/users/username/projects/project/node_modules/@types","count":2},{"key":"/users/username/projects/node_modules/@types","count":2},{"key":"/users/username/node_modules/@types","count":1},{"key":"/users/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/username/projects/project/tsconfig.json","count":2},{"key":"/users/username/projects/project/jsconfig.json","count":2},{"key":"/users/username/projects/tsconfig.json","count":1},{"key":"/users/username/projects/jsconfig.json","count":1},{"key":"/users/username/tsconfig.json","count":1},{"key":"/users/username/jsconfig.json","count":1},{"key":"/users/tsconfig.json","count":1},{"key":"/users/jsconfig.json","count":1},{"key":"/tsconfig.json","count":1},{"key":"/jsconfig.json","count":1},{"key":"/users/username/projects/project/bar.ts","count":2},{"key":"/users/username/projects/project/bar.tsx","count":2},{"key":"/users/username/projects/project/bar.d.ts","count":2},{"key":"/users/username/projects/bar.ts","count":2},{"key":"/users/username/projects/bar.tsx","count":2},{"key":"/users/username/projects/bar.d.ts","count":2},{"key":"/users/username/bar.ts","count":2},{"key":"/users/username/bar.tsx","count":2},{"key":"/users/username/bar.d.ts","count":2},{"key":"/users/bar.ts","count":2},{"key":"/users/bar.tsx","count":2},{"key":"/users/bar.d.ts","count":2},{"key":"/bar.ts","count":2},{"key":"/bar.tsx","count":2},{"key":"/bar.d.ts","count":2},{"key":"/users/username/projects/project/bar.js","count":2},{"key":"/users/username/projects/project/bar.jsx","count":2},{"key":"/users/username/projects/bar.js","count":2},{"key":"/users/username/projects/bar.jsx","count":2},{"key":"/users/username/bar.js","count":2},{"key":"/users/username/bar.jsx","count":2},{"key":"/users/bar.js","count":2},{"key":"/users/bar.jsx","count":2},{"key":"/bar.js","count":2},{"key":"/bar.jsx","count":2},{"key":"/users/username/projects/project/package.json","count":1},{"key":"/users/username/projects/package.json","count":1},{"key":"/users/username/package.json","count":1},{"key":"/users/package.json","count":1},{"key":"/package.json","count":1}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/username/projects/project","count":5},{"key":"/users/username/projects","count":5},{"key":"/users/username","count":4},{"key":"/users","count":4},{"key":"/","count":4},{"key":"/users/username/projects/project/node_modules","count":3},{"key":"/users/username/projects/node_modules","count":3},{"key":"/users/username/node_modules","count":2},{"key":"/users/node_modules","count":2},{"key":"/node_modules","count":2},{"key":"/users/username/projects/project/node_modules/@types","count":3},{"key":"/users/username/projects/node_modules/@types","count":3},{"key":"/users/username/node_modules/@types","count":2},{"key":"/users/node_modules/@types","count":2},{"key":"/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] Info seq [hh:mm:ss:mss] readFile:: [{"key":"/users/username/projects/project/foo.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] @@ -105,8 +105,8 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getSemanticDiagnostics:: /users/username/projects/project/foo.ts:: 0 -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/username/projects/project/bar.ts","count":1},{"key":"/users/username/projects/project/bar.tsx","count":1},{"key":"/users/username/projects/project/bar.d.ts","count":3}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/username/projects/project","count":1},{"key":"/users/username/projects/project/node_modules/@types","count":1},{"key":"/users/username/projects/node_modules/@types","count":1},{"key":"/users/username/node_modules/@types","count":1},{"key":"/users/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/username/projects/project/bar.ts","count":2},{"key":"/users/username/projects/project/bar.tsx","count":2},{"key":"/users/username/projects/project/bar.d.ts","count":5}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/username/projects/project","count":2},{"key":"/users/username/projects/project/node_modules/@types","count":2},{"key":"/users/username/projects/node_modules/@types","count":2},{"key":"/users/username/node_modules/@types","count":2},{"key":"/users/node_modules/@types","count":2},{"key":"/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [{"key":"/users/username/projects/project/bar.d.ts","count":1}] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/users/username/projects/project/bar.d.ts","count":2}] Info seq [hh:mm:ss:mss] readDirectory:: [] \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-insensitive-file-system.js b/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-insensitive-file-system.js index 17cdf3f31c5b6..b2d04275fdd1d 100644 --- a/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-insensitive-file-system.js +++ b/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-insensitive-file-system.js @@ -185,10 +185,10 @@ FsWatchesRecursive:: /users/someuser/work/applications/frontend/src: {} -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/someuser/work/applications/frontend/src/app/utils/cookie.ts","count":1},{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":1}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/someuser/work/applications/frontend/src/app/utils/cookie.ts","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/users/someuser/work/applications/frontend/src/app/utils/cookie.ts","count":1},{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":2},{"key":"/Users/someuser/work/applications/frontend/src/app/redux/configureStore.ts","count":1},{"key":"/a/lib/lib.es2016.full.d.ts","count":1}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/users/someuser/work/applications/frontend/src/app/utils/cookie.ts","count":1},{"key":"/Users/someuser/work/applications/frontend/types","count":2},{"key":"/Users/someuser/work/applications/frontend/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":1}] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":2},{"key":"/Users/someuser/work/applications/frontend/src/app/redux/configureStore.ts","count":1},{"key":"/a/lib/lib.es2016.full.d.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /Users/someuser/work/applications/frontend/src/app/utils diff --git a/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-sensitive-file-system.js b/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-sensitive-file-system.js index 1c4fa7c9b4b5e..fad0ebb684af8 100644 --- a/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-sensitive-file-system.js +++ b/tests/baselines/reference/tsserver/cachingFileSystemInformation/watchDirectories-for-config-file-with-case-sensitive-file-system.js @@ -185,10 +185,10 @@ FsWatchesRecursive:: /Users/someuser/work/applications/frontend/src: {} -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":2}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":3},{"key":"/Users/someuser/work/applications/frontend/src/app/redux/configureStore.ts","count":1},{"key":"/a/lib/lib.es2016.full.d.ts","count":1}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":1},{"key":"/Users/someuser/work/applications/frontend/types","count":2},{"key":"/Users/someuser/work/applications/frontend/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":1}] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts","count":2},{"key":"/Users/someuser/work/applications/frontend/src/app/redux/configureStore.ts","count":1},{"key":"/a/lib/lib.es2016.full.d.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /Users/someuser/work/applications/frontend/src/app/utils/Cookie.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Search path: /Users/someuser/work/applications/frontend/src/app/utils diff --git a/tests/baselines/reference/tsserver/cachingFileSystemInformation/works-using-legacy-resolution-logic.js b/tests/baselines/reference/tsserver/cachingFileSystemInformation/works-using-legacy-resolution-logic.js index d9cd6ac2fb682..872a97ade7bd1 100644 --- a/tests/baselines/reference/tsserver/cachingFileSystemInformation/works-using-legacy-resolution-logic.js +++ b/tests/baselines/reference/tsserver/cachingFileSystemInformation/works-using-legacy-resolution-logic.js @@ -46,10 +46,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getSemanticDiagnostics:: /c/f1.ts:: 1 Info seq [hh:mm:ss:mss] ../f1.ts(1,1): error TS2304: Cannot find name 'foo'. -Info seq [hh:mm:ss:mss] fileExists:: [] -Info seq [hh:mm:ss:mss] directoryExists:: [] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f1.ts","count":1},{"key":"/c/d/f1.tsx","count":1},{"key":"/c/d/f1.d.ts","count":1},{"key":"/c/f1.ts","count":2}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":1},{"key":"/c","count":1},{"key":"/c/d/node_modules/@types","count":1},{"key":"/c/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/c/f1.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] 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: true structureIsReused:: SafeModules Elapsed:: *ms @@ -63,8 +63,8 @@ Info seq [hh:mm:ss:mss] Files (1) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Could not find source file: '/c/f1.ts'. -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f2.ts","count":1},{"key":"/c/d/f2.tsx","count":1},{"key":"/c/d/f2.d.ts","count":1},{"key":"/c/f2.ts","count":1},{"key":"/c/f2.tsx","count":1},{"key":"/c/f2.d.ts","count":1},{"key":"/f2.ts","count":1},{"key":"/f2.tsx","count":1},{"key":"/f2.d.ts","count":1},{"key":"/c/d/f2.js","count":1},{"key":"/c/d/f2.jsx","count":1},{"key":"/c/f2.js","count":1},{"key":"/c/f2.jsx","count":1},{"key":"/f2.js","count":1},{"key":"/f2.jsx","count":1}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":2},{"key":"/c","count":2},{"key":"/","count":2},{"key":"/c/d/node_modules","count":1},{"key":"/c/node_modules","count":1},{"key":"/node_modules","count":1},{"key":"/c/d/node_modules/@types","count":1},{"key":"/c/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f2.ts","count":2},{"key":"/c/d/f2.tsx","count":2},{"key":"/c/d/f2.d.ts","count":2},{"key":"/c/f2.ts","count":2},{"key":"/c/f2.tsx","count":2},{"key":"/c/f2.d.ts","count":2},{"key":"/f2.ts","count":2},{"key":"/f2.tsx","count":2},{"key":"/f2.d.ts","count":2},{"key":"/c/d/f2.js","count":2},{"key":"/c/d/f2.jsx","count":2},{"key":"/c/f2.js","count":2},{"key":"/c/f2.jsx","count":2},{"key":"/f2.js","count":2},{"key":"/f2.jsx","count":2}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":4},{"key":"/c","count":4},{"key":"/","count":4},{"key":"/c/d/node_modules","count":2},{"key":"/c/node_modules","count":2},{"key":"/node_modules","count":2},{"key":"/c/d/node_modules/@types","count":2},{"key":"/c/node_modules/@types","count":2},{"key":"/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] Info seq [hh:mm:ss:mss] readFile:: [] Info seq [hh:mm:ss:mss] readDirectory:: [] @@ -85,10 +85,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getSemanticDiagnostics:: /c/f1.ts:: 1 Info seq [hh:mm:ss:mss] ../f1.ts(1,1): error TS2304: Cannot find name 'foo'. -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f1.ts","count":1},{"key":"/c/d/f1.tsx","count":1},{"key":"/c/d/f1.d.ts","count":1},{"key":"/c/f1.ts","count":1}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":1},{"key":"/c","count":1},{"key":"/c/d/node_modules/@types","count":1},{"key":"/c/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f1.ts","count":2},{"key":"/c/d/f1.tsx","count":2},{"key":"/c/d/f1.d.ts","count":2},{"key":"/c/f1.ts","count":3}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":2},{"key":"/c","count":2},{"key":"/c/d/node_modules/@types","count":2},{"key":"/c/node_modules/@types","count":2},{"key":"/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/c/f1.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* @@ -103,8 +103,8 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] getSemanticDiagnostics:: /c/f1.ts:: 1 Info seq [hh:mm:ss:mss] ../f1.ts(1,1): error TS2304: Cannot find name 'foo'. -Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f1.ts","count":1},{"key":"/c/d/f1.tsx","count":1},{"key":"/c/d/f1.d.ts","count":1},{"key":"/c/f1.ts","count":1}] -Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":1},{"key":"/c","count":1},{"key":"/c/d/node_modules/@types","count":1},{"key":"/c/node_modules/@types","count":1},{"key":"/node_modules/@types","count":1}] +Info seq [hh:mm:ss:mss] fileExists:: [{"key":"/c/d/f1.ts","count":2},{"key":"/c/d/f1.tsx","count":2},{"key":"/c/d/f1.d.ts","count":2},{"key":"/c/f1.ts","count":3}] +Info seq [hh:mm:ss:mss] directoryExists:: [{"key":"/c/d","count":2},{"key":"/c","count":2},{"key":"/c/d/node_modules/@types","count":2},{"key":"/c/node_modules/@types","count":2},{"key":"/node_modules/@types","count":2}] Info seq [hh:mm:ss:mss] getDirectories:: [] -Info seq [hh:mm:ss:mss] readFile:: [] +Info seq [hh:mm:ss:mss] readFile:: [{"key":"/c/f1.ts","count":1}] Info seq [hh:mm:ss:mss] readDirectory:: [] \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/completions/works-when-files-are-included-from-two-different-drives-of-windows.js b/tests/baselines/reference/tsserver/completions/works-when-files-are-included-from-two-different-drives-of-windows.js index 1b747203aff63..4a9c610c4e173 100644 --- a/tests/baselines/reference/tsserver/completions/works-when-files-are-included-from-two-different-drives-of-windows.js +++ b/tests/baselines/reference/tsserver/completions/works-when-files-are-included-from-two-different-drives-of-windows.js @@ -92,9 +92,9 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: e:/myproject/node Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: e:/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: c:/typescript/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: c:/typescript/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: c:/typescript/node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: e:/myproject/node_modules/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: c:/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: c:/typescript/node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: e:/myproject/src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: e:/myproject/src/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: e:/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots diff --git a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js index 0ac82cd1f3984..b36a01dce979e 100644 --- a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js +++ b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan,-and-orphan-script-info-changes.js @@ -74,6 +74,8 @@ DocumentRegistry:: /user/username/projects/myproject/module1.d.ts: TS 1 /a/lib/lib.d.ts: TS 1 Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -94,6 +96,8 @@ DocumentRegistry:: Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/module1.d.ts 1:: WatchInfo: /user/username/projects/myproject/module1.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/module1.d.ts 1:: WatchInfo: /user/username/projects/myproject/module1.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) diff --git a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js index ce09ea9b1b5d1..2de4ef126244d 100644 --- a/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js +++ b/tests/baselines/reference/tsserver/documentRegistry/Caches-the-source-file-if-script-info-is-orphan.js @@ -74,6 +74,8 @@ DocumentRegistry:: /user/username/projects/myproject/module1.d.ts: TS 1 /a/lib/lib.d.ts: TS 1 Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -92,6 +94,8 @@ DocumentRegistry:: /user/username/projects/myproject/index.ts: TS 1 /a/lib/lib.d.ts: TS 1 Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) diff --git a/tests/baselines/reference/tsserver/documentRegistry/works-when-reusing-orphan-script-info-with-different-scriptKind.js b/tests/baselines/reference/tsserver/documentRegistry/works-when-reusing-orphan-script-info-with-different-scriptKind.js index 5a0e7c9893ad9..9854bfeafec23 100644 --- a/tests/baselines/reference/tsserver/documentRegistry/works-when-reusing-orphan-script-info-with-different-scriptKind.js +++ b/tests/baselines/reference/tsserver/documentRegistry/works-when-reusing-orphan-script-info-with-different-scriptKind.js @@ -173,6 +173,12 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Search path: ^/inmemory/model Info seq [hh:mm:ss:mss] For info: ^/inmemory/model/4 :: No config files found. Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/san/^ 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/san/^ 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/san/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/san/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/user/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* Version: 3 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -201,3 +207,19 @@ Info seq [hh:mm:ss:mss] response: "responseRequired": true } After request + +PolledWatches:: +/a/lib/lib.d.ts: + {"pollingInterval":500} +/users/user/projects/node_modules/@types: + {"pollingInterval":500} +/users/user/projects/san/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/users/user/projects/node_modules: + {"pollingInterval":500} +/users/user/projects/san/^: + {"pollingInterval":500} +/users/user/projects/san/node_modules: + {"pollingInterval":500} diff --git a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/when-event-handler-is-set-in-the-session-and-should-be-up-to-date-with-the-reference-map-changes.js b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/when-event-handler-is-set-in-the-session-and-should-be-up-to-date-with-the-reference-map-changes.js index 6e7f0cf2e4b71..219d22870eb1f 100644 --- a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/when-event-handler-is-set-in-the-session-and-should-be-up-to-date-with-the-reference-map-changes.js +++ b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/when-event-handler-is-set-in-the-session-and-should-be-up-to-date-with-the-reference-map-changes.js @@ -323,6 +323,10 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projec Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/moduleFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -382,16 +386,16 @@ After running Timeout callback:: count: 0 PolledWatches:: /users/username/projects/node_modules/@types: {"pollingInterval":500} -/users/username/projects/project/modulefile1: - {"pollingInterval":500} /users/username/projects/project/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/users/username/projects/project/modulefile1: + {"pollingInterval":500} + FsWatches:: /a/lib/lib.d.ts: *new* {} -/users/username/projects/project: - {} /users/username/projects/project/file1consumer2.ts: *new* {} /users/username/projects/project/globalfile3.ts: *new* @@ -403,6 +407,10 @@ FsWatches:: /users/username/projects/project/tsconfig.json: {} +FsWatches *deleted*:: +/users/username/projects/project: + {} + FsWatchesRecursive:: /users/username/projects/project: {} @@ -500,10 +508,6 @@ export var T: number;export var T2: string;export function Foo() { }; Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -545,38 +549,6 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/users/username/projects/project/modulefile1: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/users/username/projects/project/file1consumer2.ts: - {} -/users/username/projects/project/globalfile3.ts: - {} -/users/username/projects/project/modulefile1.ts: - {} -/users/username/projects/project/modulefile2.ts: - {} -/users/username/projects/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/users/username/projects/project: - {} - -FsWatchesRecursive:: -/users/username/projects/project: - {} - Before request Info seq [hh:mm:ss:mss] request: diff --git a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/with-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/with-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js index 13aa08ea191a5..758717a68e8ff 100644 --- a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/with-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js +++ b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/with-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js @@ -326,6 +326,10 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projec Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/moduleFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -386,16 +390,16 @@ After running Timeout callback:: count: 0 PolledWatches:: /users/username/projects/node_modules/@types: {"pollingInterval":500} -/users/username/projects/project/modulefile1: - {"pollingInterval":500} /users/username/projects/project/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/users/username/projects/project/modulefile1: + {"pollingInterval":500} + FsWatches:: /a/lib/lib.d.ts: *new* {} -/users/username/projects/project: - {} /users/username/projects/project/file1consumer2.ts: *new* {} /users/username/projects/project/globalfile3.ts: *new* @@ -407,6 +411,10 @@ FsWatches:: /users/username/projects/project/tsconfig.json: {} +FsWatches *deleted*:: +/users/username/projects/project: + {} + FsWatchesRecursive:: /users/username/projects/project: {} @@ -505,10 +513,6 @@ export var T: number;export var T2: string;export function Foo() { }; Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -551,38 +555,6 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/users/username/projects/project/modulefile1: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/users/username/projects/project/file1consumer2.ts: - {} -/users/username/projects/project/globalfile3.ts: - {} -/users/username/projects/project/modulefile1.ts: - {} -/users/username/projects/project/modulefile2.ts: - {} -/users/username/projects/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/users/username/projects/project: - {} - -FsWatchesRecursive:: -/users/username/projects/project: - {} - Before request Info seq [hh:mm:ss:mss] request: diff --git a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/without-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/without-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js index 36153a153c42c..2593fa096e3ce 100644 --- a/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/without-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js +++ b/tests/baselines/reference/tsserver/events/projectUpdatedInBackground/without-noGetErrOnBackgroundUpdate-and-should-be-up-to-date-with-the-reference-map-changes.js @@ -326,6 +326,10 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projec Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/moduleFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -387,16 +391,16 @@ After running Timeout callback:: count: 1 PolledWatches:: /users/username/projects/node_modules/@types: {"pollingInterval":500} -/users/username/projects/project/modulefile1: - {"pollingInterval":500} /users/username/projects/project/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/users/username/projects/project/modulefile1: + {"pollingInterval":500} + FsWatches:: /a/lib/lib.d.ts: *new* {} -/users/username/projects/project: - {} /users/username/projects/project/file1consumer2.ts: *new* {} /users/username/projects/project/globalfile3.ts: *new* @@ -408,6 +412,10 @@ FsWatches:: /users/username/projects/project/tsconfig.json: {} +FsWatches *deleted*:: +/users/username/projects/project: + {} + FsWatchesRecursive:: /users/username/projects/project: {} @@ -519,10 +527,6 @@ export var T: number;export var T2: string;export function Foo() { }; Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project/moduleFile1 1 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /users/username/projects/project 0 undefined Project: /users/username/projects/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Version: 4 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (6) @@ -566,38 +570,6 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 1 23: checkOne -PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/users/username/projects/project/modulefile1: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/users/username/projects/project/file1consumer2.ts: - {} -/users/username/projects/project/globalfile3.ts: - {} -/users/username/projects/project/modulefile1.ts: - {} -/users/username/projects/project/modulefile2.ts: - {} -/users/username/projects/project/tsconfig.json: - {} - -FsWatches *deleted*:: -/users/username/projects/project: - {} - -FsWatchesRecursive:: -/users/username/projects/project: - {} - Before request Info seq [hh:mm:ss:mss] request: 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 0000000000000..34d9acfcc5633 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossPackage_pathsAndSymlink.js @@ -0,0 +1,370 @@ +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 0000000000000..a8504f229da73 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js @@ -0,0 +1,411 @@ +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 0000000000000..9207aba1ab668 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_sharedOutDir.js @@ -0,0 +1,363 @@ +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 0000000000000..46a7cc86d5e21 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js @@ -0,0 +1,658 @@ +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 0000000000000..0776ed2983b96 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js @@ -0,0 +1,658 @@ +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 0000000000000..c0249c06de8da --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js @@ -0,0 +1,418 @@ +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 0000000000000..e92859f46effa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js @@ -0,0 +1,658 @@ +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 0000000000000..1138556a12c1b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.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 + +//// [/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 0000000000000..d19197489892e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.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 + +//// [/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 0000000000000..c30de5a6ff8f4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js @@ -0,0 +1,496 @@ +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 0000000000000..816caa1749776 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportFileExcludePatterns1.js @@ -0,0 +1,900 @@ +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 0000000000000..f6675dab81ec5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportNodeModuleSymlinkRenamed.js @@ -0,0 +1,389 @@ +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 0000000000000..d1737223191e2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider1.js @@ -0,0 +1,333 @@ +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 0000000000000..d3beb8025bebb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider2.js @@ -0,0 +1,286 @@ +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 0000000000000..5649d7ff4cf06 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider3.js @@ -0,0 +1,744 @@ +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": "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": "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 0000000000000..5b50036252cfa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js @@ -0,0 +1,507 @@ +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 0000000000000..5744c4f30a496 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider5.js @@ -0,0 +1,303 @@ +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 0000000000000..def6d04f76164 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js @@ -0,0 +1,1402 @@ +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": "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 0000000000000..759533603c10e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js @@ -0,0 +1,1167 @@ +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": "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": "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 0000000000000..165346c377f98 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js @@ -0,0 +1,1167 @@ +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": "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": "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 0000000000000..1db7e93c8f6c2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js @@ -0,0 +1,1009 @@ +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": "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": "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 0000000000000..c4c9fb74cd343 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js @@ -0,0 +1,1000 @@ +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": "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 0000000000000..32651760c01aa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js @@ -0,0 +1,1004 @@ +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": "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 0000000000000..fe06fcf6fe4c4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js @@ -0,0 +1,976 @@ +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": "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 0000000000000..754cfee86c20b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.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/@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": "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": "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 0000000000000..69f58eaecfd4a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js @@ -0,0 +1,1050 @@ +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": "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": "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 0000000000000..edd0adad68dac --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js @@ -0,0 +1,1032 @@ +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": "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": "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 0000000000000..e5ff06c72e80d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js @@ -0,0 +1,1822 @@ +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": "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": "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 0000000000000..a15db7ca59598 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js @@ -0,0 +1,990 @@ +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": "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 0000000000000..f73ef24353e5e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_globalTypingsCache.js @@ -0,0 +1,918 @@ +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": "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 0000000000000..bfd2cf2f0d7e0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_namespaceSameNameAsIntrinsic.js @@ -0,0 +1,1144 @@ +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": "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": "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": "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 0000000000000..7e74c29ad21eb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js @@ -0,0 +1,356 @@ +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 0000000000000..0983b6fd53a97 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js @@ -0,0 +1,572 @@ +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 0000000000000..38f2e29faaa68 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_wildcardExports1.js @@ -0,0 +1,1097 @@ +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": "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": "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": "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": "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": "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/autoImportReExportFromAmbientModule.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js new file mode 100644 index 0000000000000..4a8b7e3d71d25 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js @@ -0,0 +1,1075 @@ +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": "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": "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/autoImportSymlinkedJsPackages.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js new file mode 100644 index 0000000000000..e0c13ae0b0c5b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportSymlinkedJsPackages.js @@ -0,0 +1,767 @@ +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": "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 0000000000000..570d4ae17966d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/brace01.js @@ -0,0 +1,1205 @@ +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 0000000000000..79712ea84aa50 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/callHierarchyContainerNameServer.js @@ -0,0 +1,492 @@ +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 0000000000000..1743743f53d1d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles01.js @@ -0,0 +1,1072 @@ +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 0000000000000..0578ae8a97043 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionEntryDetailAcrossFiles02.js @@ -0,0 +1,1078 @@ +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 0000000000000..5db8fe29f5472 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions01.js @@ -0,0 +1,515 @@ +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 0000000000000..9aeeb2cb2b37f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions02.js @@ -0,0 +1,541 @@ +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 0000000000000..b4f1a5982c494 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completions03.js @@ -0,0 +1,132 @@ +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 0000000000000..f1f46db3ee628 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js @@ -0,0 +1,2286 @@ +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": "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": "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": "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 0000000000000..dc2fd20eddd2c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js @@ -0,0 +1,1658 @@ +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 0000000000000..d28d77a4627ca --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js @@ -0,0 +1,910 @@ +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": "someModule|*|", + "fileName": "/someModule.ts" + } + }, + { + "name": "someModule", + "kind": "const", + "kindModifiers": "export", + "sortText": "16", + "hasAction": true, + "source": "/someModule", + "data": { + "exportName": "someModule", + "exportMapKey": "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":"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":"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 0000000000000..5714c6fa3fdb5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js @@ -0,0 +1,1830 @@ +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": "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": "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": "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": "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": "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": "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 0000000000000..393075b1a57f0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js @@ -0,0 +1,1779 @@ +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": "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": "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 0000000000000..0dcbedfe63018 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.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 + +//// [/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": "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": "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": "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 0000000000000..c307620c11e72 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js @@ -0,0 +1,549 @@ +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 0000000000000..a4d42553cb133 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js @@ -0,0 +1,294 @@ +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 0000000000000..c81ff6dd0e3c6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server1.js @@ -0,0 +1,192 @@ +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 0000000000000..7a5b40e4c007a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/convertFunctionToEs6Class-server2.js @@ -0,0 +1,194 @@ +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 0000000000000..d5ed5c9653fba --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapGoToDefinition.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/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 0000000000000..3b7bd4ffb3f8c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js @@ -0,0 +1,488 @@ +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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFO1lBQ3JCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7U0FDbEI7UUFDRCxPQUFPLEVBQUMsQ0FBQyxFQUFFLEtBQUssRUFBQyxDQUFDO0lBQ3RCLENBQUM7SUFDTCxVQUFDO0FBQUQsQ0FBQyxBQVRELElBU0M7QUFUWSxrQkFBRyJ9 + +//// [/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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFO1lBQ3JCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7U0FDbEI7UUFDRCxPQUFPLEVBQUMsQ0FBQyxFQUFFLEtBQUssRUFBQyxDQUFDO0lBQ3RCLENBQUM7SUFDTCxVQUFDO0FBQUQsQ0FBQyxBQVRELElBU0M7QUFUWSxrQkFBRyJ9" + }, + { + "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 0000000000000..b8516dc463b09 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js @@ -0,0 +1,490 @@ +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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFO1lBQ3JCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7U0FDbEI7UUFDRCxPQUFPLEVBQUMsQ0FBQyxFQUFFLEtBQUssRUFBQyxDQUFDO0lBQ3RCLENBQUM7SUFDTCxVQUFDO0FBQUQsQ0FBQyxBQVRELElBU0M7QUFUWSxrQkFBRyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBGb28ge1xuICAgIG1lbWJlcjogc3RyaW5nO1xuICAgIG1ldGhvZE5hbWUocHJvcE5hbWU6IFNvbWVUeXBlKTogU29tZVR5cGUgeyByZXR1cm4gcHJvcE5hbWU7IH1cbiAgICBvdGhlck1ldGhvZCgpIHtcbiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPiAwLjUpIHtcbiAgICAgICAgICAgIHJldHVybiB7eDogNDJ9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7eTogXCJ5ZXNcIn07XG4gICAgfVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIFNvbWVUeXBlIHtcbiAgICBtZW1iZXI6IG51bWJlcjtcbn0iXX0= + +//// [/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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTtJQUFBO0lBU0EsQ0FBQztJQVBHLHdCQUFVLEdBQVYsVUFBVyxRQUFrQixJQUFjLE9BQU8sUUFBUSxDQUFDLENBQUMsQ0FBQztJQUM3RCx5QkFBVyxHQUFYO1FBQ0ksSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFO1lBQ3JCLE9BQU8sRUFBQyxDQUFDLEVBQUUsRUFBRSxFQUFDLENBQUM7U0FDbEI7UUFDRCxPQUFPLEVBQUMsQ0FBQyxFQUFFLEtBQUssRUFBQyxDQUFDO0lBQ3RCLENBQUM7SUFDTCxVQUFDO0FBQUQsQ0FBQyxBQVRELElBU0M7QUFUWSxrQkFBRyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBGb28ge1xuICAgIG1lbWJlcjogc3RyaW5nO1xuICAgIG1ldGhvZE5hbWUocHJvcE5hbWU6IFNvbWVUeXBlKTogU29tZVR5cGUgeyByZXR1cm4gcHJvcE5hbWU7IH1cbiAgICBvdGhlck1ldGhvZCgpIHtcbiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPiAwLjUpIHtcbiAgICAgICAgICAgIHJldHVybiB7eDogNDJ9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7eTogXCJ5ZXNcIn07XG4gICAgfVxufVxuXG5leHBvcnQgaW50ZXJmYWNlIFNvbWVUeXBlIHtcbiAgICBtZW1iZXI6IG51bWJlcjtcbn0iXX0=" + }, + { + "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 0000000000000..49e7bfdceff10 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js @@ -0,0 +1,486 @@ +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 0000000000000..07d60754f7794 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js @@ -0,0 +1,498 @@ +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;YACrB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;SAClB;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;YACrB,OAAO,EAAC,CAAC,EAAE,EAAE,EAAC,CAAC;SAClB;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 0000000000000..7759c236b0822 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js @@ -0,0 +1,518 @@ +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 0000000000000..5e4fa78e56a59 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionRelativeSourceRoot.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/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 0000000000000..af4b9829bc08c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGoToDefinitionSameNameDifferentDirectory.js @@ -0,0 +1,452 @@ +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 0000000000000..ee8c761613028 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsOutOfDateMapping.js @@ -0,0 +1,202 @@ +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 0000000000000..683f023b37588 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/definition01.js @@ -0,0 +1,127 @@ +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 0000000000000..ba29e7c9ba750 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights01.js @@ -0,0 +1,396 @@ +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 0000000000000..55bf1ce2fc3bb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlights02.js @@ -0,0 +1,424 @@ +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 0000000000000..72d849e65a67d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/documentHighlightsTypeParameterInHeritageClause01.js @@ -0,0 +1,260 @@ +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 0000000000000..cca0b2ee01a4f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/fixExtractToInnerFunctionDuplicaton.js @@ -0,0 +1,466 @@ +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 0000000000000..6ca19d9e6ed61 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/format01.js @@ -0,0 +1,198 @@ +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 0000000000000..7c5e067a0d7b0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatBracketInSwitchCase.js @@ -0,0 +1,109 @@ +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 0000000000000..57bfe620f37e4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatOnEnter.js @@ -0,0 +1,152 @@ +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 0000000000000..581e99a4bbc3b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatSpaceBetweenFunctionAndArrayIndex.js @@ -0,0 +1,113 @@ +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 0000000000000..a4fbc0e6a698d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/formatonkey01.js @@ -0,0 +1,116 @@ +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 0000000000000..8718b6bfdba39 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js @@ -0,0 +1,419 @@ +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 0000000000000..6a8560e4f070a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js @@ -0,0 +1,270 @@ +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 0000000000000..1b3bcfbe6ec63 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js @@ -0,0 +1,489 @@ +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 0000000000000..66066d86d27dd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics01.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/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 0000000000000..ab22bc151fe6c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getJavaScriptSyntacticDiagnostics02.js @@ -0,0 +1,183 @@ +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 0000000000000..a24731874ba31 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForComments.js @@ -0,0 +1,157 @@ +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 0000000000000..20370bd7a75c5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegions.js @@ -0,0 +1,365 @@ +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 0000000000000..8a863347ad193 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/getOutliningSpansForRegionsNoSingleLineFolds.js @@ -0,0 +1,258 @@ +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 0000000000000..a0268b07cbdaa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToDefinitionScriptImportServer.js @@ -0,0 +1,230 @@ +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 0000000000000..1b0fe34d35ee7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToImplementation_inDifferentFiles.js @@ -0,0 +1,154 @@ +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 0000000000000..540670dd47138 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource10_mapFromAtTypes3.js @@ -0,0 +1,268 @@ +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 0000000000000..017a258c588f4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource11_propertyOfAlias.js @@ -0,0 +1,165 @@ +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 0000000000000..7a6c354348b87 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource12_callbackParam.js @@ -0,0 +1,226 @@ +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 0000000000000..15fdc620a79e5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource13_nodenext.js @@ -0,0 +1,264 @@ +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 0000000000000..006820ea109a7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource14_unresolvedRequireDestructuring.js @@ -0,0 +1,83 @@ +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 0000000000000..9ab8ea8f06552 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js @@ -0,0 +1,301 @@ +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/goToSource1_localJsBesideDts.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.js new file mode 100644 index 0000000000000..38567a9ea2dcb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource1_localJsBesideDts.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: 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 0000000000000..619f8e5362382 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource2_nodeModulesWithTypes.js @@ -0,0 +1,181 @@ +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 0000000000000..e5845aaa79388 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource3_nodeModulesAtTypes.js @@ -0,0 +1,200 @@ +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 0000000000000..6ce894818f47f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource5_sameAsGoToDef1.js @@ -0,0 +1,197 @@ +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 0000000000000..40882e8a59129 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource6_sameAsGoToDef2.js @@ -0,0 +1,218 @@ +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 0000000000000..6e3a959a8533c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource7_conditionallyMinified.js @@ -0,0 +1,210 @@ +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 0000000000000..f31e4b2ed7ab9 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource8_mapFromAtTypes.js @@ -0,0 +1,292 @@ +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 0000000000000..53f45b4798d35 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource9_mapFromAtTypes2.js @@ -0,0 +1,313 @@ +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 0000000000000..4862f4b78662c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/implementation01.js @@ -0,0 +1,114 @@ +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 0000000000000..1496cae10419a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js @@ -0,0 +1,331 @@ +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 0000000000000..ae962886d22ec --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js @@ -0,0 +1,696 @@ +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 0000000000000..47b2a8f34cfb5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelative1.js @@ -0,0 +1,646 @@ +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 0000000000000..5a18edadac4f8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js @@ -0,0 +1,307 @@ +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 0000000000000..f9d17f39c9d82 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js @@ -0,0 +1,295 @@ +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": "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 0000000000000..116e3fc49446e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js @@ -0,0 +1,259 @@ +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 0000000000000..5e73558c9e430 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js @@ -0,0 +1,3972 @@ +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": "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": "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": "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": "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 0000000000000..44b69c5d52b29 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js @@ -0,0 +1,2450 @@ +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": "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 0000000000000..b00b530027003 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js @@ -0,0 +1,1601 @@ +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": "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": "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 0000000000000..bf63f0ffc9fe6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js @@ -0,0 +1,806 @@ +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": "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 0000000000000..7e962000d2205 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js @@ -0,0 +1,3536 @@ +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": "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": "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": "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": "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": "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": "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": "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": "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 0000000000000..d873a37ce567f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossGlobalProjects.js @@ -0,0 +1,1639 @@ +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 0000000000000..b0f5ec794eb6b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/isDefinitionAcrossModuleProjects.js @@ -0,0 +1,2681 @@ +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 0000000000000..45124ed54cff7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTag.js @@ -0,0 +1,213 @@ +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 0000000000000..bff13669ab0cb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagNavigateTo.js @@ -0,0 +1,176 @@ +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 0000000000000..af2270405bc12 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocCallbackTagRename01.js @@ -0,0 +1,173 @@ +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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..2e85df5a486c7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocParamTagSpecialKeywords.js @@ -0,0 +1,259 @@ +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 0000000000000..f0b008cf4163b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag.js @@ -0,0 +1,2797 @@ +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 0000000000000..22fb8ac7536b0 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag1.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/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 0000000000000..3633c42f55c84 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTag2.js @@ -0,0 +1,388 @@ +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 0000000000000..64a9506e65bc5 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagGoToDefinition.js @@ -0,0 +1,182 @@ +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 0000000000000..5245bd76f6ddd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNamespace.js @@ -0,0 +1,788 @@ +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 0000000000000..357e3f6f5952f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagNavigateTo.js @@ -0,0 +1,371 @@ +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 0000000000000..7be7019843819 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename01.js @@ -0,0 +1,371 @@ +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":{"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":{"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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..2b4ad6c4ef387 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename02.js @@ -0,0 +1,254 @@ +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":{"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":{"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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..782dee3e0b90e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename03.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/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":{"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":{"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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..8d74301afde1e --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/jsdocTypedefTagRename04.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/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 0000000000000..0eb72f03c4aa7 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/moveToFile_emptyTargetFile.js @@ -0,0 +1,320 @@ +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":{"allowTextChangesInNewFiles":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":{"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 0000000000000..f069a4c3b63aa --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/navbar01.js @@ -0,0 +1,1239 @@ +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 0000000000000..18708eb777b6f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/navto01.js @@ -0,0 +1,242 @@ +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","file":"/tests/cases/fourslash/server/navto01.ts"},"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","file":"/tests/cases/fourslash/server/navto01.ts"},"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","file":"/tests/cases/fourslash/server/navto01.ts"},"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","file":"/tests/cases/fourslash/server/navto01.ts"},"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","file":"/tests/cases/fourslash/server/navto01.ts"},"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/ngProxy1.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js new file mode 100644 index 0000000000000..4d95efcb1e048 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js @@ -0,0 +1,255 @@ +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 0000000000000..1193b5c3d2282 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js @@ -0,0 +1,255 @@ +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 0000000000000..bd9eebcdf120b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js @@ -0,0 +1,254 @@ +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 0000000000000..496d9420297c2 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js @@ -0,0 +1,267 @@ +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 0000000000000..93580faf1a0ef --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js @@ -0,0 +1,354 @@ +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 0000000000000..9b2fea98ce379 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nodeNextPathCompletions.js @@ -0,0 +1,623 @@ +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 0000000000000..5d40784ee2487 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/nonJsDeclarationFilePathCompletions.js @@ -0,0 +1,226 @@ +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 0000000000000..1df7f0c0f44d3 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/occurrences01.js @@ -0,0 +1,642 @@ +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 0000000000000..84604510ce7b4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/occurrences02.js @@ -0,0 +1,396 @@ +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 0000000000000..20fea22dd7ecc --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/openFile.js @@ -0,0 +1,262 @@ +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 0000000000000..a7f200bc0f0ce --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/openFileWithSyntaxKind.js @@ -0,0 +1,237 @@ +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 0000000000000..34ad601a6112b --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectInfo01.js @@ -0,0 +1,477 @@ +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 0000000000000..dbfa0a6b49cf8 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectInfo02.js @@ -0,0 +1,162 @@ +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 0000000000000..7c0d16e668a51 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/projectWithNonExistentFiles.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/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 0000000000000..b0f2385eb93ce --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/quickinfo01.js @@ -0,0 +1,170 @@ +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 0000000000000..8bebd7f1b9cf1 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/quickinfoWrongComment.js @@ -0,0 +1,119 @@ +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 0000000000000..740d6d902eb68 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referenceToEmptyObject.js @@ -0,0 +1,94 @@ +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 0000000000000..42d937bba78bb --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/references01.js @@ -0,0 +1,185 @@ +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 0000000000000..3e670a3aae184 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInConfiguredProject.js @@ -0,0 +1,210 @@ +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 0000000000000..ddc560bf37827 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFile.js @@ -0,0 +1,94 @@ +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 0000000000000..c5ebf4b65612d --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js @@ -0,0 +1,304 @@ +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 0000000000000..3b78b2a841850 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js @@ -0,0 +1,325 @@ +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 0000000000000..081b1af423b96 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesToNonPropertyNameStringLiteral.js @@ -0,0 +1,115 @@ +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 0000000000000..da713b6dd30ec --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesToStringLiteralValue.js @@ -0,0 +1,115 @@ +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 0000000000000..268611c7a7ee6 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/rename01.js @@ -0,0 +1,183 @@ +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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..87c8c838d0a33 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameInConfiguredProject.js @@ -0,0 +1,309 @@ +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":{"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":{"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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..bd23a0fdd5ef9 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js @@ -0,0 +1,376 @@ +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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..1fea14f0800b4 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js @@ -0,0 +1,375 @@ +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":{"providePrefixAndSuffixTextForRename":true,"quotePreference":"double"}},"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 0000000000000..48b0cc8ca76df --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/semanticClassificationJs1.js @@ -0,0 +1,109 @@ +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 0000000000000..3afd0ceea85cd --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/signatureHelp01.js @@ -0,0 +1,183 @@ +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 0000000000000..ca9d77ecc079c --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/signatureHelpJSDocCallbackTag.js @@ -0,0 +1,643 @@ +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 0000000000000..fd497b6507d45 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js @@ -0,0 +1,274 @@ +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 0000000000000..f445bd14c177a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.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/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 0000000000000..0f3eebbd0522a --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/tsxIncrementalServer.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 + +//// [/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 0000000000000..ff9c87fcf7dbe --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/typeReferenceOnServer.js @@ -0,0 +1,154 @@ +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 0000000000000..744a2f3215c40 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/typedefinition01.js @@ -0,0 +1,123 @@ +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/tsserver/inferredProjects/when-existing-inferred-project-has-no-root-files.js b/tests/baselines/reference/tsserver/inferredProjects/when-existing-inferred-project-has-no-root-files.js new file mode 100644 index 0000000000000..bf6ef4cb44676 --- /dev/null +++ b/tests/baselines/reference/tsserver/inferredProjects/when-existing-inferred-project-has-no-root-files.js @@ -0,0 +1,368 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/a/lib/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/myproject/app.ts] +import {x} from "./module"; + + +//// [/user/username/projects/myproject/module.d.ts] +import {y} from "./module2"; +import {a} from "module3"; +export const x = y; +export const b = a; + + +//// [/user/username/projects/myproject/module2.d.ts] +export const y = 10; + + +//// [/user/username/projects/myproject/node_modules/module3/package.json] +{"name":"module3","version":"1.0.0"} + +//// [/user/username/projects/myproject/node_modules/module3/index.d.ts] +export const a = 10; + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/app.ts", + "projectRootPath": "/user/username/projects/myproject" + }, + "seq": 1, + "type": "request" + } +Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject +Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/app.ts :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/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: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/module.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/module2.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/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: /user/username/projects/myproject/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/module3/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/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) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/module2.d.ts Text-1 "export const y = 10;\n" + /user/username/projects/myproject/node_modules/module3/index.d.ts Text-1 "export const a = 10;\n" + /user/username/projects/myproject/module.d.ts Text-1 "import {y} from \"./module2\";\nimport {a} from \"module3\";\nexport const x = y;\nexport const b = a;\n" + /user/username/projects/myproject/app.ts SVC-1-0 "import {x} from \"./module\";\n" + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + module2.d.ts + Imported via "./module2" from file 'module.d.ts' + node_modules/module3/index.d.ts + Imported via "module3" from file 'module.d.ts' with packageId 'module3/index.d.ts@1.0.0' + module.d.ts + Imported via "./module" from file 'app.ts' + app.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: /user/username/projects/myproject/app.ts ProjectRootPath: /user/username/projects/myproject +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject: *new* + {} +/user/username/projects/myproject/module.d.ts: *new* + {} +/user/username/projects/myproject/module2.d.ts: *new* + {} +/user/username/projects/myproject/node_modules/module3/package.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules: *new* + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "close", + "arguments": { + "file": "/user/username/projects/myproject/app.ts" + }, + "seq": 2, + "type": "request" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/app.ts 500 undefined WatchType: Closed Script info +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] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject: + {} +/user/username/projects/myproject/app.ts: *new* + {} +/user/username/projects/myproject/module.d.ts: + {} +/user/username/projects/myproject/module2.d.ts: + {} +/user/username/projects/myproject/node_modules/module3/package.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules: + {} + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/myproject/module.d.ts", + "projectRootPath": "/user/username/projects/myproject" + }, + "seq": 3, + "type": "request" + } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/module.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Search path: /user/username/projects/myproject +Info seq [hh:mm:ss:mss] For info: /user/username/projects/myproject/module.d.ts :: No config files found. +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/module3/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: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + + + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +TI:: Creating typing installer + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/app.ts: + {} +/user/username/projects/myproject/module2.d.ts: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject: + {} +/user/username/projects/myproject/module.d.ts: + {} +/user/username/projects/myproject/node_modules/module3/package.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules: + {} + +TI:: [hh:mm:ss:mss] Global cache location '/a/data/', safe file path '/safeList.json', types map path /typesMap.json +TI:: [hh:mm:ss:mss] Processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Trying to find '/a/data/package.json'... +TI:: [hh:mm:ss:mss] Finished processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Npm config file: /a/data/package.json +TI:: [hh:mm:ss:mss] Npm config file: '/a/data/package.json' is missing, creating new one... +TI:: [hh:mm:ss:mss] Updating types-registry npm package... +TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest +TI:: [hh:mm:ss:mss] TI:: Updated types-registry npm package +TI:: typing installer creation complete +//// [/a/data/package.json] +{ "private": true } + +//// [/a/data/node_modules/types-registry/index.json] +{ + "entries": {} +} + + +TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":[],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/user/username/projects/myproject","cachePath":"/a/data/","kind":"discover"} +TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information... +TI:: [hh:mm:ss:mss] Processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Cache location was already processed... +TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/typesMap.json' +TI:: [hh:mm:ss:mss] Explicitly included types: [] +TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/myproject/node_modules; all files: ["/user/username/projects/myproject/node_modules/module3/package.json"] +TI:: [hh:mm:ss:mss] Found package names: ["module3"] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] +TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]} +TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]} +TI:: [hh:mm:ss:mss] Sending response: + {"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*","files":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +TI:: [hh:mm:ss:mss] Installing typings ["module3"] +TI:: [hh:mm:ss:mss] 'module3':: Entry for package 'module3' does not exist in local types registry - skipping... +TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings +TI:: [hh:mm:ss:mss] Sending response: + {"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typings":[],"unresolvedImports":[],"kind":"action::set"} +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/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: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/module3/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: 3 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) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/module2.d.ts Text-1 "export const y = 10;\n" + /user/username/projects/myproject/node_modules/module3/index.d.ts Text-1 "export const a = 10;\n" + /user/username/projects/myproject/module.d.ts Text-1 "import {y} from \"./module2\";\nimport {a} from \"module3\";\nexport const x = y;\nexport const b = a;\n" + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + module2.d.ts + Imported via "./module2" from file 'module.d.ts' + node_modules/module3/index.d.ts + Imported via "module3" from file 'module.d.ts' with packageId 'module3/index.d.ts@1.0.0' + module.d.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/a/lib/lib.d.ts","/user/username/projects/myproject/module2.d.ts","/user/username/projects/myproject/module.d.ts"],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":[],"projectRootPath":"/user/username/projects/myproject","cachePath":"/a/data/","kind":"discover"} +TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information... +TI:: [hh:mm:ss:mss] Processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Cache location was already processed... +TI:: [hh:mm:ss:mss] Explicitly included types: [] +TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/myproject/node_modules; all files: ["/user/username/projects/myproject/node_modules/module3/package.json"] +TI:: [hh:mm:ss:mss] Found package names: ["module3"] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] +TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]} +TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["module3"],"filesToWatch":["/user/username/projects/myproject/bower_components","/user/username/projects/myproject/node_modules"]} +TI:: [hh:mm:ss:mss] Sending response: + {"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*"} +TI:: [hh:mm:ss:mss] Installing typings ["module3"] +TI:: [hh:mm:ss:mss] 'module3':: Entry for package 'module3' does not exist in local types registry - skipping... +TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings +TI:: [hh:mm:ss:mss] Sending response: + {"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true},"typings":[],"unresolvedImports":[],"kind":"action::set"} +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/app.ts 500 undefined WatchType: Closed Script info +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: /user/username/projects/myproject/module.d.ts ProjectRootPath: /user/username/projects/myproject +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/user/username/projects/myproject/bower_components: *new* + {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject: *new* + {} +/user/username/projects/myproject/module2.d.ts: + {} +/user/username/projects/myproject/node_modules/module3/package.json: *new* + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/app.ts: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/node_modules: + {} diff --git a/tests/baselines/reference/tsserver/maxNodeModuleJsDepth/handles-resolutions-when-currentNodeModulesDepth-changes-when-referencing-file-from-another-file.js b/tests/baselines/reference/tsserver/maxNodeModuleJsDepth/handles-resolutions-when-currentNodeModulesDepth-changes-when-referencing-file-from-another-file.js new file mode 100644 index 0000000000000..3b86c2be28370 --- /dev/null +++ b/tests/baselines/reference/tsserver/maxNodeModuleJsDepth/handles-resolutions-when-currentNodeModulesDepth-changes-when-referencing-file-from-another-file.js @@ -0,0 +1,185 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/a/lib/typesMap.json" doesn't exist +Before request +//// [/user/username/projects/project1/src/file1.js] +import {x} from 'glob'; +import {y} from 'minimatch'; // This imported file will add imports from minimatch to program + + +//// [/user/username/projects/project1/src/node_modules/glob/index.js] +import { y } from "minimatch"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program +export const x = y; + + +//// [/user/username/projects/project1/src/node_modules/minimatch/index.js] +import { z } from "path"; // This will be resolved two times +export const y = z; + + +//// [/user/username/projects/project1/src/node_modules/path/index.js] +export const z = 10; + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/user/username/projects/project1/src/file1.js" + }, + "seq": 1, + "type": "request" + } +Info seq [hh:mm:ss:mss] Search path: /user/username/projects/project1/src +Info seq [hh:mm:ss:mss] For info: /user/username/projects/project1/src/file1.js :: No config files found. +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/project1/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: /user/username/projects/project1/src/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: /user/username/projects/project1/src/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +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) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/project1/src/node_modules/minimatch/index.js Text-1 "import { z } from \"path\"; // This will be resolved two times\nexport const y = z;\n" + /user/username/projects/project1/src/node_modules/glob/index.js Text-1 "import { y } from \"minimatch\"; // This import is will put minimatch at maxNodeModuleJsDepth so its imports are not added to program\nexport const x = y;\n" + /user/username/projects/project1/src/node_modules/path/index.js Text-1 "export const z = 10;\n" + /user/username/projects/project1/src/file1.js SVC-1-0 "import {x} from 'glob';\nimport {y} from 'minimatch'; // This imported file will add imports from minimatch to program\n" + + + a/lib/lib.d.ts + Default library for target 'es5' + user/username/projects/project1/src/node_modules/minimatch/index.js + Imported via "minimatch" from file 'user/username/projects/project1/src/node_modules/glob/index.js' + Imported via 'minimatch' from file 'user/username/projects/project1/src/file1.js' + user/username/projects/project1/src/node_modules/glob/index.js + Imported via 'glob' from file 'user/username/projects/project1/src/file1.js' + user/username/projects/project1/src/node_modules/path/index.js + Imported via "path" from file 'user/username/projects/project1/src/node_modules/minimatch/index.js' + user/username/projects/project1/src/file1.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +TI:: Creating typing installer + +PolledWatches:: +/user/username/projects/project1/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/project1/src/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/project1/src/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/project1/tsconfig.json: *new* + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} + +FsWatchesRecursive:: +/user/username/projects: *new* + {} +/user/username/projects/project1/src/node_modules: *new* + {} + +TI:: [hh:mm:ss:mss] Global cache location '/a/data/', safe file path '/safeList.json', types map path /typesMap.json +TI:: [hh:mm:ss:mss] Processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Trying to find '/a/data/package.json'... +TI:: [hh:mm:ss:mss] Finished processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Npm config file: /a/data/package.json +TI:: [hh:mm:ss:mss] Npm config file: '/a/data/package.json' is missing, creating new one... +TI:: [hh:mm:ss:mss] Updating types-registry npm package... +TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest +TI:: [hh:mm:ss:mss] TI:: Updated types-registry npm package +TI:: typing installer creation complete +//// [/a/data/package.json] +{ "private": true } + +//// [/a/data/node_modules/types-registry/index.json] +{ + "entries": {} +} + + +TI:: [hh:mm:ss:mss] Got install request {"projectName":"/dev/null/inferredProject1*","fileNames":["/a/lib/lib.d.ts","/user/username/projects/project1/src/file1.js"],"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typeAcquisition":{"enable":true,"include":[],"exclude":[]},"unresolvedImports":["glob","minimatch","path"],"projectRootPath":"/","cachePath":"/a/data/","kind":"discover"} +TI:: [hh:mm:ss:mss] Request specifies cache path '/a/data/', loading cached information... +TI:: [hh:mm:ss:mss] Processing cache location '/a/data/' +TI:: [hh:mm:ss:mss] Cache location was already processed... +TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/typesMap.json' +TI:: [hh:mm:ss:mss] Explicitly included types: [] +TI:: [hh:mm:ss:mss] Searching for typing names in /user/username/projects/project1/src/node_modules; all files: [] +TI:: [hh:mm:ss:mss] Found package names: [] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: ["glob","minimatch","node"] +TI:: [hh:mm:ss:mss] Result: {"cachedTypingPaths":[],"newTypingNames":["glob","minimatch","node"],"filesToWatch":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]} +TI:: [hh:mm:ss:mss] Finished typings discovery: {"cachedTypingPaths":[],"newTypingNames":["glob","minimatch","node"],"filesToWatch":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]} +TI:: [hh:mm:ss:mss] Sending response: + {"kind":"action::watchTypingLocations","projectName":"/dev/null/inferredProject1*","files":["/user/username/projects/project1/src/bower_components","/user/username/projects/project1/src/node_modules","/bower_components","/node_modules"]} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +TI:: [hh:mm:ss:mss] Installing typings ["glob","minimatch","node"] +TI:: [hh:mm:ss:mss] 'glob':: Entry for package 'glob' does not exist in local types registry - skipping... +TI:: [hh:mm:ss:mss] 'minimatch':: Entry for package 'minimatch' does not exist in local types registry - skipping... +TI:: [hh:mm:ss:mss] 'node':: Entry for package 'node' does not exist in local types registry - skipping... +TI:: [hh:mm:ss:mss] All typings are known to be missing or invalid - no need to install more typings +TI:: [hh:mm:ss:mss] Sending response: + {"projectName":"/dev/null/inferredProject1*","typeAcquisition":{"enable":true,"include":[],"exclude":[]},"compilerOptions":{"target":1,"jsx":1,"allowNonTsExtensions":true,"allowJs":true,"noEmitForJsFiles":true,"maxNodeModuleJsDepth":2},"typings":[],"unresolvedImports":["glob","minimatch","path"],"kind":"action::set"} +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: /user/username/projects/project1/src/file1.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "responseRequired": false + } +After request + +PolledWatches:: +/bower_components: *new* + {"pollingInterval":500} +/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/project1/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/project1/src/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/project1/src/tsconfig.json: + {"pollingInterval":2000} +/user/username/projects/project1/tsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatchesRecursive:: +/user: *new* + {} +/user/username/projects: + {} +/user/username/projects/project1/src/node_modules: + {} diff --git a/tests/baselines/reference/tsserver/projectErrors/correct-errors-when-resolution-resolves-to-file-that-has-same-ambient-module-and-is-also-module.js b/tests/baselines/reference/tsserver/projectErrors/correct-errors-when-resolution-resolves-to-file-that-has-same-ambient-module-and-is-also-module.js index 5ed1a030f62b3..7cdd2aeb391f7 100644 --- a/tests/baselines/reference/tsserver/projectErrors/correct-errors-when-resolution-resolves-to-file-that-has-same-ambient-module-and-is-also-module.js +++ b/tests/baselines/reference/tsserver/projectErrors/correct-errors-when-resolution-resolves-to-file-that-has-same-ambient-module-and-is-also-module.js @@ -74,6 +74,8 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /us Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/node_modules 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/node_modules 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/src 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/src 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/node_modules/@types 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/myproject/node_modules/@types 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules/@types 1 undefined Project: /users/username/projects/myproject/tsconfig.json WatchType: Type roots diff --git a/tests/baselines/reference/tsserver/resolutionCache/when-resolves-to-ambient-module.js b/tests/baselines/reference/tsserver/resolutionCache/when-resolves-to-ambient-module.js index fcd948c705f99..ec9b3f5dec785 100644 --- a/tests/baselines/reference/tsserver/resolutionCache/when-resolves-to-ambient-module.js +++ b/tests/baselines/reference/tsserver/resolutionCache/when-resolves-to-ambient-module.js @@ -100,6 +100,12 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/typings 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/typings 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src 0 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/typings 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/typings 1 undefined Project: /user/username/projects/myproject/src/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/src/tsconfig.json Version: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms @@ -155,6 +161,12 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: *new* {} +/user/username/projects: *new* + {} +/user/username/projects/myproject: *new* + {} +/user/username/projects/myproject/src: *new* + {} /user/username/projects/myproject/src/somefolder/module1.ts: *new* {} /user/username/projects/myproject/src/tsconfig.json: *new*