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

73 lines
1.8 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual quickinfoVerbosityClass1"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestQuickinfoVerbosityClass1(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `{
class Foo {
a!: "a" | "c";
}
const f/*f1*/ = new Foo();
}
{
type FooParam = "a" | "b";
class Foo {
constructor(public x: string) {
this.x = "a";
}
foo(p: FooParam): void {}
}
const f/*f2*/ = new Foo("");
}
{
class Bar/*B*/ {
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();
}
{
class Bar<B extends string> {
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 Bar<B extends string> {
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();
}`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineHoverWithVerbosity(t, map[string][]int{"f1": {0, 1}, "f2": {0, 1, 2}, "f3": {0, 1}, "b1": {0, 1}, "f4": {0, 1}, "n1": {0, 1}, "k1": {0, 1}, "B": {0, 1}})
}