vendor tsgo
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual codeFixClassImplementInterfaceGlobal"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestCodeFixClassImplementInterfaceGlobal(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @Filename: /src/globals.d.ts
|
||||
export {}; // Make this a module
|
||||
declare global {
|
||||
interface Disposable {
|
||||
[Symbol.dispose](): void;
|
||||
}
|
||||
}
|
||||
// @Filename: /src/test.ts
|
||||
import { Service } from './lifecycle';
|
||||
export class [|EditingService|] implements Service { }
|
||||
// @Filename: /src/lifecycle.ts
|
||||
export interface Disposable {
|
||||
(): string;
|
||||
}
|
||||
export interface Service {
|
||||
d: Disposable;
|
||||
}`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.GoToFile(t, "/src/test.ts")
|
||||
f.VerifyCodeFix(t, fourslash.VerifyCodeFixOptions{
|
||||
Description: "Implement interface 'Service'",
|
||||
NewFileContent: `import { Disposable, Service } from './lifecycle';
|
||||
export class EditingService implements Service {
|
||||
d: Disposable;
|
||||
}`,
|
||||
Index: 0,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user