Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export const generate = task({
description: "Runs go generate on the project.",
run: async () => {
assertTypeScriptCloned();
await $`go generate ./...`;
await $`go generate -v ./...`;
},
});

Expand Down
21 changes: 13 additions & 8 deletions internal/fourslash/_scripts/convertFourslash.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ function stringToTristate(s: string): string {
}

function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefined {
const inlayHintPreferences: string[] = [];
const preferences: string[] = [];
for (const prop of arg.properties) {
if (ts.isPropertyAssignment(prop)) {
Expand Down Expand Up @@ -1438,28 +1439,28 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
paramHint = "lsutil.IncludeInlayParameterNameHintsAll";
break;
}
preferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
inlayHintPreferences.push(`IncludeInlayParameterNameHints: ${paramHint}`);
break;
case "includeInlayParameterNameHintsWhenArgumentMatchesName":
preferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayParameterNameHintsWhenArgumentMatchesName: ${prop.initializer.getText()}`);
break;
case "includeInlayFunctionParameterTypeHints":
preferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayFunctionParameterTypeHints: ${prop.initializer.getText()}`);
break;
case "includeInlayVariableTypeHints":
preferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayVariableTypeHints: ${prop.initializer.getText()}`);
break;
case "includeInlayVariableTypeHintsWhenTypeMatchesName":
preferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayVariableTypeHintsWhenTypeMatchesName: ${prop.initializer.getText()}`);
break;
case "includeInlayPropertyDeclarationTypeHints":
preferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayPropertyDeclarationTypeHints: ${prop.initializer.getText()}`);
break;
case "includeInlayFunctionLikeReturnTypeHints":
preferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayFunctionLikeReturnTypeHints: ${prop.initializer.getText()}`);
break;
case "includeInlayEnumMemberValueHints":
preferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
inlayHintPreferences.push(`IncludeInlayEnumMemberValueHints: ${prop.initializer.getText()}`);
break;
case "interactiveInlayHints":
// Ignore, deprecated
Expand All @@ -1470,6 +1471,10 @@ function parseUserPreferences(arg: ts.ObjectLiteralExpression): string | undefin
return undefined;
}
}

if (inlayHintPreferences.length > 0) {
preferences.push(`InlayHints: lsutil.InlayHintsPreferences{${inlayHintPreferences.join(",")}}`);
}
if (preferences.length === 0) {
return "nil /*preferences*/";
}
Expand Down
14 changes: 8 additions & 6 deletions internal/fourslash/tests/codeLensFunctionExpressions01_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ const namedFn4 = function namedFn4() {};
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
CodeLens: lsutil.CodeLensUserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
},
})
}
14 changes: 8 additions & 6 deletions internal/fourslash/tests/codeLensFunctionsAndConstants01_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ console.log(bar);
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
CodeLens: lsutil.CodeLensUserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
},
})
}
14 changes: 8 additions & 6 deletions internal/fourslash/tests/codeLensInterface01_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ const p: Pointable = {
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
CodeLens: lsutil.CodeLensUserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
},
})
}
14 changes: 8 additions & 6 deletions internal/fourslash/tests/codeLensOverloads01_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ foo(Math.random() ? 1 : "hello");
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
CodeLens: lsutil.CodeLensUserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: true,

ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: true,
ImplementationsCodeLensShowOnAllClassMethods: true,
},
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export abstract class ABC {
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnAllClassMethods: value,
CodeLens: lsutil.CodeLensUserPreferences{
ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnAllClassMethods: value,
},
})
})
}
Expand Down
6 changes: 4 additions & 2 deletions internal/fourslash/tests/codeLensShowOnAllFunctions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ const f5 = function() {};
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: value,
CodeLens: lsutil.CodeLensUserPreferences{
ReferencesCodeLensEnabled: true,
ReferencesCodeLensShowOnAllFunctions: value,
},
})
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class AbstractC implements J {
`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineCodeLens(t, &lsutil.UserPreferences{
ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: value,
CodeLens: lsutil.CodeLensUserPreferences{
ImplementationsCodeLensEnabled: true,
ImplementationsCodeLensShowOnInterfaceMethods: value,
},
})
})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/fourslash/tests/gen/inlayHintsCrash1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ function doThing(f) {
f(100)
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ func TestInlayHintsEnumMemberValue(t *testing.T) {
C = 'C',
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayEnumMemberValueHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayEnumMemberValueHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ type F2 = (a: {
}) => void
const foo5: F2 = (a) => { }`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ function f10(a = ((((new C()))))) {}
function f11(a = { a: 1, b: 1 }) {}
function f12(a = ((({ a: 1, b: 1 })))) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class Foo {
set foo(value) { this.#value = value; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ class Foo {
set foo(value) { this.#value = value; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ declare function test(

test((state) => {});`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
2 changes: 1 addition & 1 deletion internal/fourslash/tests/gen/inlayHintsImportType1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports.a = 1
const a = require('./a');`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/b.js")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true}})
}
2 changes: 1 addition & 1 deletion internal/fourslash/tests/gen/inlayHintsImportType2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ const c = foo()
const d = bar()`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/b.js")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ function test(x: unknown) {
return typeof x === 'number';
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionLikeReturnTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionLikeReturnTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ foo(foo);
foo((1));
foo(foo(1));`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ foo(foo);
foo((1));
foo(foo(1));`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ foo4(p => {})
}) => void
const foo5: F4 = (a) => { }`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ function f10(a = ((((new C()))))) {}
function f11(a = { a: 1, b: 1 }) {}
function f12(a = ((({ a: 1, b: 1 })))) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ class Foo {
set foo(value) { this.#value = value; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ class Foo {
set foo(value) { this.#value = value; }
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ func TestInlayHintsInteractiveFunctionParameterTypes5(t *testing.T) {
const content = `const foo: 1n = 1n;
export function fn(b = foo) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionParameterTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionParameterTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports.a = 1
const a = require('./a');`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/b.js")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ const c = foo()
const d = bar()`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/b.js")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ function test(x: unknown) {
return typeof x === 'number';
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayFunctionLikeReturnTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayFunctionLikeReturnTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ y.foo(1, 2)
var z = ""`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/a.js")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ async function main () {
}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "/b.ts")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayVariableTypeHints: true, IncludeInlayFunctionLikeReturnTypeHints: true}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export function helperB(bParam: string) {
export function helperC(cParam: string) {}`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.GoToFile(t, "./aaa.mts")
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsAll}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class Class {
new Class(1)
new Class(1, 2)`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ foo(
3
)`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ function trace(message: string) {}
trace(` + "`" + `${1}` + "`" + `);
trace(` + "`" + `` + "`" + `);`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals})
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}
Loading
Loading