Missed a file
This commit is contained in:
parent
fa239326f0
commit
96f8d6273e
1 changed files with 45 additions and 0 deletions
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;
|
Loading…
Reference in a new issue