2020-02-11 02:13:35 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @Filename: types1.ts
|
|
|
|
////type A = {};
|
|
|
|
////export default A;
|
|
|
|
|
|
|
|
// @Filename: types2.ts
|
|
|
|
////export type B = {};
|
|
|
|
////export type C = {};
|
|
|
|
////export type D<T> = {};
|
|
|
|
|
|
|
|
// @Filename: interface.ts
|
|
|
|
////import A from './types1';
|
|
|
|
////import { B, C, D } from './types2';
|
|
|
|
////
|
|
|
|
////export interface Base {
|
2020-07-07 22:11:23 +02:00
|
|
|
//// a: Readonly<A> & { kind: "a"; };
|
2020-02-11 02:13:35 +01:00
|
|
|
//// b<T extends B = B>(p1: C): D<C>;
|
|
|
|
////}
|
|
|
|
|
|
|
|
// @Filename: index.ts
|
|
|
|
////import { Base } from './interface';
|
|
|
|
////
|
|
|
|
////export class C implements Base {[| |]}
|
|
|
|
|
|
|
|
goTo.file('index.ts');
|
|
|
|
verify.codeFix({
|
|
|
|
description: "Implement interface 'Base'",
|
|
|
|
newFileContent:
|
|
|
|
`import { Base } from './interface';
|
|
|
|
import A from './types1';
|
|
|
|
import { B, C, D } from './types2';
|
|
|
|
|
|
|
|
export class C implements Base {
|
2020-07-07 23:30:58 +02:00
|
|
|
a: Readonly<A> & { kind: 'a'; };
|
2020-02-11 02:13:35 +01:00
|
|
|
b<T extends B = B>(p1: C): D<C> {
|
2020-07-07 02:00:35 +02:00
|
|
|
throw new Error('Method not implemented.');
|
2020-02-11 02:13:35 +01:00
|
|
|
}
|
|
|
|
}`,
|
|
|
|
});
|