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

40 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Code generated by convertFourslash; DO NOT EDIT.
// To modify this test, run "npm run makemanual codeFixClassImplementInterfaceInheritsAbstractMethod"
package fourslash_test
import (
"testing"
"github.com/microsoft/typescript-go/internal/fourslash"
"github.com/microsoft/typescript-go/internal/testutil"
)
func TestCodeFixClassImplementInterfaceInheritsAbstractMethod(t *testing.T) {
fourslash.SkipIfFailing(t)
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `abstract class C1 { }
abstract class C2 {
abstract f<T extends number>(): T;
}
interface I1 extends C1, C2 { }
class C3 implements I1 {[| |]}`
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
defer done()
f.VerifyCodeFix(t, fourslash.VerifyCodeFixOptions{
Description: "Implement interface 'I1'",
NewFileContent: `abstract class C1 { }
abstract class C2 {
abstract f<T extends number>(): T;
}
interface I1 extends C1, C2 { }
class C3 implements I1 {
f<T extends number>(): T {
throw new Error("Method not implemented.");
}
}`,
Index: 0,
})
}