1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
/// <reference path='fourslash.ts' />
////type Either<T> = { val: T } | Error;
////interface I {
//// x: Either<Either<string>>;
//// foo(x: Either<Either<string>>): void;
////}
////class C implements I {}
verify.codeFix({
description: "Implement interface 'I'",
newFileContent:
`type Either<T> = { val: T } | Error;
interface I {
x: Either<Either<string>>;
foo(x: Either<Either<string>>): void;
}
class C implements I {
x: Either<Either<string>>;
foo(x: Either<Either<string>>): void {
throw new Error("Method not implemented.");
}
}`,
});
|