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

42 lines
1.1 KiB
Go

// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual referencesForInheritedProperties10"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestReferencesForInheritedProperties10(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `interface IFeedbackHandler {
/*1*/handleAccept?(): void;
handleReject?(): void;
}
abstract class AbstractFeedbackHandler implements IFeedbackHandler {}
class FeedbackHandler extends AbstractFeedbackHandler {
/*2*/handleAccept(): void {
console.log("Feedback accepted");
}
handleReject(): void {
console.log("Feedback rejected");
}
}
function foo(handler: IFeedbackHandler) {
handler./*3*/handleAccept?.();
handler.handleReject?.();
}`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyBaselineFindAllReferences(t, "1", "2", "3")
}