mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Accepted baselines.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts(10,9): error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'Style'.
|
||||
Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'StyleArray'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => { foo: string; jj: number; }[][]' is not assignable to type '() => Style'.
|
||||
Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'.
|
||||
Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => { foo: string; jj: number; }[]' is not assignable to type '() => Style'.
|
||||
Type '{ foo: string; jj: number; }[]' is not assignable to type 'Style'.
|
||||
Type '{ foo: string; jj: number; }[]' is not assignable to type 'StyleArray'.
|
||||
Types of property 'pop' are incompatible.
|
||||
Type '() => { foo: string; jj: number; }' is not assignable to type '() => Style'.
|
||||
Type '{ foo: string; jj: number; }' is not assignable to type 'Style'.
|
||||
Object literal may only specify known properties, and 'jj' does not exist in type 'Style'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts (1 errors) ====
|
||||
type Style = StyleBase | StyleArray;
|
||||
interface StyleArray extends Array<Style> {}
|
||||
interface StyleBase {
|
||||
foo: string;
|
||||
}
|
||||
|
||||
const blah: Style = [
|
||||
[[{
|
||||
foo: 'asdf',
|
||||
jj: 1 // intentional error
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[][][]' is not assignable to type 'StyleArray'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => { foo: string; jj: number; }[][]' is not assignable to type '() => Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => { foo: string; jj: number; }[]' is not assignable to type '() => Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }[]' is not assignable to type 'StyleArray'.
|
||||
!!! error TS2322: Types of property 'pop' are incompatible.
|
||||
!!! error TS2322: Type '() => { foo: string; jj: number; }' is not assignable to type '() => Style'.
|
||||
!!! error TS2322: Type '{ foo: string; jj: number; }' is not assignable to type 'Style'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'Style'.
|
||||
}]]
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//// [nestedRecursiveArraysOrObjectsError01.ts]
|
||||
type Style = StyleBase | StyleArray;
|
||||
interface StyleArray extends Array<Style> {}
|
||||
interface StyleBase {
|
||||
foo: string;
|
||||
}
|
||||
|
||||
const blah: Style = [
|
||||
[[{
|
||||
foo: 'asdf',
|
||||
jj: 1 // intentional error
|
||||
}]]
|
||||
];
|
||||
|
||||
|
||||
|
||||
//// [nestedRecursiveArraysOrObjectsError01.js]
|
||||
var blah = [
|
||||
[[{
|
||||
foo: 'asdf',
|
||||
jj: 1 // intentional error
|
||||
}]]
|
||||
];
|
||||
@@ -0,0 +1,33 @@
|
||||
=== tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts ===
|
||||
type Style = StyleBase | StyleArray;
|
||||
>Style : Symbol(Style, Decl(nestedRecursiveArraysOrObjectsError01.ts, 0, 0))
|
||||
>StyleBase : Symbol(StyleBase, Decl(nestedRecursiveArraysOrObjectsError01.ts, 1, 44))
|
||||
>StyleArray : Symbol(StyleArray, Decl(nestedRecursiveArraysOrObjectsError01.ts, 0, 36))
|
||||
|
||||
interface StyleArray extends Array<Style> {}
|
||||
>StyleArray : Symbol(StyleArray, Decl(nestedRecursiveArraysOrObjectsError01.ts, 0, 36))
|
||||
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
|
||||
>Style : Symbol(Style, Decl(nestedRecursiveArraysOrObjectsError01.ts, 0, 0))
|
||||
|
||||
interface StyleBase {
|
||||
>StyleBase : Symbol(StyleBase, Decl(nestedRecursiveArraysOrObjectsError01.ts, 1, 44))
|
||||
|
||||
foo: string;
|
||||
>foo : Symbol(StyleBase.foo, Decl(nestedRecursiveArraysOrObjectsError01.ts, 2, 21))
|
||||
}
|
||||
|
||||
const blah: Style = [
|
||||
>blah : Symbol(blah, Decl(nestedRecursiveArraysOrObjectsError01.ts, 6, 5))
|
||||
>Style : Symbol(Style, Decl(nestedRecursiveArraysOrObjectsError01.ts, 0, 0))
|
||||
|
||||
[[{
|
||||
foo: 'asdf',
|
||||
>foo : Symbol(foo, Decl(nestedRecursiveArraysOrObjectsError01.ts, 7, 7))
|
||||
|
||||
jj: 1 // intentional error
|
||||
>jj : Symbol(jj, Decl(nestedRecursiveArraysOrObjectsError01.ts, 8, 20))
|
||||
|
||||
}]]
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
=== tests/cases/compiler/nestedRecursiveArraysOrObjectsError01.ts ===
|
||||
type Style = StyleBase | StyleArray;
|
||||
>Style : Style
|
||||
>StyleBase : StyleBase
|
||||
>StyleArray : StyleArray
|
||||
|
||||
interface StyleArray extends Array<Style> {}
|
||||
>StyleArray : StyleArray
|
||||
>Array : T[]
|
||||
>Style : Style
|
||||
|
||||
interface StyleBase {
|
||||
>StyleBase : StyleBase
|
||||
|
||||
foo: string;
|
||||
>foo : string
|
||||
}
|
||||
|
||||
const blah: Style = [
|
||||
>blah : Style
|
||||
>Style : Style
|
||||
>[ [[{ foo: 'asdf', jj: 1 // intentional error }]]] : { foo: string; jj: number; }[][][]
|
||||
|
||||
[[{
|
||||
>[[{ foo: 'asdf', jj: 1 // intentional error }]] : { foo: string; jj: number; }[][]
|
||||
>[{ foo: 'asdf', jj: 1 // intentional error }] : { foo: string; jj: number; }[]
|
||||
>{ foo: 'asdf', jj: 1 // intentional error } : { foo: string; jj: number; }
|
||||
|
||||
foo: 'asdf',
|
||||
>foo : string
|
||||
>'asdf' : "asdf"
|
||||
|
||||
jj: 1 // intentional error
|
||||
>jj : number
|
||||
>1 : 1
|
||||
|
||||
}]]
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user