58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual quickinfoVerbosityClass2"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestQuickinfoVerbosityClass2(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `interface Apple {
|
|
color: string;
|
|
}
|
|
class Foo/*1*/<T> {
|
|
constructor(public x: T) { }
|
|
public y!: T;
|
|
static whatever(): void { }
|
|
private foo(): Apple { return { color: "green" }; }
|
|
static {
|
|
const a = class { x?: Apple; };
|
|
}
|
|
protected z = true;
|
|
}
|
|
type Whatever/*2*/ = Foo<string>;
|
|
const a/*3*/ = Foo;
|
|
const c/*4*/ = Foo<string>;
|
|
[1].forEach(class/*5*/ <T> {
|
|
constructor(public x: T) { }
|
|
public y!: T;
|
|
static whatever(): void { }
|
|
private foo(): Apple { return { color: "green" }; }
|
|
static {
|
|
const a = class { x?: Apple; };
|
|
}
|
|
protected z = true;
|
|
});
|
|
const b/*6*/ = Bar<number>;
|
|
@random()
|
|
abstract class Animal/*7*/ {
|
|
name!: string;
|
|
abstract makeSound(): void;
|
|
}
|
|
class Dog/*8*/ {
|
|
what(this: this, that: Dog) { }
|
|
#bones: string[];
|
|
}
|
|
const d/*9*/ = new Dog();`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyBaselineHoverWithVerbosity(t, map[string][]int{"1": {0, 1, 2}, "2": {0, 1, 2}, "3": {0, 1}, "4": {0}, "5": {0, 1, 2}, "6": {0}, "7": {0, 1}, "8": {0, 1}, "9": {0, 1}})
|
|
}
|