Accepted baselines.

This commit is contained in:
Daniel Rosenwasser
2016-02-23 13:10:40 -08:00
parent f579bcf8ae
commit 07412a285a
4 changed files with 96 additions and 0 deletions
@@ -0,0 +1,26 @@
tests/cases/compiler/errorMessagesIntersectionTypes01.ts(14,5): error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'.
Type 'Bar' is not assignable to type 'FooBar'.
Property 'fooProp' is missing in type 'Bar'.
==== tests/cases/compiler/errorMessagesIntersectionTypes01.ts (1 errors) ====
interface Foo {
fooProp: boolean;
}
interface Bar {
barProp: string;
}
interface FooBar extends Foo, Bar {
}
declare function mixBar<T>(obj: T): T & Bar;
let fooBar: FooBar = mixBar({
~~~~~~
!!! error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'.
!!! error TS2322: Type 'Bar' is not assignable to type 'FooBar'.
!!! error TS2322: Property 'fooProp' is missing in type 'Bar'.
fooProp: "frizzlebizzle"
});
@@ -0,0 +1,22 @@
//// [errorMessagesIntersectionTypes01.ts]
interface Foo {
fooProp: boolean;
}
interface Bar {
barProp: string;
}
interface FooBar extends Foo, Bar {
}
declare function mixBar<T>(obj: T): T & Bar;
let fooBar: FooBar = mixBar({
fooProp: "frizzlebizzle"
});
//// [errorMessagesIntersectionTypes01.js]
var fooBar = mixBar({
fooProp: "frizzlebizzle"
});
@@ -0,0 +1,26 @@
tests/cases/compiler/errorMessagesIntersectionTypes02.ts(14,5): error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'.
Type 'Bar' is not assignable to type 'FooBar'.
Property 'fooProp' is missing in type 'Bar'.
==== tests/cases/compiler/errorMessagesIntersectionTypes02.ts (1 errors) ====
interface Foo {
fooProp: "hello" | "world";
}
interface Bar {
barProp: string;
}
interface FooBar extends Foo, Bar {
}
declare function mixBar<T>(obj: T): T & Bar;
let fooBar: FooBar = mixBar({
~~~~~~
!!! error TS2322: Type '{ fooProp: string; } & Bar' is not assignable to type 'FooBar'.
!!! error TS2322: Type 'Bar' is not assignable to type 'FooBar'.
!!! error TS2322: Property 'fooProp' is missing in type 'Bar'.
fooProp: "frizzlebizzle"
});
@@ -0,0 +1,22 @@
//// [errorMessagesIntersectionTypes02.ts]
interface Foo {
fooProp: "hello" | "world";
}
interface Bar {
barProp: string;
}
interface FooBar extends Foo, Bar {
}
declare function mixBar<T>(obj: T): T & Bar;
let fooBar: FooBar = mixBar({
fooProp: "frizzlebizzle"
});
//// [errorMessagesIntersectionTypes02.js]
var fooBar = mixBar({
fooProp: "frizzlebizzle"
});