diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fcb93c45dc1dd..2b82afa5ec1df 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1132,7 +1132,6 @@ import { WhileStatement, WideningContext, WithStatement, - WriterContextOut, YieldExpression, } from "./_namespaces/ts.js"; import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js"; @@ -1720,8 +1719,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => { return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer); }, - writeType: (type, enclosingDeclaration, flags, writer, verbosityLevel, out) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer, verbosityLevel, out); + writeType: (type, enclosingDeclaration, flags, writer) => { + return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer); }, writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); @@ -6048,24 +6047,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function typeToString( - type: Type, - enclosingDeclaration?: Node, - flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, - writer: EmitTextWriter = createTextWriter(""), - verbosityLevel?: number, - out?: WriterContextOut, - ): string { - const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation || verbosityLevel !== undefined; - const typeNode = nodeBuilder.typeToTypeNode( - type, - enclosingDeclaration, - toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : 0), - /*internalFlags*/ undefined, - /*tracker*/ undefined, - verbosityLevel, - out, - ); + function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string { + const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation; + const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : NodeBuilderFlags.None), /*internalFlags*/ undefined); if (typeNode === undefined) return Debug.fail("should always get typenode"); // The unresolved type gets a synthesized comment on `any` to hint to users that it's not a plain `any`. // Otherwise, we always strip comments out. @@ -6282,20 +6266,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }; return { syntacticBuilderResolver, - typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number, out?: { couldUnfoldMore: boolean; }) => withContext(enclosingDeclaration, flags, internalFlags, tracker, verbosityLevel, context => typeToTypeNodeHelper(type, context), out), - typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), - serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)), - serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)), - serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)), - indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), - signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => signatureToSignatureDeclarationHelper(signature, kind, context)), - symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), - symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToExpression(symbol, context, meaning)), - symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => typeParametersToTypeParameterDeclarations(symbol, context)), - symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToParameterDeclaration(symbol, context)), - typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number) => withContext(enclosingDeclaration, flags, internalFlags, tracker, verbosityLevel, context => typeParameterToDeclaration(parameter, context)), - symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolTableToDeclarationStatements(symbolTable, context)), - symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, /*verbosityLevel*/ undefined, context => symbolToNode(symbol, context, meaning)), + typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeToTypeNodeHelper(type, context)), + typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), + serializeTypeForExpression: (expr: Expression, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfExpression(expr, context)), + serializeTypeForDeclaration: (declaration: HasInferredType, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, symbol, context)), + serializeReturnTypeForSignature: (signature: SignatureDeclaration, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => syntacticNodeBuilder.serializeReturnTypeForSignature(signature, getSymbolOfDeclaration(signature), context)), + indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), + signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)), + symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), + symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToExpression(symbol, context, meaning)), + symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParametersToTypeParameterDeclarations(symbol, context)), + symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToParameterDeclaration(symbol, context)), + typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParameterToDeclaration(parameter, context)), + symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolTableToDeclarationStatements(symbolTable, context)), + symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToNode(symbol, context, meaning)), }; function getTypeFromTypeNode(context: NodeBuilderContext, node: TypeNode, noMappedTypes?: false): Type; @@ -6355,15 +6339,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbolToExpression(symbol, context, meaning); } - function withContext( - enclosingDeclaration: Node | undefined, - flags: NodeBuilderFlags | undefined, - internalFlags: InternalNodeBuilderFlags | undefined, - tracker: SymbolTracker | undefined, - verbosityLevel: number | undefined, - cb: (context: NodeBuilderContext) => T, - out?: WriterContextOut, - ): T | undefined { + function withContext(enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags: InternalNodeBuilderFlags | undefined, tracker: SymbolTracker | undefined, cb: (context: NodeBuilderContext) => T): T | undefined { const moduleResolverHost = tracker?.trackSymbol ? tracker.moduleResolverHost : (internalFlags || InternalNodeBuilderFlags.None) & InternalNodeBuilderFlags.DoNotIncludeSymbolChain ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : undefined; @@ -6373,7 +6349,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { flags: flags || NodeBuilderFlags.None, internalFlags: internalFlags || InternalNodeBuilderFlags.None, tracker: undefined!, - unfoldDepth: verbosityLevel ?? -1, encounteredError: false, suppressReportInferenceFallback: false, reportedDiagnostic: false, @@ -6396,17 +6371,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeParameterNamesByTextNextNameCount: undefined, enclosingSymbolTypes: new Map(), mapper: undefined, - depth: 0, - couldUnfoldMore: false, }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); if (context.truncating && context.flags & NodeBuilderFlags.NoTruncation) { context.tracker.reportTruncationError(); } - if (out) { - out.couldUnfoldMore = context.couldUnfoldMore; - } return context.encounteredError ? undefined : resultingNode; } @@ -6427,14 +6397,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function saveRestoreFlags(context: NodeBuilderContext) { const flags = context.flags; const internalFlags = context.internalFlags; - const depth = context.depth; return restore; function restore() { context.flags = flags; context.internalFlags = internalFlags; - context.depth = depth; } } @@ -6443,25 +6411,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return context.truncating = context.approximateLength > ((context.flags & NodeBuilderFlags.NoTruncation) ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); } - function couldUnfoldType(type: Type, context: NodeBuilderContext): boolean { - if (context.visitedTypes?.has(type.id)) { - return false; - } - return context.depth < context.unfoldDepth || context.depth === context.unfoldDepth && !context.couldUnfoldMore; - } - - // Determines if a type can be unfolded, based on how many layers of type aliases we're allowed to unfold. - function canUnfoldType(type: Type, context: NodeBuilderContext): boolean { - if (context.visitedTypes?.has(type.id)) { - return false; - } - const result = context.depth < context.unfoldDepth; - if (!result) { - context.couldUnfoldMore = true; - } - return result; - } - function typeToTypeNodeHelper(type: Type, context: NodeBuilderContext): TypeNode { const restoreFlags = saveRestoreFlags(context); const typeNode = typeToTypeNodeWorker(type, context); @@ -6611,25 +6560,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (!inTypeAlias && type.aliasSymbol && (context.flags & NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { - if (!canUnfoldType(type, context)) { - const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); - if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); - if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { - return factory.createArrayTypeNode(typeArgumentNodes![0]); - } - return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes); + const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); + if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & SymbolFlags.Class)) return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); + if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { + return factory.createArrayTypeNode(typeArgumentNodes![0]); } - context.depth += 1; + return symbolToTypeNode(type.aliasSymbol, context, SymbolFlags.Type, typeArgumentNodes); } const objectFlags = getObjectFlags(type); if (objectFlags & ObjectFlags.Reference) { Debug.assert(!!(type.flags & TypeFlags.Object)); - if (canUnfoldType(type, context)) { - context.depth += 1; - return createAnonymousTypeNode(type as TypeReference, /*forceClassExpansion*/ true); - } return (type as TypeReference).node ? visitAndTransformType(type as TypeReference, typeReferenceToTypeNode) : typeReferenceToTypeNode(type as TypeReference); } if (type.flags & TypeFlags.TypeParameter || objectFlags & ObjectFlags.ClassOrInterface) { @@ -6658,10 +6600,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { context.approximateLength += idText(name).length; return factory.createTypeReferenceNode(factory.createIdentifier(idText(name)), /*typeArguments*/ undefined); } - if (objectFlags & ObjectFlags.ClassOrInterface && canUnfoldType(type, context)) { - context.depth += 1; - return createAnonymousTypeNode(type as InterfaceType, /*forceClassExpansion*/ true); - } // Ignore constraint/default when creating a usage (as opposed to declaration) of a type parameter. if (type.symbol) { return symbolToTypeNode(type.symbol, context, SymbolFlags.Type); @@ -6869,7 +6807,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return result; } - function createAnonymousTypeNode(type: ObjectType, forceClassExpansion = false): TypeNode { + function createAnonymousTypeNode(type: ObjectType): TypeNode { const typeId = type.id; const symbol = type.symbol; if (symbol) { @@ -6903,15 +6841,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Always use 'typeof T' for type of class, enum, and module objects else if ( symbol.flags & SymbolFlags.Class - && !forceClassExpansion && !getBaseTypeVariableOfClass(symbol) - && !(symbol.valueDeclaration - && isClassLike(symbol.valueDeclaration) - && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral - && (!isClassDeclaration(symbol.valueDeclaration) - || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible)) - || symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) - || shouldWriteTypeOfFunctionSymbol() + && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible(symbol, context.enclosingDeclaration, isInstanceType, /*shouldComputeAliasesToMakeVisible*/ false).accessibility !== SymbolAccessibility.Accessible)) || + symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) || + shouldWriteTypeOfFunctionSymbol() ) { return symbolToTypeNode(symbol, context, isInstanceType); } @@ -6964,8 +6897,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { context.symbolDepth = new Map(); } - // Don't rely on type cache if we're unfolding a type, because we need to compute `couldUnfoldMore`. - const links = context.unfoldDepth >= 0 ? undefined : context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); + const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); const key = `${getTypeId(type)}|${context.flags}|${context.internalFlags}`; if (links) { links.serializedTypes ||= new Map(); @@ -7991,7 +7923,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function typeToTypeNodeHelperWithPossibleReusableTypeNode(type: Type, typeNode: TypeNode | undefined, context: NodeBuilderContext) { - return !couldUnfoldType(type, context) && typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) + return typeNode && getTypeFromTypeNode(context, typeNode) === type && syntacticNodeBuilder.tryReuseExistingTypeNode(context, typeNode) || typeToTypeNodeHelper(type, context); } @@ -8730,7 +8662,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let result; const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); const decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? symbol.declarations?.[0]; - if (!couldUnfoldType(type, context) && decl) { + if (decl) { if (isAccessor(decl)) { result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context); } @@ -53278,7 +53210,6 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext { flags: NodeBuilderFlags; internalFlags: InternalNodeBuilderFlags; tracker: SymbolTrackerImpl; - readonly unfoldDepth: number; // State encounteredError: boolean; @@ -53302,11 +53233,7 @@ interface NodeBuilderContext extends SyntacticTypeNodeBuilderContext { reverseMappedStack: ReverseMappedSymbol[] | undefined; bundled: boolean; mapper: TypeMapper | undefined; - depth: number; // How many levels of nested type aliases we have unfolded so far suppressReportInferenceFallback: boolean; - - // Output - couldUnfoldMore: boolean; // Whether we found a type alias that we could unfold but didn't } class SymbolTrackerImpl implements SymbolTracker { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 449ad50cb014d..c581939e5fbd9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5048,11 +5048,6 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost, SourceFi packageBundlesTypes(packageName: string): boolean; } -/** @internal */ -export interface WriterContextOut { - couldUnfoldMore: boolean; -} - export interface TypeChecker { getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getTypeOfSymbol(symbol: Symbol): Type; @@ -5139,7 +5134,6 @@ export interface TypeChecker { symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; /** Note that the resulting nodes cannot be checked. */ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; - /** @internal */ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker, verbosityLevel?: number): TypeParameterDeclaration | undefined; // eslint-disable-line @typescript-eslint/unified-signatures getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolAtLocation(node: Node): Symbol | undefined; @@ -5172,7 +5166,7 @@ export interface TypeChecker { typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; /** @internal */ writeSignature(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind, writer?: EmitTextWriter): string; - /** @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter, verbosityLevel?: number, out?: WriterContextOut): string; + /** @internal */ writeType(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string; /** @internal */ writeSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags, writer?: EmitTextWriter): string; /** @internal */ writeTypePredicate(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string; diff --git a/src/harness/client.ts b/src/harness/client.ts index c735ffa7f3e34..ec659d738c02a 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -254,8 +254,8 @@ export class SessionClient implements LanguageService { return { line, character: offset }; } - getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel?: number | undefined): QuickInfo { - const args = { ...this.createFileLocationRequestArgs(fileName, position), verbosityLevel }; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo { + const args = this.createFileLocationRequestArgs(fileName, position); const request = this.processRequest(protocol.CommandTypes.Quickinfo, args); const response = this.processResponse(request); @@ -268,7 +268,6 @@ export class SessionClient implements LanguageService { displayParts: [{ kind: "text", text: body.displayString }], documentation: typeof body.documentation === "string" ? [{ kind: "text", text: body.documentation }] : body.documentation, tags: this.decodeLinkDisplayParts(body.tags), - canIncreaseVerbosityLevel: body.canIncreaseVerbosityLevel, }; } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 81ffed9cd698f..e1a410dfb5d3b 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -86,10 +86,6 @@ export interface TextSpan { end: number; } -export interface VerbosityLevels { - [markerName: string]: number | number[] | undefined; -} - // Name of testcase metadata including ts.CompilerOptions properties that will be used by globalOptions // To add additional option, add property into the testOptMetadataNames, refer the property in either globalMetadataNames or fileMetadataNames // Add cases into convertGlobalOptionsToCompilationsSettings function for the compiler to acknowledge such option from meta data @@ -2455,28 +2451,19 @@ export class TestState { return result; } - public baselineQuickInfo(verbosityLevels?: VerbosityLevels): void { - const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => { - const verbosityLevel = toArray(verbosityLevels?.[name]); - const items = verbosityLevel.map(verbosityLevel => { - const item: ts.QuickInfo & { verbosityLevel?: number; } | undefined = this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position, verbosityLevel); - if (item) item.verbosityLevel = verbosityLevel; - return { - marker: { ...marker, name }, - item, - }; - }); - return items; - }).flat(); + public baselineQuickInfo(): void { + const result = ts.arrayFrom(this.testData.markerPositions.entries(), ([name, marker]) => ({ + marker: { ...marker, name }, + item: this.languageService.getQuickInfoAtPosition(marker.fileName, marker.position), + })); const annotations = this.annotateContentWithTooltips( result, "quickinfo", item => item.textSpan, - ({ displayParts, documentation, tags, verbosityLevel }) => [ + ({ displayParts, documentation, tags }) => [ ...(displayParts ? displayParts.map(p => p.text).join("").split("\n") : []), ...(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") : []), - ...(verbosityLevel !== undefined ? [`(verbosity level: ${verbosityLevel})`] : []), ], ); this.baseline("QuickInfo", annotations + "\n\n" + stringify(result)); diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index bb10cbf744a99..ec23609de6db0 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -449,8 +449,8 @@ export class Verify extends VerifyNegatable { this.state.baselineGetEmitOutput(); } - public baselineQuickInfo(verbosityLevels?: FourSlash.VerbosityLevels): void { - this.state.baselineQuickInfo(verbosityLevels); + public baselineQuickInfo(): void { + this.state.baselineQuickInfo(); } public baselineSignatureHelp(): void { diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 4683a1f300662..5cce908761082 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2005,11 +2005,6 @@ export interface QuickInfoRequest extends FileLocationRequest { arguments: FileLocationRequestArgs; } -export interface QuickInfoRequestArgs extends FileLocationRequestArgs { - /** TODO */ - verbosityLevel?: number; -} - /** * Body of QuickInfoResponse. */ @@ -2049,11 +2044,6 @@ export interface QuickInfoResponseBody { * JSDoc tags associated with symbol. */ tags: JSDocTagInfo[]; - - /** - * TODO - */ - canIncreaseVerbosityLevel?: boolean; } /** diff --git a/src/server/session.ts b/src/server/session.ts index 120f043e2e83c..006eb57d7af70 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -2392,10 +2392,10 @@ export class Session implements EventSender { return languageService.isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0)); } - private getQuickInfoWorker(args: protocol.QuickInfoRequestArgs, simplifiedResult: boolean): protocol.QuickInfoResponseBody | QuickInfo | undefined { + private getQuickInfoWorker(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.QuickInfoResponseBody | QuickInfo | undefined { const { file, project } = this.getFileAndProject(args); const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file)!; - const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo), args.verbosityLevel); + const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo)); if (!quickInfo) { return undefined; } @@ -2411,7 +2411,6 @@ export class Session implements EventSender { displayString, documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation), tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts), - canIncreaseVerbosityLevel: quickInfo.canIncreaseVerbosityLevel, }; } else { diff --git a/src/services/services.ts b/src/services/services.ts index fb5e9a0857929..7236f146ff1c7 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2274,7 +2274,7 @@ export function createLanguageService( return Completions.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences); } - function getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel?: number): QuickInfo | undefined { + function getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); @@ -2293,26 +2293,13 @@ export function createLanguageService( kind: ScriptElementKind.unknown, kindModifiers: ScriptElementKindModifier.none, textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile), - displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplayParts(typeChecker, type, getContainerNode(nodeForQuickInfo), /*flags*/ undefined, verbosityLevel)), + displayParts: typeChecker.runWithCancellationToken(cancellationToken, typeChecker => typeToDisplayParts(typeChecker, type, getContainerNode(nodeForQuickInfo))), documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : undefined, tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : undefined, }; } - const { symbolKind, displayParts, documentation, tags, canIncreaseVerbosityLevel } = typeChecker.runWithCancellationToken( - cancellationToken, - typeChecker => - SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind( - typeChecker, - symbol, - sourceFile, - getContainerNode(nodeForQuickInfo), - nodeForQuickInfo, - /*semanticMeaning*/ undefined, - /*alias*/ undefined, - verbosityLevel, - ), - ); + const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, typeChecker => SymbolDisplay.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo)); return { kind: symbolKind, kindModifiers: SymbolDisplay.getSymbolModifiers(typeChecker, symbol), @@ -2320,7 +2307,6 @@ export function createLanguageService( displayParts, documentation, tags, - canIncreaseVerbosityLevel, }; } diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts index 0b6e220912921..6c49848435e70 100644 --- a/src/services/symbolDisplay.ts +++ b/src/services/symbolDisplay.ts @@ -108,7 +108,6 @@ import { TypeParameter, typeToDisplayParts, VariableDeclaration, - WriterContextOut, } from "./_namespaces/ts.js"; const symbolDisplayNodeBuilderFlags = NodeBuilderFlags.OmitParameterModifiers | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope; @@ -255,20 +254,9 @@ export interface SymbolDisplayPartsDocumentationAndSymbolKind { documentation: SymbolDisplayPart[]; symbolKind: ScriptElementKind; tags: JSDocTagInfo[] | undefined; - canIncreaseVerbosityLevel?: boolean; } -function getSymbolDisplayPartsDocumentationAndSymbolKindWorker( - typeChecker: TypeChecker, - symbol: Symbol, - sourceFile: SourceFile, - enclosingDeclaration: Node | undefined, - location: Node, - type: Type | undefined, - semanticMeaning: SemanticMeaning, - alias?: Symbol, - verbosityLevel?: number, -): SymbolDisplayPartsDocumentationAndSymbolKind { +function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker: TypeChecker, symbol: Symbol, sourceFile: SourceFile, enclosingDeclaration: Node | undefined, location: Node, type: Type | undefined, semanticMeaning: SemanticMeaning, alias?: Symbol): SymbolDisplayPartsDocumentationAndSymbolKind { const displayParts: SymbolDisplayPart[] = []; let documentation: SymbolDisplayPart[] = []; let tags: JSDocTagInfo[] = []; @@ -279,7 +267,6 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker( let documentationFromAlias: SymbolDisplayPart[] | undefined; let tagsFromAlias: JSDocTagInfo[] | undefined; let hasMultipleSignatures = false; - const typeWriterOut: WriterContextOut | undefined = verbosityLevel !== undefined ? { couldUnfoldMore: false } : undefined; if (location.kind === SyntaxKind.ThisKeyword && !isThisExpression) { return { displayParts: [keywordPart(SyntaxKind.ThisKeyword)], documentation: [], symbolKind: ScriptElementKind.primitiveType, tags: undefined }; @@ -475,17 +462,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker( displayParts.push(spacePart()); displayParts.push(operatorPart(SyntaxKind.EqualsToken)); displayParts.push(spacePart()); - addRange( - displayParts, - typeToDisplayParts( - typeChecker, - location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), - enclosingDeclaration, - TypeFormatFlags.InTypeAlias, - verbosityLevel, - typeWriterOut, - ), - ); + addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, TypeFormatFlags.InTypeAlias)); } if (symbolFlags & SymbolFlags.Enum) { prefixNextMeaning(); @@ -673,30 +650,13 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker( // If the type is type parameter, format it specially if (type.symbol && type.symbol.flags & SymbolFlags.TypeParameter && symbolKind !== ScriptElementKind.indexSignatureElement) { const typeParameterParts = mapToDisplayParts(writer => { - const param = typeChecker.typeParameterToDeclaration( - type as TypeParameter, - enclosingDeclaration, - symbolDisplayNodeBuilderFlags, - /*internalFlags*/ undefined, - /*tracker*/ undefined, - verbosityLevel, - )!; + const param = typeChecker.typeParameterToDeclaration(type as TypeParameter, enclosingDeclaration, symbolDisplayNodeBuilderFlags)!; getPrinter().writeNode(EmitHint.Unspecified, param, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration)), writer); }); addRange(displayParts, typeParameterParts); } else { - addRange( - displayParts, - typeToDisplayParts( - typeChecker, - type, - enclosingDeclaration, - /*flags*/ undefined, - verbosityLevel, - typeWriterOut, - ), - ); + addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration)); } if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) { const labelDecl = symbol.links.target.links.tupleLabelDeclaration; @@ -782,13 +742,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker( tags = tagsFromAlias; } - return { - displayParts, - documentation, - symbolKind, - tags: tags.length === 0 ? undefined : tags, - canIncreaseVerbosityLevel: typeWriterOut?.couldUnfoldMore, - }; + return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? undefined : tags }; function getPrinter() { return createPrinterWithRemoveComments(); @@ -920,9 +874,8 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind( location: Node, semanticMeaning: SemanticMeaning = getMeaningFromLocation(location), alias?: Symbol, - verbosityLevel?: number, ): SymbolDisplayPartsDocumentationAndSymbolKind { - return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, /*type*/ undefined, semanticMeaning, alias, verbosityLevel); + return getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, /*type*/ undefined, semanticMeaning, alias); } function isLocalVariableOrFunction(symbol: Symbol) { diff --git a/src/services/types.ts b/src/services/types.ts index 39c1636fefcd1..0811d858e6a6e 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -583,8 +583,6 @@ export interface LanguageService { * @param position A zero-based index of the character where you want the quick info */ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; - /** @internal */ - getQuickInfoAtPosition(fileName: string, position: number, verbosityLevel: number | undefined): QuickInfo | undefined; // eslint-disable-line @typescript-eslint/unified-signatures getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; @@ -1326,7 +1324,6 @@ export interface QuickInfo { displayParts?: SymbolDisplayPart[]; documentation?: SymbolDisplayPart[]; tags?: JSDocTagInfo[]; - canIncreaseVerbosityLevel?: boolean; } export type RenameInfo = RenameInfoSuccess | RenameInfoFailure; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 0f7b99250111f..83db802709fe3 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -390,7 +390,6 @@ import { visitEachChild, VoidExpression, walkUpParenthesizedExpressions, - WriterContextOut, YieldExpression, } from "./_namespaces/ts.js"; @@ -3056,9 +3055,9 @@ export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbol } /** @internal */ -export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.None, verbosityLevel?: number, out?: WriterContextOut): SymbolDisplayPart[] { +export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.None): SymbolDisplayPart[] { return mapToDisplayParts(writer => { - typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer, verbosityLevel, out); + typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer); }); } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index e7d26171cf4cd..60c1dec272833 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -1486,10 +1486,6 @@ declare namespace ts { command: CommandTypes.Quickinfo; arguments: FileLocationRequestArgs; } - export interface QuickInfoRequestArgs extends FileLocationRequestArgs { - /** TODO */ - verbosityLevel?: number; - } /** * Body of QuickInfoResponse. */ @@ -1523,10 +1519,6 @@ declare namespace ts { * JSDoc tags associated with symbol. */ tags: JSDocTagInfo[]; - /** - * TODO - */ - canIncreaseVerbosityLevel?: boolean; } /** * Quickinfo response message. @@ -10765,7 +10757,6 @@ declare namespace ts { displayParts?: SymbolDisplayPart[]; documentation?: SymbolDisplayPart[]; tags?: JSDocTagInfo[]; - canIncreaseVerbosityLevel?: boolean; } type RenameInfo = RenameInfoSuccess | RenameInfoFailure; interface RenameInfoSuccess { diff --git a/tests/baselines/reference/quickinfoVerbosity1.baseline b/tests/baselines/reference/quickinfoVerbosity1.baseline deleted file mode 100644 index e41255cd67c1a..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosity1.baseline +++ /dev/null @@ -1,326 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosity1.ts === -// type FooType = string | number; -// const foo: FooType = 1; -// ^^^ -// | ---------------------------------------------------------------------- -// | const foo: string | number -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^ -// | ---------------------------------------------------------------------- -// | const foo: FooType -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// type BarType = FooType | boolean; -// const bar: BarType = 1; -// ^^^ -// | ---------------------------------------------------------------------- -// | const bar: boolean | (string | number) -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^^^ -// | ---------------------------------------------------------------------- -// | const bar: boolean | FooType -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^ -// | ---------------------------------------------------------------------- -// | const bar: BarType -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts", - "position": 41, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 38, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts", - "position": 41, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 38, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts", - "position": 99, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 96, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts", - "position": 99, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 96, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity1.ts", - "position": 99, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 96, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ")", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosity2.baseline b/tests/baselines/reference/quickinfoVerbosity2.baseline deleted file mode 100644 index 844d2f7663f34..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosity2.baseline +++ /dev/null @@ -1,431 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosity2.ts === -// type Str = string | {}; -// type FooType = Str | number; -// type Sym = symbol | (() => void); -// type BarType = Sym | boolean; -// type BothType = FooType | BarType; -// const both: BothType = 1; -// ^^^^ -// | ---------------------------------------------------------------------- -// | const both: (number | (string | {})) | (boolean | (symbol | (() => void))) -// | (verbosity level: 3) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const both: (number | Str) | (boolean | Sym) -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const both: FooType | BarType -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const both: BothType -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts", - "position": 162, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 158, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "both", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BothType", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts", - "position": 162, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 158, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "both", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts", - "position": 162, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 158, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "both", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosity2.ts", - "position": 162, - "name": "b" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 158, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "both", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "symbol", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 3 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityClass1.baseline b/tests/baselines/reference/quickinfoVerbosityClass1.baseline deleted file mode 100644 index cd101e72dbec8..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityClass1.baseline +++ /dev/null @@ -1,1908 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosityClass1.ts === -// { -// class Foo { -// a!: "a" | "c"; -// } -// const f = new Foo(); -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// type FooParam = "a" | "b"; -// class Foo { -// constructor(public x: string) { -// this.x = "a"; -// } -// foo(p: FooParam): void {} -// } -// const f = new Foo(""); -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | x: string; -// | foo(p: "a" | "b"): void; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | x: string; -// | foo(p: FooParam): void; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// class Bar { -// a!: string; -// bar(): void {} -// baz(param: string): void {} -// } -// class Foo extends Bar { -// b!: boolean; -// override baz(param: string | number): void {} -// } -// const f = new Foo(); -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | b: boolean; -// | baz(param: string | number): void; -// | a: string; -// | bar(): void; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// class Bar { -// bar(param: B): void {} -// baz(): this { return this; } -// } -// class Foo extends Bar<"foo"> { -// foo(): this { return this; } -// } -// const b = new Bar(); -// ^ -// | ---------------------------------------------------------------------- -// | const b: { -// | bar(param: string): void; -// | baz(): Bar; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const b: { -// | bar(param: string): void; -// | baz(): Bar; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const b: Bar -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// const f = new Foo(); -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | foo(): Foo; -// | bar(param: "foo"): void; -// | baz(): Foo; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// class Bar { -// bar(param: B): void {} -// baz(): this { return this; } -// } -// const noname = new (class extends Bar<"foo"> { -// ^^^^^^ -// | ---------------------------------------------------------------------- -// | const noname: { -// | foo(): (Anonymous class); -// | bar(param: "foo"): void; -// | baz(): (Anonymous class); -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^^^^ -// | ---------------------------------------------------------------------- -// | const noname: (Anonymous class) -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// foo(): this { return this; } -// })(); -// const klass = class extends Bar<"foo"> { -// foo(): this { return this; } -// }; -// const k = new klass(); -// ^ -// | ---------------------------------------------------------------------- -// | const k: { -// | foo(): klass; -// | bar(param: "foo"): void; -// | baz(): klass; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const k: klass -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 58, - "name": "f1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 57, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 58, - "name": "f1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 57, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 250, - "name": "f2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 249, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 250, - "name": "f2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 249, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "x", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "p", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooParam", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 250, - "name": "f2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 249, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "x", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "p", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 491, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 490, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 491, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 490, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "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" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 706, - "name": "b1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 705, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Bar", - "kind": "className" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 706, - "name": "b1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 705, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "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" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Bar", - "kind": "className" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 706, - "name": "b1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 705, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "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" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Bar", - "kind": "className" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 731, - "name": "f4" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 730, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 731, - "name": "f4" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 730, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"foo\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 873, - "name": "n1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 867, - "length": 6 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "noname", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(Anonymous class)", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 873, - "name": "n1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 867, - "length": 6 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "noname", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(Anonymous class)", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"foo\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(Anonymous class)", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 1055, - "name": "k1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 1054, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "k", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "klass", - "kind": "className" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityClass1.ts", - "position": 1055, - "name": "k1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 1054, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "k", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "klass", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "param", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"foo\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "baz", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "klass", - "kind": "className" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityInterface1.baseline b/tests/baselines/reference/quickinfoVerbosityInterface1.baseline deleted file mode 100644 index 7d0b66bc6b396..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityInterface1.baseline +++ /dev/null @@ -1,2383 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosityInterface1.ts === -// { -// interface Foo { -// a: "a" | "c"; -// } -// const f: Foo = { a: "a" }; -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// interface Bar { -// b: "b" | "d"; -// } -// interface Foo extends Bar { -// a: "a" | "c"; -// } -// const f: Foo = { a: "a", b: "b" }; -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | b: "b" | "d"; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// type BarParam = "b" | "d"; -// interface Bar { -// bar(b: BarParam): string; -// } -// type FooType = "a" | "c"; -// interface FooParam { -// param: FooType; -// } -// interface Foo extends Bar { -// a: FooType; -// foo: (a: FooParam) => number; -// } -// const f: Foo = { a: "a", bar: () => "b", foo: () => 1 }; -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | foo: (a: { -// | param: "a" | "c"; -// | }) => number; -// | bar(b: "b" | "d"): string; -// | } -// | (verbosity level: 3) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | foo: (a: { -// | param: FooType; -// | }) => number; -// | bar(b: "b" | "d"): string; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: FooType; -// | foo: (a: FooParam) => number; -// | bar(b: BarParam): string; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// interface Bar { -// bar(b: B): string; -// } -// interface FooParam { -// param: "a" | "c"; -// } -// interface Foo extends Bar { -// a: "a" | "c"; -// foo: (a: FooParam) => number; -// } -// const f: Foo = { a: "a", bar: () => "b", foo: () => 1 }; -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | foo: (a: { -// | param: "a" | "c"; -// | }) => number; -// | bar(b: { -// | param: "a" | "c"; -// | }): string; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a" | "c"; -// | foo: (a: FooParam) => number; -// | bar(b: FooParam): string; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// const b: Bar = { bar: () => "" }; -// ^ -// | ---------------------------------------------------------------------- -// | const b: { -// | bar(b: number): string; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const b: Bar -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// interface Foo { -// a: A; -// } -// type Alias = Foo; -// const a: Alias = { a: "a" }; -// ^ -// | ---------------------------------------------------------------------- -// | const a: { -// | a: string; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const a: Foo -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const a: Alias -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// interface Foo { -// a: "a"; -// } -// interface Foo { -// b: "b"; -// } -// const f: Foo = { a: "a", b: "b" }; -// ^ -// | ---------------------------------------------------------------------- -// | const f: { -// | a: "a"; -// | b: "b"; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^ -// | ---------------------------------------------------------------------- -// | const f: Foo -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 61, - "name": "f1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 60, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 61, - "name": "f1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 60, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 204, - "name": "f2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 203, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 204, - "name": "f2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 203, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"d\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 519, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 518, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 519, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 518, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooParam", - "kind": "interfaceName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarParam", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 519, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 518, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "param", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"d\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 519, - "name": "f3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 518, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "param", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"d\"", - "kind": "stringLiteral" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 3 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 805, - "name": "f4" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 804, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 805, - "name": "f4" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 804, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooParam", - "kind": "interfaceName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooParam", - "kind": "interfaceName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 805, - "name": "f4" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 804, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "param", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "param", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 866, - "name": "b1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 865, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Bar", - "kind": "interfaceName" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 866, - "name": "b1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 865, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 989, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 988, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Alias", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 989, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 988, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 989, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 988, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 1110, - "name": "f5" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 1109, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "interfaceName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityInterface1.ts", - "position": 1110, - "name": "f5" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 1109, - "length": 1 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "f", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline b/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline deleted file mode 100644 index 145792e628a26..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityIntersection1.baseline +++ /dev/null @@ -1,357 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosityIntersection1.ts === -// { -// type Foo = { a: "a" | "c" }; -// type Bar = { a: "a" | "b" }; -// const obj: Foo & Bar = { a: "a" }; -// ^^^ -// | ---------------------------------------------------------------------- -// | const obj: { -// | a: "a" | "c"; -// | } & { -// | a: "a" | "b"; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^ -// | ---------------------------------------------------------------------- -// | const obj: Foo & Bar -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// type Foo = { a: "c" }; -// type Bar = { a: "b" }; -// const obj: Foo & Bar = { a: "" }; -// ^^^ -// | ---------------------------------------------------------------------- -// | const obj: never -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } -// { -// type Foo = { a: "c" }; -// type Bar = { a: "b" }; -// type Never = Foo & Bar; -// const obj: Never = { a: "" }; -// ^^^ -// | ---------------------------------------------------------------------- -// | const obj: never -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// } - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts", - "position": 81, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 78, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Foo", - "kind": "aliasName" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "&", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Bar", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts", - "position": 81, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 78, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"c\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "&", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "a", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"a\"", - "kind": "stringLiteral" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "\"b\"", - "kind": "stringLiteral" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts", - "position": 178, - "name": "o2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 175, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "never", - "kind": "keyword" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts", - "position": 302, - "name": "o3" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 299, - "length": 3 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "never", - "kind": "keyword" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 0 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline b/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline deleted file mode 100644 index 2a4091f720292..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityObjectType1.baseline +++ /dev/null @@ -1,1299 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosityObjectType1.ts === -// type Str = string | {}; -// type FooType = Str | number; -// type Sym = symbol | (() => void); -// type BarType = Sym | boolean; -// type Obj = { foo: FooType, bar: BarType, str: Str }; -// const obj1: Obj = { foo: 1, bar: true, str: "3"}; -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj1: { -// | foo: number | (string | {}); -// | bar: boolean | (symbol | (() => void)); -// | str: string | {}; -// | } -// | (verbosity level: 3) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj1: { -// | foo: number | Str; -// | bar: boolean | Sym; -// | str: string | {}; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj1: { -// | foo: FooType; -// | bar: BarType; -// | str: Str; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj1: Obj -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- -// const obj2: { foo: FooType, bar: BarType, str: Str } = { foo: 1, bar: true, str: "3"}; -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj2: { -// | foo: number | (string | {}); -// | bar: boolean | (symbol | (() => void)); -// | str: string | {}; -// | } -// | (verbosity level: 2) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj2: { -// | foo: number | Str; -// | bar: boolean | Sym; -// | str: string | {}; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj2: { -// | foo: FooType; -// | bar: BarType; -// | str: Str; -// | } -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 180, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 176, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj1", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Obj", - "kind": "aliasName" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 180, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 176, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj1", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 180, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 176, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj1", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 2 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 180, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 176, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj1", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "symbol", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 3 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 230, - "name": "o2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 226, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj2", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 230, - "name": "o2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 226, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj2", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts", - "position": 230, - "name": "o2" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 226, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj2", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "foo", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "number", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "bar", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "boolean", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "symbol", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "=>", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "void", - "kind": "keyword" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "str", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "string", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "|", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "}", - "kind": "punctuation" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 2 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityServer.baseline b/tests/baselines/reference/quickinfoVerbosityServer.baseline deleted file mode 100644 index 6bce07cf78b76..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityServer.baseline +++ /dev/null @@ -1,79 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/server/quickinfoVerbosityServer.ts === -// type FooType = string | number -// const foo: FooType = 1 -// ^^^ -// | ---------------------------------------------------------------------- -// | const foo: string | number -// | -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- -// ^^^ -// | ---------------------------------------------------------------------- -// | const foo: FooType -// | -// | (verbosity level: 0) -// | ---------------------------------------------------------------------- - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts", - "position": 40, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 37, - "length": 3 - }, - "displayParts": [ - { - "kind": "text", - "text": "const foo: FooType" - } - ], - "documentation": [ - { - "kind": "text", - "text": "" - } - ], - "tags": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 0 - } - }, - { - "marker": { - "fileName": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts", - "position": 40, - "name": "a" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 37, - "length": 3 - }, - "displayParts": [ - { - "kind": "text", - "text": "const foo: string | number" - } - ], - "documentation": [ - { - "kind": "text", - "text": "" - } - ], - "tags": [], - "canIncreaseVerbosityLevel": false, - "verbosityLevel": 1 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/quickinfoVerbosityTruncation.baseline b/tests/baselines/reference/quickinfoVerbosityTruncation.baseline deleted file mode 100644 index b65773e3c335d..0000000000000 --- a/tests/baselines/reference/quickinfoVerbosityTruncation.baseline +++ /dev/null @@ -1,706 +0,0 @@ -// === QuickInfo === -=== /tests/cases/fourslash/quickinfoVerbosityTruncation.ts === -// type Str = string | {}; -// type FooType = Str | number; -// type Sym = symbol | (() => void); -// type BarType = Sym | boolean; -// interface LotsOfProps { -// someLongPropertyName1: Str; -// someLongPropertyName2: FooType; -// someLongPropertyName3: Sym; -// someLongPropertyName4: BarType; -// someLongPropertyName5: Str; -// someLongPropertyName6: FooType; -// someLongPropertyName7: Sym; -// someLongPropertyName8: BarType; -// someLongMethodName1(a: FooType, b: BarType): Sym; -// someLongPropertyName9: Str; -// someLongPropertyName10: FooType; -// someLongPropertyName11: Sym; -// someLongPropertyName12: BarType; -// someLongPropertyName13: Str; -// someLongPropertyName14: FooType; -// someLongPropertyName15: Sym; -// someLongPropertyName16: BarType; -// someLongMethodName2(a: FooType, b: BarType): Sym; -// } -// const obj1: LotsOfProps = undefined as any as LotsOfProps; -// ^^^^ -// | ---------------------------------------------------------------------- -// | const obj1: { -// | someLongPropertyName1: Str; -// | someLongPropertyName2: FooType; -// | someLongPropertyName3: Sym; -// | someLongPropertyName4: BarType; -// | someLongPropertyName5: Str; -// | someLongPropertyName6: FooType; -// | someLongPropertyName7: Sym; -// | someLongPropertyName8: BarType; -// | someLongMethodName1(a: FooType, b: BarType): Sym; -// | someLongPropertyName9: Str; -// | someLongPropertyName10: FooType; -// | someLongPropertyName11: Sym; -// | someLongPropertyName12: BarType; -// | someLongPropertyName13: Str; -// | someLongPropertyName14: FooType; -// | someLongPropertyName15: Sym; -// | someLongPropertyName16: BarType; -// | someLongMethodName2(a: FooType, b: BarType): Sym; -// | } -// | (verbosity level: 1) -// | ---------------------------------------------------------------------- - -[ - { - "marker": { - "fileName": "/tests/cases/fourslash/quickinfoVerbosityTruncation.ts", - "position": 812, - "name": "o1" - }, - "item": { - "kind": "const", - "kindModifiers": "", - "textSpan": { - "start": 808, - "length": 4 - }, - "displayParts": [ - { - "text": "const", - "kind": "keyword" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "obj1", - "kind": "localName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "{", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName1", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName2", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName3", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName4", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName5", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName6", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName7", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName8", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongMethodName1", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName9", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName10", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName11", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName12", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName13", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Str", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName14", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName15", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongPropertyName16", - "kind": "propertyName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "someLongMethodName2", - "kind": "text" - }, - { - "text": "(", - "kind": "punctuation" - }, - { - "text": "a", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "FooType", - "kind": "aliasName" - }, - { - "text": ",", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "b", - "kind": "parameterName" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "BarType", - "kind": "aliasName" - }, - { - "text": ")", - "kind": "punctuation" - }, - { - "text": ":", - "kind": "punctuation" - }, - { - "text": " ", - "kind": "space" - }, - { - "text": "Sym", - "kind": "aliasName" - }, - { - "text": ";", - "kind": "punctuation" - }, - { - "text": "\n", - "kind": "lineBreak" - }, - { - "text": "}", - "kind": "punctuation" - } - ], - "documentation": [], - "canIncreaseVerbosityLevel": true, - "verbosityLevel": 1 - } - } -] \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js b/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js deleted file mode 100644 index 7e9762e4fd5f3..0000000000000 --- a/tests/baselines/reference/tsserver/fourslashServer/quickinfoVerbosityServer.js +++ /dev/null @@ -1,199 +0,0 @@ -Info seq [hh:mm:ss:mss] currentDirectory:: /home/src/Vscode/Projects/bin useCaseSensitiveFileNames:: false -Info seq [hh:mm:ss:mss] libs Location:: /home/src/tslibs/TS/Lib -Info seq [hh:mm:ss:mss] globalTypingsCacheLocation:: /home/src/Library/Caches/typescript -Info seq [hh:mm:ss:mss] Provided types map file "/home/src/tslibs/TS/Lib/typesMap.json" doesn't exist -//// [/home/src/tslibs/TS/Lib/lib.d.ts] -lib.d.ts-Text - -//// [/home/src/tslibs/TS/Lib/lib.decorators.d.ts] -lib.decorators.d.ts-Text - -//// [/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts] -lib.decorators.legacy.d.ts-Text - -//// [/tests/cases/fourslash/server/quickinfoVerbosityServer.ts] -type FooType = string | number -const foo: FooType = 1 - - -Info seq [hh:mm:ss:mss] request: - { - "seq": 0, - "type": "request", - "arguments": { - "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts" - }, - "command": "open" - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/quickinfoVerbosityServer.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Creating InferredProject: /dev/null/inferredProject1*, currentDirectory: /tests/cases/fourslash/server -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: /home/src/tslibs/TS/Lib/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: /home/src/tslibs/TS/Lib/lib.decorators.d.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/tslibs/TS/Lib/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* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) -Info seq [hh:mm:ss:mss] Files (4) - /home/src/tslibs/TS/Lib/lib.d.ts Text-1 lib.d.ts-Text - /home/src/tslibs/TS/Lib/lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text - /home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text - /tests/cases/fourslash/server/quickinfoVerbosityServer.ts SVC-1-0 "type FooType = string | number\nconst foo: FooType = 1" - - - ../../../../home/src/tslibs/TS/Lib/lib.d.ts - Default library for target 'es5' - ../../../../home/src/tslibs/TS/Lib/lib.decorators.d.ts - Library referenced via 'decorators' from file '../../../../home/src/tslibs/TS/Lib/lib.d.ts' - ../../../../home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts - Library referenced via 'decorators.legacy' from file '../../../../home/src/tslibs/TS/Lib/lib.d.ts' - quickinfoVerbosityServer.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/quickinfoVerbosityServer.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "open", - "request_seq": 0, - "success": true, - "performanceData": { - "updateGraphDurationMs": * - } - } -After Request -watchedFiles:: -/home/src/tslibs/TS/Lib/lib.d.ts: *new* - {"pollingInterval":500} -/home/src/tslibs/TS/Lib/lib.decorators.d.ts: *new* - {"pollingInterval":500} -/home/src/tslibs/TS/Lib/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* - {} - -Projects:: -/dev/null/inferredProject1* (Inferred) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - autoImportProviderHost: false - -ScriptInfos:: -/home/src/tslibs/TS/Lib/lib.d.ts *new* - version: Text-1 - containingProjects: 1 - /dev/null/inferredProject1* -/home/src/tslibs/TS/Lib/lib.decorators.d.ts *new* - version: Text-1 - containingProjects: 1 - /dev/null/inferredProject1* -/home/src/tslibs/TS/Lib/lib.decorators.legacy.d.ts *new* - version: Text-1 - containingProjects: 1 - /dev/null/inferredProject1* -/tests/cases/fourslash/server/quickinfoVerbosityServer.ts (Open) *new* - version: SVC-1-0 - containingProjects: 1 - /dev/null/inferredProject1* *default* - -Info seq [hh:mm:ss:mss] request: - { - "seq": 1, - "type": "request", - "arguments": { - "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts", - "line": 2, - "offset": 10, - "verbosityLevel": 0 - }, - "command": "quickinfo" - } -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "quickinfo", - "request_seq": 1, - "success": true, - "body": { - "kind": "const", - "kindModifiers": "", - "start": { - "line": 2, - "offset": 7 - }, - "end": { - "line": 2, - "offset": 10 - }, - "displayString": "const foo: FooType", - "documentation": "", - "tags": [], - "canIncreaseVerbosityLevel": true - } - } -Info seq [hh:mm:ss:mss] request: - { - "seq": 2, - "type": "request", - "arguments": { - "file": "/tests/cases/fourslash/server/quickinfoVerbosityServer.ts", - "line": 2, - "offset": 10, - "verbosityLevel": 1 - }, - "command": "quickinfo" - } -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "quickinfo", - "request_seq": 2, - "success": true, - "body": { - "kind": "const", - "kindModifiers": "", - "start": { - "line": 2, - "offset": 7 - }, - "end": { - "line": 2, - "offset": 10 - }, - "displayString": "const foo: string | number", - "documentation": "", - "tags": [], - "canIncreaseVerbosityLevel": false - } - } \ No newline at end of file diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 3b07ac5a4981b..8be19c1cdf649 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -361,7 +361,7 @@ declare namespace FourSlashInterface { baselineSyntacticAndSemanticDiagnostics(): void; getEmitOutput(expectedOutputFiles: ReadonlyArray): void; baselineCompletions(preferences?: UserPreferences): void; - baselineQuickInfo(verbosityLevels?: VerbosityLevels): void; + baselineQuickInfo(): void; baselineSmartSelection(): void; baselineSignatureHelp(): void; nameOrDottedNameSpanTextIs(text: string): void; @@ -701,9 +701,6 @@ declare namespace FourSlashInterface { readonly organizeImportsCaseFirst?: "upper" | "lower" | false; readonly organizeImportsTypeOrder?: "first" | "last" | "inline"; } - interface VerbosityLevels { - [markerName: string]: number | number[] | undefined; - } interface InlayHintsOptions extends UserPreferences { readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; diff --git a/tests/cases/fourslash/quickinfoVerbosity1.ts b/tests/cases/fourslash/quickinfoVerbosity1.ts deleted file mode 100644 index 6d95aa6dbd8a9..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosity1.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// - -//// type FooType = string | number; -//// const foo/*a*/: FooType = 1; - -//// type BarType = FooType | boolean; -//// const bar/*b*/: BarType = 1; - - -verify.baselineQuickInfo({ "a": [0, 1], "b": [0, 1, 2] }); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosity2.ts b/tests/cases/fourslash/quickinfoVerbosity2.ts deleted file mode 100644 index 7f61912b97e5d..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosity2.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// - -//// type Str = string | {}; -//// type FooType = Str | number; -//// type Sym = symbol | (() => void); -//// type BarType = Sym | boolean; -//// type BothType = FooType | BarType; -//// const both/*b*/: BothType = 1; - - -verify.baselineQuickInfo({ "b": [0, 1, 2, 3], }); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosityClass1.ts b/tests/cases/fourslash/quickinfoVerbosityClass1.ts deleted file mode 100644 index fd63a56939dec..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosityClass1.ts +++ /dev/null @@ -1,71 +0,0 @@ -/// - - -// simple case -//// { -//// class Foo { -//// a!: "a" | "c"; -//// } -//// const f/*f1*/ = new Foo(); -//// } -// constructor -//// { -//// type FooParam = "a" | "b"; -//// class Foo { -//// constructor(public x: string) { -//// this.x = "a"; -//// } -//// foo(p: FooParam): void {} -//// } -//// const f/*f2*/ = new Foo(""); -//// } -// inheritance -//// { -//// class Bar { -//// a!: string; -//// bar(): void {} -//// baz(param: string): void {} -//// } -//// class Foo extends Bar { -//// b!: boolean; -//// override baz(param: string | number): void {} -//// } -//// const f/*f3*/ = new Foo(); -//// } -// type parameters -//// { -//// class Bar { -//// bar(param: B): void {} -//// baz(): this { return this; } -//// } -//// class Foo extends Bar<"foo"> { -//// foo(): this { return this; } -//// } -//// const b/*b1*/ = new Bar(); -//// const f/*f4*/ = new Foo(); -//// } -// class expression -//// { -//// class Bar { -//// bar(param: B): void {} -//// baz(): this { return this; } -//// } -//// const noname/*n1*/ = new (class extends Bar<"foo"> { -//// foo(): this { return this; } -//// })(); -//// const klass = class extends Bar<"foo"> { -//// foo(): this { return this; } -//// }; -//// const k/*k1*/ = new klass(); -//// } - - -verify.baselineQuickInfo({ - f1: [0, 1], - f2: [0, 1, 2], - f3: [0, 1], - b1: [0, 1, 2], - f4: [0, 1], - n1: [0, 1], - k1: [0, 1], -}); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosityInterface1.ts b/tests/cases/fourslash/quickinfoVerbosityInterface1.ts deleted file mode 100644 index c0898b6fc25c6..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosityInterface1.ts +++ /dev/null @@ -1,79 +0,0 @@ -/// - -// simple case -//// { -//// interface Foo { -//// a: "a" | "c"; -//// } -//// const f/*f1*/: Foo = { a: "a" }; -//// } -// extends -//// { -//// interface Bar { -//// b: "b" | "d"; -//// } -//// interface Foo extends Bar { -//// a: "a" | "c"; -//// } -//// const f/*f2*/: Foo = { a: "a", b: "b" }; -//// } -// methods -//// { -//// type BarParam = "b" | "d"; -//// interface Bar { -//// bar(b: BarParam): string; -//// } -//// type FooType = "a" | "c"; -//// interface FooParam { -//// param: FooType; -//// } -//// interface Foo extends Bar { -//// a: FooType; -//// foo: (a: FooParam) => number; -//// } -//// const f/*f3*/: Foo = { a: "a", bar: () => "b", foo: () => 1 }; -//// } -// type parameters -//// { -//// interface Bar { -//// bar(b: B): string; -//// } -//// interface FooParam { -//// param: "a" | "c"; -//// } -//// interface Foo extends Bar { -//// a: "a" | "c"; -//// foo: (a: FooParam) => number; -//// } -//// const f/*f4*/: Foo = { a: "a", bar: () => "b", foo: () => 1 }; -//// const b/*b1*/: Bar = { bar: () => "" }; -//// } -// alias + interface -//// { -//// interface Foo { -//// a: A; -//// } -//// type Alias = Foo; -//// const a/*a*/: Alias = { a: "a" }; -//// } -// decl merging -//// { -//// interface Foo { -//// a: "a"; -//// } -//// interface Foo { -//// b: "b"; -//// } -//// const f/*f5*/: Foo = { a: "a", b: "b" }; -//// } - - -verify.baselineQuickInfo({ - f1: [0, 1], - f2: [0, 1], - f3: [0, 1, 2, 3], - f4: [0, 1, 2], - b1: [0, 1], - a: [0, 1, 2], - f5: [0, 1], -}); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts b/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts deleted file mode 100644 index 521e624880750..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosityIntersection1.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// - - - -//// { -//// type Foo = { a: "a" | "c" }; -//// type Bar = { a: "a" | "b" }; -//// const obj/*o1*/: Foo & Bar = { a: "a" }; -//// } -//// { -//// type Foo = { a: "c" }; -//// type Bar = { a: "b" }; -//// const obj/*o2*/: Foo & Bar = { a: "" }; -//// } -//// { -//// type Foo = { a: "c" }; -//// type Bar = { a: "b" }; -//// type Never = Foo & Bar; -//// const obj/*o3*/: Never = { a: "" }; -//// } - -verify.baselineQuickInfo({ "o1": [0, 1], "o2": 0, "o3": 0 }); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts b/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts deleted file mode 100644 index d255f61622014..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosityObjectType1.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// - - -//// type Str = string | {}; -//// type FooType = Str | number; -//// type Sym = symbol | (() => void); -//// type BarType = Sym | boolean; -//// type Obj = { foo: FooType, bar: BarType, str: Str }; -//// const obj1/*o1*/: Obj = { foo: 1, bar: true, str: "3"}; -//// const obj2/*o2*/: { foo: FooType, bar: BarType, str: Str } = { foo: 1, bar: true, str: "3"}; - - -verify.baselineQuickInfo({ "o1": [0, 1, 2, 3], "o2": [0, 1, 2] }); \ No newline at end of file diff --git a/tests/cases/fourslash/quickinfoVerbosityTruncation.ts b/tests/cases/fourslash/quickinfoVerbosityTruncation.ts deleted file mode 100644 index b321761950d92..0000000000000 --- a/tests/cases/fourslash/quickinfoVerbosityTruncation.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// - -//// type Str = string | {}; -//// type FooType = Str | number; -//// type Sym = symbol | (() => void); -//// type BarType = Sym | boolean; - -//// interface LotsOfProps { -//// someLongPropertyName1: Str; -//// someLongPropertyName2: FooType; -//// someLongPropertyName3: Sym; -//// someLongPropertyName4: BarType; -//// someLongPropertyName5: Str; -//// someLongPropertyName6: FooType; -//// someLongPropertyName7: Sym; -//// someLongPropertyName8: BarType; -//// someLongMethodName1(a: FooType, b: BarType): Sym; -//// someLongPropertyName9: Str; -//// someLongPropertyName10: FooType; -//// someLongPropertyName11: Sym; -//// someLongPropertyName12: BarType; -//// someLongPropertyName13: Str; -//// someLongPropertyName14: FooType; -//// someLongPropertyName15: Sym; -//// someLongPropertyName16: BarType; -//// someLongMethodName2(a: FooType, b: BarType): Sym; -//// } -//// const obj1/*o1*/: LotsOfProps = undefined as any as LotsOfProps; - - -verify.baselineQuickInfo({ "o1": [1], }); \ No newline at end of file diff --git a/tests/cases/fourslash/server/quickinfoVerbosityServer.ts b/tests/cases/fourslash/server/quickinfoVerbosityServer.ts deleted file mode 100644 index 9fc9eeb7082e1..0000000000000 --- a/tests/cases/fourslash/server/quickinfoVerbosityServer.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// - -//// type FooType = string | number -//// const foo/*a*/: FooType = 1 - -verify.baselineQuickInfo({ "a": [0, 1] }); \ No newline at end of file