TypeScript/tests/cases/compiler/elaboratedErrors.ts

26 lines
490 B
TypeScript

interface FileSystem {
read: number;
}
function fn(s: WorkerFS): void;
function fn(s: FileSystem): void;
function fn(s: FileSystem|WorkerFS) { }
// This should issue a large error, not a small one
class WorkerFS implements FileSystem {
read: string;
}
interface Alpha { x: string; }
interface Beta { y: number; }
var x: Alpha;
var y: Beta;
// Only one of these errors should be large
x = y;
x = y;
// Only one of these errors should be large
y = x;
y = x;