mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Interactable parameter inlay hints (#54734)
This commit is contained in:
1 parent
b211fe9792
commit
97310107d0
60 files changed
+1330
-171
No files matched your search
+20
-11
@@ -1540,7 +1540,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return node ? getTypeFromTypeNode(node) : errorType;
|
||||
},
|
||||
getParameterType: getTypeAtPosition,
|
||||
getParameterIdentifierNameAtPosition,
|
||||
getParameterIdentifierInfoAtPosition,
|
||||
getPromisedTypeOfPromise,
|
||||
getAwaitedType: type => getAwaitedType(type),
|
||||
getReturnTypeOfSignature,
|
||||
@@ -34835,18 +34835,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return restParameter.escapedName;
|
||||
}
|
||||
|
||||
function getParameterIdentifierNameAtPosition(signature: Signature, pos: number): [parameterName: __String, isRestParameter: boolean] | undefined {
|
||||
function getParameterIdentifierInfoAtPosition(signature: Signature, pos: number): { parameter: Identifier, parameterName: __String, isRestParameter: boolean } | undefined {
|
||||
if (signature.declaration?.kind === SyntaxKind.JSDocFunctionType) {
|
||||
return undefined;
|
||||
}
|
||||
const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
|
||||
if (pos < paramCount) {
|
||||
const param = signature.parameters[pos];
|
||||
return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : undefined;
|
||||
const paramIdent = getParameterDeclarationIdentifier(param);
|
||||
return paramIdent ? {
|
||||
parameter: paramIdent,
|
||||
parameterName: param.escapedName,
|
||||
isRestParameter: false
|
||||
} : undefined;
|
||||
}
|
||||
|
||||
const restParameter = signature.parameters[paramCount] || unknownSymbol;
|
||||
if (!isParameterDeclarationWithIdentifierName(restParameter)) {
|
||||
const restIdent = getParameterDeclarationIdentifier(restParameter);
|
||||
if (!restIdent) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -34856,20 +34862,23 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const index = pos - paramCount;
|
||||
const associatedName = associatedNames?.[index];
|
||||
const isRestTupleElement = !!associatedName?.dotDotDotToken;
|
||||
return associatedName ? [
|
||||
getTupleElementLabel(associatedName),
|
||||
isRestTupleElement
|
||||
] : undefined;
|
||||
|
||||
if (associatedName) {
|
||||
Debug.assert(isIdentifier(associatedName.name));
|
||||
return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement };
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (pos === paramCount) {
|
||||
return [restParameter.escapedName, true];
|
||||
return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true };
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function isParameterDeclarationWithIdentifierName(symbol: Symbol) {
|
||||
return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name);
|
||||
function getParameterDeclarationIdentifier(symbol: Symbol) {
|
||||
return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name;
|
||||
}
|
||||
function isValidDeclarationForTupleLabel(d: Declaration): d is NamedTupleMember | (ParameterDeclaration & { name: Identifier }) {
|
||||
return d.kind === SyntaxKind.NamedTupleMember || (isParameter(d) && d.name && isIdentifier(d.name));
|
||||
|
||||
@@ -4992,7 +4992,7 @@ export interface TypeChecker {
|
||||
* @internal
|
||||
*/
|
||||
getParameterType(signature: Signature, parameterIndex: number): Type;
|
||||
/** @internal */ getParameterIdentifierNameAtPosition(signature: Signature, parameterIndex: number): [parameterName: __String, isRestParameter: boolean] | undefined;
|
||||
/** @internal */ getParameterIdentifierInfoAtPosition(signature: Signature, parameterIndex: number): { parameter: Identifier, parameterName: __String, isRestParameter: boolean } | undefined;
|
||||
getNullableType(type: Type, flags: TypeFlags): Type;
|
||||
getNonNullableType(type: Type): Type;
|
||||
/** @internal */ getNonOptionalType(type: Type): Type;
|
||||
@@ -9986,6 +9986,7 @@ export interface UserPreferences {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
readonly allowRenameOfImportPath?: boolean;
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
readonly organizeImportsIgnoreCase?: "auto" | boolean;
|
||||
|
||||
+18
-5
@@ -759,11 +759,24 @@ export class SessionClient implements LanguageService {
|
||||
const request = this.processRequest<protocol.InlayHintsRequest>(protocol.CommandTypes.ProvideInlayHints, args);
|
||||
const response = this.processResponse<protocol.InlayHintsResponse>(request);
|
||||
|
||||
return response.body!.map(item => ({ // TODO: GH#18217
|
||||
...item,
|
||||
kind: item.kind as InlayHintKind,
|
||||
position: this.lineOffsetToPosition(file, item.position),
|
||||
}));
|
||||
return response.body!.map(item => {
|
||||
const { text, position } = item;
|
||||
const hint = typeof text === "string" ? text : text.map(({ text, span }) => ({
|
||||
text,
|
||||
span: span && {
|
||||
start: this.lineOffsetToPosition(span.file, span.start),
|
||||
length: this.lineOffsetToPosition(span.file, span.end) - this.lineOffsetToPosition(span.file, span.start),
|
||||
},
|
||||
file: span && span.file
|
||||
}));
|
||||
|
||||
return ({
|
||||
...item,
|
||||
position: this.lineOffsetToPosition(file, position),
|
||||
text: hint,
|
||||
kind: item.kind as InlayHintKind
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private createFileLocationOrRangeRequestArgs(positionOrRange: number | TextRange, fileName: string): protocol.FileLocationOrRangeRequestArgs {
|
||||
|
||||
@@ -2675,13 +2675,18 @@ export interface InlayHintsRequest extends Request {
|
||||
}
|
||||
|
||||
export interface InlayHintItem {
|
||||
text: string;
|
||||
text: string | InlayHintItemDisplayPart[];
|
||||
position: Location;
|
||||
kind: InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
whitespaceAfter?: boolean;
|
||||
}
|
||||
|
||||
export interface InlayHintItemDisplayPart {
|
||||
text: string;
|
||||
span?: FileSpan;
|
||||
}
|
||||
|
||||
export interface InlayHintsResponse extends Response {
|
||||
body?: InlayHintItem[];
|
||||
}
|
||||
@@ -3536,6 +3541,8 @@ export interface UserPreferences {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
|
||||
/**
|
||||
|
||||
+17
-4
@@ -1844,10 +1844,23 @@ export class Session<TMessage = string> implements EventSender {
|
||||
const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file)!;
|
||||
const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file));
|
||||
|
||||
return hints.map(hint => ({
|
||||
...hint,
|
||||
position: scriptInfo.positionToLineOffset(hint.position),
|
||||
}));
|
||||
return hints.map(hint => {
|
||||
const { text, position } = hint;
|
||||
const hintText = typeof text === "string" ? text : text.map(({ text, span, file }) => ({
|
||||
text,
|
||||
span: span && {
|
||||
start: scriptInfo.positionToLineOffset(span.start),
|
||||
end: scriptInfo.positionToLineOffset(span.start + span.length),
|
||||
file: file!
|
||||
}
|
||||
}));
|
||||
|
||||
return {
|
||||
...hint,
|
||||
position: scriptInfo.positionToLineOffset(position),
|
||||
text: hintText
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private setCompilerOptionsForInferredProjects(args: protocol.SetCompilerOptionsForInferredProjectsArgs): void {
|
||||
|
||||
+33
-16
@@ -3,6 +3,7 @@ import {
|
||||
ArrowFunction,
|
||||
CallExpression,
|
||||
createPrinterWithRemoveComments,
|
||||
createTextSpanFromNode,
|
||||
Debug,
|
||||
ElementFlags,
|
||||
EmitHint,
|
||||
@@ -23,6 +24,7 @@ import {
|
||||
hasContextSensitiveParameters,
|
||||
Identifier,
|
||||
InlayHint,
|
||||
InlayHintDisplayPart,
|
||||
InlayHintKind,
|
||||
InlayHintsContext,
|
||||
isArrowFunction,
|
||||
@@ -60,6 +62,7 @@ import {
|
||||
Signature,
|
||||
skipParentheses,
|
||||
some,
|
||||
SourceFile,
|
||||
Symbol,
|
||||
SymbolFlags,
|
||||
SyntaxKind,
|
||||
@@ -73,7 +76,7 @@ import {
|
||||
VariableDeclaration,
|
||||
} from "./_namespaces/ts";
|
||||
|
||||
const maxHintsLength = 30;
|
||||
const maxTypeHintLength = 30;
|
||||
|
||||
const leadingParameterNameCommentRegexFactory = (name: string) => {
|
||||
return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`);
|
||||
@@ -87,6 +90,10 @@ function shouldShowLiteralParameterNameHintsOnly(preferences: UserPreferences) {
|
||||
return preferences.includeInlayParameterNameHints === "literals";
|
||||
}
|
||||
|
||||
function shouldUseInteractiveInlayHints(preferences: UserPreferences) {
|
||||
return preferences.interactiveInlayHints === true;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
const { file, program, span, cancellationToken, preferences } = context;
|
||||
@@ -151,9 +158,17 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
|
||||
}
|
||||
|
||||
function addParameterHints(text: string, position: number, isFirstVariadicArgument: boolean) {
|
||||
function addParameterHints(text: string, parameter: Identifier, position: number, isFirstVariadicArgument: boolean, sourceFile: SourceFile | undefined) {
|
||||
let hintText: string | InlayHintDisplayPart[] = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
||||
if (shouldUseInteractiveInlayHints(preferences)) {
|
||||
hintText = [getNodeDisplayPart(hintText, parameter, sourceFile!), { text: ":" }];
|
||||
}
|
||||
else {
|
||||
hintText += ":";
|
||||
}
|
||||
|
||||
result.push({
|
||||
text: `${isFirstVariadicArgument ? "..." : ""}${truncation(text, maxHintsLength)}:`,
|
||||
text: hintText,
|
||||
position,
|
||||
kind: InlayHintKind.Parameter,
|
||||
whitespaceAfter: true,
|
||||
@@ -162,7 +177,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
|
||||
function addTypeHints(text: string, position: number) {
|
||||
result.push({
|
||||
text: `: ${truncation(text, maxHintsLength)}`,
|
||||
text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`,
|
||||
position,
|
||||
kind: InlayHintKind.Type,
|
||||
whitespaceBefore: true,
|
||||
@@ -171,7 +186,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
|
||||
function addEnumMemberValueHints(text: string, position: number) {
|
||||
result.push({
|
||||
text: `= ${truncation(text, maxHintsLength)}`,
|
||||
text: `= ${text}`,
|
||||
position,
|
||||
kind: InlayHintKind.Enum,
|
||||
whitespaceBefore: true,
|
||||
@@ -231,6 +246,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
}
|
||||
|
||||
let signatureParamPos = 0;
|
||||
const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : undefined;
|
||||
for (const originalArg of args) {
|
||||
const arg = skipParentheses(originalArg);
|
||||
if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) {
|
||||
@@ -253,10 +269,10 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
}
|
||||
}
|
||||
|
||||
const identifierNameInfo = checker.getParameterIdentifierNameAtPosition(signature, signatureParamPos);
|
||||
const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos);
|
||||
signatureParamPos = signatureParamPos + (spreadArgs || 1);
|
||||
if (identifierNameInfo) {
|
||||
const [parameterName, isFirstVariadicArgument] = identifierNameInfo;
|
||||
if (identifierInfo) {
|
||||
const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo;
|
||||
const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName);
|
||||
if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) {
|
||||
continue;
|
||||
@@ -267,7 +283,7 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
continue;
|
||||
}
|
||||
|
||||
addParameterHints(name, originalArg.getStart(), isFirstVariadicArgument);
|
||||
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument, sourceFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -394,13 +410,6 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
return printTypeInSingleLine(signatureParamType);
|
||||
}
|
||||
|
||||
function truncation(text: string, maxLength: number) {
|
||||
if (text.length > maxLength) {
|
||||
return text.substr(0, maxLength - "...".length) + "...";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
function printTypeInSingleLine(type: Type) {
|
||||
const flags = NodeBuilderFlags.IgnoreErrors | TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope;
|
||||
const printer = createPrinterWithRemoveComments();
|
||||
@@ -423,4 +432,12 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function getNodeDisplayPart(text: string, node: Node, sourceFile: SourceFile): InlayHintDisplayPart {
|
||||
return {
|
||||
text,
|
||||
span: createTextSpanFromNode(node, sourceFile),
|
||||
file: sourceFile.fileName
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -866,13 +866,19 @@ export const enum InlayHintKind {
|
||||
}
|
||||
|
||||
export interface InlayHint {
|
||||
text: string;
|
||||
text: string | InlayHintDisplayPart[];
|
||||
position: number;
|
||||
kind: InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
whitespaceAfter?: boolean;
|
||||
}
|
||||
|
||||
export interface InlayHintDisplayPart {
|
||||
text: string;
|
||||
span?: TextSpan;
|
||||
file?: string;
|
||||
}
|
||||
|
||||
export interface TodoCommentDescriptor {
|
||||
text: string;
|
||||
priority: number;
|
||||
|
||||
+13
-2
@@ -2124,12 +2124,16 @@ declare namespace ts {
|
||||
arguments: InlayHintsRequestArgs;
|
||||
}
|
||||
interface InlayHintItem {
|
||||
text: string;
|
||||
text: string | InlayHintItemDisplayPart[];
|
||||
position: Location;
|
||||
kind: InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
whitespaceAfter?: boolean;
|
||||
}
|
||||
interface InlayHintItemDisplayPart {
|
||||
text: string;
|
||||
span?: FileSpan;
|
||||
}
|
||||
interface InlayHintsResponse extends Response {
|
||||
body?: InlayHintItem[];
|
||||
}
|
||||
@@ -2832,6 +2836,7 @@ declare namespace ts {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
/**
|
||||
* Indicates whether imports should be organized in a case-insensitive manner.
|
||||
@@ -8400,6 +8405,7 @@ declare namespace ts {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
readonly allowRenameOfImportPath?: boolean;
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
readonly organizeImportsIgnoreCase?: "auto" | boolean;
|
||||
@@ -10382,12 +10388,17 @@ declare namespace ts {
|
||||
Enum = "Enum"
|
||||
}
|
||||
interface InlayHint {
|
||||
text: string;
|
||||
text: string | InlayHintDisplayPart[];
|
||||
position: number;
|
||||
kind: InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
whitespaceAfter?: boolean;
|
||||
}
|
||||
interface InlayHintDisplayPart {
|
||||
text: string;
|
||||
span?: TextSpan;
|
||||
file?: string;
|
||||
}
|
||||
interface TodoCommentDescriptor {
|
||||
text: string;
|
||||
priority: number;
|
||||
|
||||
+7
-1
@@ -4347,6 +4347,7 @@ declare namespace ts {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
readonly allowRenameOfImportPath?: boolean;
|
||||
readonly autoImportFileExcludePatterns?: string[];
|
||||
readonly organizeImportsIgnoreCase?: "auto" | boolean;
|
||||
@@ -6413,12 +6414,17 @@ declare namespace ts {
|
||||
Enum = "Enum"
|
||||
}
|
||||
interface InlayHint {
|
||||
text: string;
|
||||
text: string | InlayHintDisplayPart[];
|
||||
position: number;
|
||||
kind: InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
whitespaceAfter?: boolean;
|
||||
}
|
||||
interface InlayHintDisplayPart {
|
||||
text: string;
|
||||
span?: TextSpan;
|
||||
file?: string;
|
||||
}
|
||||
interface TodoCommentDescriptor {
|
||||
text: string;
|
||||
priority: number;
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork1.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 43,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1, 2);
|
||||
foo(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 25,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork1.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 46,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1)(2);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork11.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 87,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1)(2);
|
||||
foo(1)(2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 38,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork11.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 90,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
return a(1) + 2
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 17,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork12.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 54,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@
|
||||
foo((c: number) => c + 1);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork12.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 67,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(a, 2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 25,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork13.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 66,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, { c: 1});
|
||||
foo(1, { c: 1 });
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork2.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 44,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
foo(1);
|
||||
^
|
||||
{
|
||||
"text": "Im_very_very_very_very_very...:",
|
||||
"position": 73,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
}
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, 1, 1, 1);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork3.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 48,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1, 1, 1, 1);
|
||||
foo(1, 1, 1, 1);
|
||||
^
|
||||
{
|
||||
"text": "...b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "...b",
|
||||
"span": {
|
||||
"start": 28,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork3.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 51,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
function c2 () { foo2(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 55,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 293,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ function c2 () { foo2(1, 2); }
|
||||
function c2 () { foo2(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "d:",
|
||||
"text": [
|
||||
{
|
||||
"text": "d",
|
||||
"span": {
|
||||
"start": 66,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 296,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ function c2 () { foo2(1, 2); }
|
||||
function c3 () { foo3(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "e:",
|
||||
"text": [
|
||||
{
|
||||
"text": "e",
|
||||
"span": {
|
||||
"start": 95,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 324,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ function c3 () { foo3(1, 2); }
|
||||
function c3 () { foo3(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "f:",
|
||||
"text": [
|
||||
{
|
||||
"text": "f",
|
||||
"span": {
|
||||
"start": 106,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 327,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@ function c3 () { foo3(1, 2); }
|
||||
function c4 () { foo4(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "g:",
|
||||
"text": [
|
||||
{
|
||||
"text": "g",
|
||||
"span": {
|
||||
"start": 135,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 355,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +106,19 @@ function c4 () { foo4(1, 2); }
|
||||
function c4 () { foo4(1, 2); }
|
||||
^
|
||||
{
|
||||
"text": "h:",
|
||||
"text": [
|
||||
{
|
||||
"text": "h",
|
||||
"span": {
|
||||
"start": 146,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 358,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo2(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 55,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 257,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo2(1, 2);
|
||||
foo2(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "d:",
|
||||
"text": [
|
||||
{
|
||||
"text": "d",
|
||||
"span": {
|
||||
"start": 66,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 260,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo2(1, 2);
|
||||
foo3(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "e:",
|
||||
"text": [
|
||||
{
|
||||
"text": "e",
|
||||
"span": {
|
||||
"start": 95,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 269,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ foo3(1, 2);
|
||||
foo3(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "f:",
|
||||
"text": [
|
||||
{
|
||||
"text": "f",
|
||||
"span": {
|
||||
"start": 106,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 272,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@ foo3(1, 2);
|
||||
foo4(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "g:",
|
||||
"text": [
|
||||
{
|
||||
"text": "g",
|
||||
"span": {
|
||||
"start": 135,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 281,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +106,19 @@ foo4(1, 2);
|
||||
foo4(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "h:",
|
||||
"text": [
|
||||
{
|
||||
"text": "h",
|
||||
"span": {
|
||||
"start": 146,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 284,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 29,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1);
|
||||
foo('');
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 37,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo('');
|
||||
foo(true);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 46,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ foo(true);
|
||||
foo((1));
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 67,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@ foo((1));
|
||||
foo(foo(1));
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 81,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 29,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1);
|
||||
foo('');
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 37,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo('');
|
||||
foo(true);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 46,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ foo(true);
|
||||
foo(() => 1);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 57,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@ foo(() => 1);
|
||||
foo(function () { return 1 });
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 71,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +106,19 @@ foo(function () { return 1 });
|
||||
foo({});
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 102,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -55,7 +127,19 @@ foo({});
|
||||
foo({ a: 1 });
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 111,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -64,7 +148,19 @@ foo({ a: 1 });
|
||||
foo([]);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 126,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -73,7 +169,19 @@ foo([]);
|
||||
foo([1]);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 135,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -82,7 +190,19 @@ foo([1]);
|
||||
foo(foo);
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 145,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -91,7 +211,19 @@ foo(foo);
|
||||
foo((1));
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 155,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -100,7 +232,19 @@ foo((1));
|
||||
foo(foo(1));
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 165,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -109,7 +253,19 @@ foo(foo(1));
|
||||
foo(foo(1));
|
||||
^
|
||||
{
|
||||
"text": "v:",
|
||||
"text": [
|
||||
{
|
||||
"text": "v",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 169,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(a, 2);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork36.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 63,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(a, 2);
|
||||
foo(a, 2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 25,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork36.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 66,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1)
|
||||
^
|
||||
{
|
||||
"text": "w:",
|
||||
"text": [
|
||||
{
|
||||
"text": "w",
|
||||
"span": {
|
||||
"start": 21,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 166,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1)
|
||||
foo(1, 2)
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 59,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 173,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo(1, 2)
|
||||
foo(1, 2)
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 70,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 176,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, 2, 3)
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 56,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 87,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1, 2, 3)
|
||||
foo(1, 2, 3)
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 90,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo(1, 2, 3)
|
||||
foo(1, 2, 3)
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 24,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 93,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, '', false, 1, 2)
|
||||
^
|
||||
{
|
||||
"text": "f:",
|
||||
"text": [
|
||||
{
|
||||
"text": "f",
|
||||
"span": {
|
||||
"start": 70,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 161,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1, '', false, 1, 2)
|
||||
foo(1, '', false, 1, 2)
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 10,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 164,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo(1, '', false, 1, 2)
|
||||
foo(1, '', false, 1, 2)
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 21,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 168,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ foo(1, '', false, 1, 2)
|
||||
foo(1, '', false, 1, 2)
|
||||
^
|
||||
{
|
||||
"text": "...c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "...c",
|
||||
"span": {
|
||||
"start": 36,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 175,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@ foo(1, '', false, 1, 2)
|
||||
foo1(1, "", "")
|
||||
^
|
||||
{
|
||||
"text": "f1:",
|
||||
"text": [
|
||||
{
|
||||
"text": "f1",
|
||||
"span": {
|
||||
"start": 120,
|
||||
"length": 2
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 186,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +106,19 @@ foo1(1, "", "")
|
||||
foo1(1, "", "")
|
||||
^
|
||||
{
|
||||
"text": "...args:",
|
||||
"text": [
|
||||
{
|
||||
"text": "...args",
|
||||
"span": {
|
||||
"start": 135,
|
||||
"length": 4
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 189,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -10,7 +10,19 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
|
||||
2,
|
||||
^
|
||||
{
|
||||
"text": "bParameter:",
|
||||
"text": [
|
||||
{
|
||||
"text": "bParameter",
|
||||
"span": {
|
||||
"start": 34,
|
||||
"length": 10
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 134,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +31,19 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
|
||||
3
|
||||
^
|
||||
{
|
||||
"text": "cParameter:",
|
||||
"text": [
|
||||
{
|
||||
"text": "cParameter",
|
||||
"span": {
|
||||
"start": 54,
|
||||
"length": 10
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 338,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +52,19 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
|
||||
1,
|
||||
^
|
||||
{
|
||||
"text": "aParameter:",
|
||||
"text": [
|
||||
{
|
||||
"text": "aParameter",
|
||||
"span": {
|
||||
"start": 14,
|
||||
"length": 10
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 373,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +73,19 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
|
||||
2,
|
||||
^
|
||||
{
|
||||
"text": "bParameter:",
|
||||
"text": [
|
||||
{
|
||||
"text": "bParameter",
|
||||
"span": {
|
||||
"start": 34,
|
||||
"length": 10
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 380,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +94,19 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
|
||||
3
|
||||
^
|
||||
{
|
||||
"text": "cParameter:",
|
||||
"text": [
|
||||
{
|
||||
"text": "cParameter",
|
||||
"span": {
|
||||
"start": 54,
|
||||
"length": 10
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 440,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
fn(/* nobody knows exactly what this param is */ 42);
|
||||
^
|
||||
{
|
||||
"text": "x:",
|
||||
"text": [
|
||||
{
|
||||
"text": "x",
|
||||
"span": {
|
||||
"start": 12,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork53.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 76,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, 2, 3)
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 50,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork6.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 81,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
trace(`${1}`);
|
||||
^
|
||||
{
|
||||
"text": "message:",
|
||||
"text": [
|
||||
{
|
||||
"text": "message",
|
||||
"span": {
|
||||
"start": 15,
|
||||
"length": 7
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork62.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 41,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ trace(`${1}`);
|
||||
trace(``);
|
||||
^
|
||||
{
|
||||
"text": "message:",
|
||||
"text": [
|
||||
{
|
||||
"text": "message",
|
||||
"span": {
|
||||
"start": 15,
|
||||
"length": 7
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork62.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 56,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
foo(1, +1, -1, +"1");
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 64,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ foo(1, +1, -1, +"1");
|
||||
foo(1, +1, -1, +"1");
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 24,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 67,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ foo(1, +1, -1, +"1");
|
||||
foo(1, +1, -1, +"1");
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 35,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 71,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ foo(1, +1, -1, +"1");
|
||||
foo(1, +1, -1, +"1");
|
||||
^
|
||||
{
|
||||
"text": "d:",
|
||||
"text": [
|
||||
{
|
||||
"text": "d",
|
||||
"span": {
|
||||
"start": 46,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 75,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
"hello",
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 18,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 183,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@
|
||||
undefined,
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 33,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 196,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@
|
||||
null,
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 51,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 211,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@
|
||||
true,
|
||||
^
|
||||
{
|
||||
"text": "d:",
|
||||
"text": [
|
||||
{
|
||||
"text": "d",
|
||||
"span": {
|
||||
"start": 64,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 221,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -37,7 +85,19 @@
|
||||
false,
|
||||
^
|
||||
{
|
||||
"text": "e:",
|
||||
"text": [
|
||||
{
|
||||
"text": "e",
|
||||
"span": {
|
||||
"start": 80,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 231,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -46,7 +106,19 @@
|
||||
Infinity,
|
||||
^
|
||||
{
|
||||
"text": "f:",
|
||||
"text": [
|
||||
{
|
||||
"text": "f",
|
||||
"span": {
|
||||
"start": 96,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 242,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -55,7 +127,19 @@
|
||||
-Infinity,
|
||||
^
|
||||
{
|
||||
"text": "g:",
|
||||
"text": [
|
||||
{
|
||||
"text": "g",
|
||||
"span": {
|
||||
"start": 111,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 256,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -64,7 +148,19 @@
|
||||
NaN,
|
||||
^
|
||||
{
|
||||
"text": "h:",
|
||||
"text": [
|
||||
{
|
||||
"text": "h",
|
||||
"span": {
|
||||
"start": 126,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 271,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -73,7 +169,19 @@
|
||||
/hello/g,
|
||||
^
|
||||
{
|
||||
"text": "i:",
|
||||
"text": [
|
||||
{
|
||||
"text": "i",
|
||||
"span": {
|
||||
"start": 141,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 280,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -82,7 +190,19 @@
|
||||
123n,
|
||||
^
|
||||
{
|
||||
"text": "j:",
|
||||
"text": [
|
||||
{
|
||||
"text": "j",
|
||||
"span": {
|
||||
"start": 156,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 294,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
const C1 = class extends foo(1) { }
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork68.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 63,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ const C1 = class extends foo(1) { }
|
||||
class C2 extends foo(1) { }
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 13,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork68.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 91,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
call(1);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 22,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 105,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ call(1);
|
||||
call(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 114,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ call(1, 2);
|
||||
call(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 55,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 117,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
new Class(1)
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 30,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 136,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ new Class(1)
|
||||
new Class(1, 2)
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 58,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 149,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ new Class(1, 2)
|
||||
new Class(1, 2)
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 69,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 152,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
call(1);
|
||||
^
|
||||
{
|
||||
"text": "a:",
|
||||
"text": [
|
||||
{
|
||||
"text": "a",
|
||||
"span": {
|
||||
"start": 22,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 131,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -10,7 +22,19 @@ call(1);
|
||||
call(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "b:",
|
||||
"text": [
|
||||
{
|
||||
"text": "b",
|
||||
"span": {
|
||||
"start": 44,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 140,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -19,7 +43,19 @@ call(1, 2);
|
||||
call(1, 2);
|
||||
^
|
||||
{
|
||||
"text": "c:",
|
||||
"text": [
|
||||
{
|
||||
"text": "c",
|
||||
"span": {
|
||||
"start": 55,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 143,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
@@ -28,7 +64,19 @@ call(1, 2);
|
||||
new call(1);
|
||||
^
|
||||
{
|
||||
"text": "d:",
|
||||
"text": [
|
||||
{
|
||||
"text": "d",
|
||||
"span": {
|
||||
"start": 81,
|
||||
"length": 1
|
||||
},
|
||||
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
|
||||
},
|
||||
{
|
||||
"text": ":"
|
||||
}
|
||||
],
|
||||
"position": 156,
|
||||
"kind": "Parameter",
|
||||
"whitespaceAfter": true
|
||||
|
||||
@@ -680,6 +680,7 @@ declare namespace FourSlashInterface {
|
||||
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
||||
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
||||
readonly includeInlayEnumMemberValueHints?: boolean;
|
||||
readonly interactiveInlayHints?: boolean;
|
||||
}
|
||||
interface CompletionsOptions {
|
||||
readonly marker?: ArrayOrSingle<string | Marker>;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
//// function foo (a: number, b: number) {}
|
||||
//// foo(1, 2);
|
||||
|
||||
verify.baselineInlayHints(undefined, { includeInlayParameterNameHints: "literals" });
|
||||
verify.baselineInlayHints(undefined, { includeInlayParameterNameHints: "literals", interactiveInlayHints: true });
|
||||
@@ -8,5 +8,6 @@
|
||||
//// foo(1)(2);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -7,5 +7,6 @@
|
||||
//// foo((c: number) => c + 1);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "all"
|
||||
includeInlayParameterNameHints: "all",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -7,4 +7,5 @@
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName: false,
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -1,8 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// function foo (a: number, { c }: any) {}
|
||||
//// foo(1, { c: 1});
|
||||
//// foo(1, { c: 1 });
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true,
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// function foo (Im_very_very_very_very_very_very_very_long: number) {}
|
||||
//// foo(1);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
});
|
||||
@@ -4,5 +4,6 @@
|
||||
//// foo(1, 1, 1, 1);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true,
|
||||
});
|
||||
@@ -19,5 +19,6 @@ const end = test.markerByName('h');
|
||||
const span = { start: start.position, length: end.position - start.position };
|
||||
|
||||
verify.baselineInlayHints(span, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
})
|
||||
@@ -19,5 +19,6 @@ const end = test.markerByName('h');
|
||||
const span = { start: start.position, length: end.position - start.position };
|
||||
|
||||
verify.baselineInlayHints(span, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -11,5 +11,6 @@
|
||||
//// foo(foo(1));
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -17,5 +17,6 @@
|
||||
//// foo(foo(1));
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "all"
|
||||
includeInlayParameterNameHints: "all",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -7,4 +7,5 @@
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName: true,
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -8,5 +8,6 @@
|
||||
//// foo(1, 2)
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true,
|
||||
});
|
||||
@@ -5,5 +5,6 @@
|
||||
//// foo(1, 2, 3)
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -7,5 +7,6 @@
|
||||
//// foo1(1, "", "")
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -35,5 +35,6 @@
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals",
|
||||
includeInlayFunctionLikeReturnTypeHints: true
|
||||
includeInlayFunctionLikeReturnTypeHints: true,
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -4,5 +4,6 @@
|
||||
//// fn(/* nobody knows exactly what this param is */ 42);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -5,5 +5,6 @@
|
||||
//// foo(1, 2, 3)
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -5,5 +5,6 @@
|
||||
////trace(``);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -4,5 +4,6 @@
|
||||
////foo(1, +1, -1, +"1");
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -28,5 +28,6 @@
|
||||
////);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -6,5 +6,6 @@
|
||||
////class C2 extends foo(1) { }
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -9,5 +9,6 @@
|
||||
//// call(1, 2);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -9,5 +9,6 @@
|
||||
//// new Class(1, 2)
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
@@ -11,5 +11,6 @@
|
||||
//// new call(1);
|
||||
|
||||
verify.baselineInlayHints(undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
includeInlayParameterNameHints: "literals",
|
||||
interactiveInlayHints: true
|
||||
});
|
||||
Reference in new issue
Block a user