mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-08 08:14:51 -06:00
Accept new baselines
This commit is contained in:
parent
b81c226639
commit
de2da2cb72
@ -1,15 +1,15 @@
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
|
||||
Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
|
||||
Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'.
|
||||
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'.
|
||||
Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'.
|
||||
Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (10 errors) ====
|
||||
@ -21,11 +21,11 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1187: A parameter property may not be declared using a binding pattern.
|
||||
~~
|
||||
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature.
|
||||
!!! error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature.
|
||||
~~
|
||||
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature.
|
||||
!!! error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature.
|
||||
~~
|
||||
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature.
|
||||
!!! error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature.
|
||||
var foo: any = x1 || x2 || x3 || y || z;
|
||||
var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z;
|
||||
~~
|
||||
@ -43,7 +43,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1
|
||||
|
||||
var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]);
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
|
||||
!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'.
|
||||
!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'.
|
||||
!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'.
|
||||
var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z];
|
||||
@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/implicitIndexSignatures.ts ===
|
||||
type StringMap = { [x: string]: string };
|
||||
>StringMap : { [x: string]: string; }
|
||||
>StringMap : StringMap
|
||||
>x : string
|
||||
|
||||
const empty1 = {};
|
||||
@ -24,12 +24,12 @@ let names2: { a: string, b: string };
|
||||
>b : string
|
||||
|
||||
let map: StringMap;
|
||||
>map : { [x: string]: string; }
|
||||
>StringMap : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>StringMap : StringMap
|
||||
|
||||
map = { x: "xxx", y: "yyy" };
|
||||
>map = { x: "xxx", y: "yyy" } : { x: string; y: string; }
|
||||
>map : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>{ x: "xxx", y: "yyy" } : { x: string; y: string; }
|
||||
>x : string
|
||||
>"xxx" : "xxx"
|
||||
@ -38,22 +38,22 @@ map = { x: "xxx", y: "yyy" };
|
||||
|
||||
map = empty1;
|
||||
>map = empty1 : {}
|
||||
>map : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>empty1 : {}
|
||||
|
||||
map = empty2;
|
||||
>map = empty2 : {}
|
||||
>map : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>empty2 : {}
|
||||
|
||||
map = names1;
|
||||
>map = names1 : { a: string; b: string; }
|
||||
>map : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>names1 : { a: string; b: string; }
|
||||
|
||||
map = names2;
|
||||
>map = names2 : { a: string; b: string; }
|
||||
>map : { [x: string]: string; }
|
||||
>map : StringMap
|
||||
>names2 : { a: string; b: string; }
|
||||
|
||||
declare function getStringIndexValue<T>(map: { [x: string]: T }): T;
|
||||
|
||||
@ -189,7 +189,7 @@ var z: Z4;
|
||||
// Repro from #9919
|
||||
|
||||
type ToString = {
|
||||
>ToString : { toString(): string; }
|
||||
>ToString : ToString
|
||||
|
||||
toString(): string;
|
||||
>toString : () => string
|
||||
@ -207,18 +207,18 @@ type BoxedValue = { kind: 'int', num: number }
|
||||
type IntersectionFail = BoxedValue & ToString
|
||||
>IntersectionFail : IntersectionFail
|
||||
>BoxedValue : BoxedValue
|
||||
>ToString : { toString(): string; }
|
||||
>ToString : ToString
|
||||
|
||||
type IntersectionInline = { kind: 'int', num: number } & ToString
|
||||
>IntersectionInline : IntersectionInline
|
||||
>kind : "int"
|
||||
>num : number
|
||||
>ToString : { toString(): string; }
|
||||
>ToString : ToString
|
||||
|
||||
| { kind: 'string', str: string } & ToString
|
||||
>kind : "string"
|
||||
>str : string
|
||||
>ToString : { toString(): string; }
|
||||
>ToString : ToString
|
||||
|
||||
function getValueAsString(value: IntersectionFail): string {
|
||||
>getValueAsString : (value: IntersectionFail) => string
|
||||
@ -236,11 +236,11 @@ function getValueAsString(value: IntersectionFail): string {
|
||||
>'' + value.num : string
|
||||
>'' : ""
|
||||
>value.num : number
|
||||
>value : { kind: "int"; num: number; } & { toString(): string; }
|
||||
>value : { kind: "int"; num: number; } & ToString
|
||||
>num : number
|
||||
}
|
||||
return value.str;
|
||||
>value.str : string
|
||||
>value : { kind: "string"; str: string; } & { toString(): string; }
|
||||
>value : { kind: "string"; str: string; } & ToString
|
||||
>str : string
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ class Options {
|
||||
}
|
||||
|
||||
type Dictionary<T> = { [x: string]: T };
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>T : T
|
||||
>x : string
|
||||
>T : T
|
||||
@ -88,7 +88,7 @@ type K11 = keyof Shape[]; // number | "length" | "toString" | ...
|
||||
|
||||
type K12 = keyof Dictionary<Shape>; // string | number
|
||||
>K12 : string | number
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>Shape : Shape
|
||||
|
||||
type K13 = keyof {}; // never
|
||||
@ -128,7 +128,7 @@ type K20 = KeyOf<Shape>; // "name" | "width" | "height" | "visible"
|
||||
type K21 = KeyOf<Dictionary<Shape>>; // string | number
|
||||
>K21 : string | number
|
||||
>KeyOf : keyof T
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>Shape : Shape
|
||||
|
||||
type NAME = "name";
|
||||
@ -201,17 +201,17 @@ type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false
|
||||
|
||||
type Q50 = Dictionary<Shape>["howdy"]; // Shape
|
||||
>Q50 : Shape
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>Shape : Shape
|
||||
|
||||
type Q51 = Dictionary<Shape>[123]; // Shape
|
||||
>Q51 : Shape
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>Shape : Shape
|
||||
|
||||
type Q52 = Dictionary<Shape>[E.B]; // Shape
|
||||
>Q52 : Shape
|
||||
>Dictionary : { [x: string]: T; }
|
||||
>Dictionary : Dictionary<T>
|
||||
>Shape : Shape
|
||||
>E : any
|
||||
>B : E.B
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'.
|
||||
tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/noErrorTruncation.ts (1 errors) ====
|
||||
@ -13,7 +13,7 @@ tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not
|
||||
|
||||
const x: SomeLongOptionA
|
||||
~
|
||||
!!! error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'.
|
||||
!!! error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'.
|
||||
| SomeLongOptionB
|
||||
| SomeLongOptionC
|
||||
| SomeLongOptionD
|
||||
|
||||
@ -8,7 +8,7 @@ import { IEventSourcedEntity } from "./bar";
|
||||
>IEventSourcedEntity : any
|
||||
|
||||
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
|
||||
>DomainEntityConstructor : new () => TEntity
|
||||
>DomainEntityConstructor : DomainEntityConstructor<TEntity>
|
||||
>TEntity : TEntity
|
||||
>IEventSourcedEntity : IEventSourcedEntity
|
||||
>TEntity : TEntity
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/compiler/typeAliasDeclarationEmit2.ts ===
|
||||
|
||||
export type A<a> = { value: a };
|
||||
>A : { value: a; }
|
||||
>A : A<a>
|
||||
>a : a
|
||||
>value : a
|
||||
>a : a
|
||||
|
||||
@ -104,7 +104,7 @@ var x9: T9;
|
||||
>T9 : T9
|
||||
|
||||
type T10 = { x: number };
|
||||
>T10 : { x: number; }
|
||||
>T10 : T10
|
||||
>x : number
|
||||
|
||||
var x10: { x: number };
|
||||
@ -113,17 +113,17 @@ var x10: { x: number };
|
||||
|
||||
var x10: T10;
|
||||
>x10 : { x: number; }
|
||||
>T10 : { x: number; }
|
||||
>T10 : T10
|
||||
|
||||
type T11 = { new(): boolean };
|
||||
>T11 : new () => boolean
|
||||
>T11 : T11
|
||||
|
||||
var x11: { new(): boolean };
|
||||
>x11 : new () => boolean
|
||||
|
||||
var x11: T11;
|
||||
>x11 : new () => boolean
|
||||
>T11 : new () => boolean
|
||||
>T11 : T11
|
||||
|
||||
interface I13 { x: string };
|
||||
>I13 : I13
|
||||
|
||||
@ -11,7 +11,7 @@ type TreeNode = {
|
||||
}
|
||||
|
||||
type TreeNodeMiddleman = {
|
||||
>TreeNodeMiddleman : { name: string; parent: TreeNode; }
|
||||
>TreeNodeMiddleman : TreeNodeMiddleman
|
||||
|
||||
name: string;
|
||||
>name : string
|
||||
@ -22,17 +22,17 @@ type TreeNodeMiddleman = {
|
||||
}
|
||||
|
||||
var nodes: TreeNodeMiddleman[];
|
||||
>nodes : { name: string; parent: TreeNode; }[]
|
||||
>TreeNodeMiddleman : { name: string; parent: TreeNode; }
|
||||
>nodes : TreeNodeMiddleman[]
|
||||
>TreeNodeMiddleman : TreeNodeMiddleman
|
||||
|
||||
nodes.map(n => n.name);
|
||||
>nodes.map(n => n.name) : string[]
|
||||
>nodes.map : { <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; }
|
||||
>nodes : { name: string; parent: TreeNode; }[]
|
||||
>map : { <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; }
|
||||
>n => n.name : (n: { name: string; parent: TreeNode; }) => string
|
||||
>n : { name: string; parent: TreeNode; }
|
||||
>nodes.map : { <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; }
|
||||
>nodes : TreeNodeMiddleman[]
|
||||
>map : { <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; }
|
||||
>n => n.name : (n: TreeNodeMiddleman) => string
|
||||
>n : TreeNodeMiddleman
|
||||
>n.name : string
|
||||
>n : { name: string; parent: TreeNode; }
|
||||
>n : TreeNodeMiddleman
|
||||
>name : string
|
||||
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
=== tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsPrimitiveIntersection.ts ===
|
||||
type Tag = {__tag: any};
|
||||
>Tag : { __tag: any; }
|
||||
>Tag : Tag
|
||||
>__tag : any
|
||||
|
||||
declare function isNonBlank(value: string) : value is (string & Tag);
|
||||
>isNonBlank : (value: string) => value is string & { __tag: any; }
|
||||
>isNonBlank : (value: string) => value is string & Tag
|
||||
>value : string
|
||||
>value : any
|
||||
>Tag : { __tag: any; }
|
||||
>Tag : Tag
|
||||
|
||||
declare function doThis(value: string & Tag): void;
|
||||
>doThis : (value: string & { __tag: any; }) => void
|
||||
>value : string & { __tag: any; }
|
||||
>Tag : { __tag: any; }
|
||||
>doThis : (value: string & Tag) => void
|
||||
>value : string & Tag
|
||||
>Tag : Tag
|
||||
|
||||
declare function doThat(value: string) : void;
|
||||
>doThat : (value: string) => void
|
||||
@ -23,13 +23,13 @@ let value: string;
|
||||
|
||||
if (isNonBlank(value)) {
|
||||
>isNonBlank(value) : boolean
|
||||
>isNonBlank : (value: string) => value is string & { __tag: any; }
|
||||
>isNonBlank : (value: string) => value is string & Tag
|
||||
>value : string
|
||||
|
||||
doThis(value);
|
||||
>doThis(value) : void
|
||||
>doThis : (value: string & { __tag: any; }) => void
|
||||
>value : string & { __tag: any; }
|
||||
>doThis : (value: string & Tag) => void
|
||||
>value : string & Tag
|
||||
|
||||
} else {
|
||||
doThat(value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user