mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 17:05:58 -05:00
Missed a file
This commit is contained in:
45
tests/baselines/reference/elaboratedErrors.js
Normal file
45
tests/baselines/reference/elaboratedErrors.js
Normal file
@@ -0,0 +1,45 @@
|
||||
//// [elaboratedErrors.ts]
|
||||
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;
|
||||
|
||||
|
||||
//// [elaboratedErrors.js]
|
||||
function fn(s) {
|
||||
}
|
||||
// This should issue a large error, not a small one
|
||||
var WorkerFS = (function () {
|
||||
function WorkerFS() {
|
||||
}
|
||||
return WorkerFS;
|
||||
})();
|
||||
var x;
|
||||
var y;
|
||||
// Only one of these errors should be large
|
||||
x = y;
|
||||
x = y;
|
||||
// Only one of these errors should be large
|
||||
y = x;
|
||||
y = x;
|
||||
Reference in New Issue
Block a user