Files
kjol/tools/tsgo/internal/fourslash/tests/gen/inlayHintsParameterNames_test.go
2026-07-09 16:50:43 -04:00

74 lines
1.7 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual inlayHintsParameterNames"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/ls/lsutil"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestInlayHintsParameterNames(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = ` function foo1 (a: number, b: number) {}
foo1(1, 2);
function foo2 (a: number, { c }: any) {}
foo2(1, { c: 1 });
function foo3(a: any, b: number) {}
foo3({}, 1);
const foo3 = (a = 1) => class { }
const C1 = class extends foo3(1) { }
class C2 extends foo3(1) { }
function foo4(a: number, b: number, c: number, d: number) {}
foo4(1, +1, -1, +"1");
function foo5(
a: string,
b: undefined,
c: null,
d: boolean,
e: boolean,
f: number,
g: number,
h: number,
i: RegExp,
j: bigint,
) {
}
foo5(
"hello",
undefined,
null,
true,
false,
Infinity,
-Infinity,
NaN,
/hello/g,
123n,
);
declare const unknownCall: any;
unknownCall();
function trace(message: string) {}
trace(` + "`" + `${1}` + "`" + `);
trace(` + "`" + `` + "`" + `);
function func(
param1: number,
param2: string,
param3: boolean,
) {}
const param1 = 1;
func(
param1,
'foo',
true,
)`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineInlayHints(t, nil /*span*/, &lsutil.UserPreferences{InlayHints: lsutil.InlayHintsPreferences{IncludeInlayParameterNameHints: lsutil.IncludeInlayParameterNameHintsLiterals}})
}