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

35 lines
950 B
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual tsxGoToDefinitionClasses"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestTsxGoToDefinitionClasses(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `//@Filename: file.tsx
declare namespace JSX {
interface Element { }
interface IntrinsicElements { }
interface ElementAttributesProperty { props; }
}
class /*ct*/MyClass {
props: {
/*pt*/foo: string;
}
}
var x = <[|My/*c*/Class|] />;
var y = <MyClass [|f/*p*/oo|]= 'hello' />;
var z = <[|MyCl/*w*/ass|] wrong= 'hello' />;`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineGoToDefinition(t, true, "c", "p", "w")
}