mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
Accepted baselines.
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(11,22): error TS2339: Property 'x' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(13,22): error TS2339: Property 'y' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(15,22): error TS2339: Property 'z' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(24,22): error TS2339: Property 'x' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(26,22): error TS2339: Property 'y' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(28,22): error TS2339: Property 'z' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(38,19): error TS2339: Property 'x' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(39,19): error TS2339: Property 'y' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(40,19): error TS2339: Property 'z' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(43,19): error TS2339: Property 'x' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(44,19): error TS2339: Property 'y' does not exist on type '{}'.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts(45,19): error TS2339: Property 'z' does not exist on type '{}'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments1.ts (12 errors) ====
|
||||
declare function f<T>(strs: TemplateStringsArray, ...callbacks: Array<(x: T) => any>): void;
|
||||
|
||||
interface Stuff {
|
||||
x: number;
|
||||
y: string;
|
||||
z: boolean;
|
||||
}
|
||||
|
||||
export const a = f<Stuff> `
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type '{}'.
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type '{}'.
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
~
|
||||
!!! error TS2339: Property 'z' does not exist on type '{}'.
|
||||
`;
|
||||
|
||||
declare function g<Input, T, U, V>(
|
||||
strs: TemplateStringsArray,
|
||||
t: (i: Input) => T, u: (i: Input) => U, v: (i: Input) => V): T | U | V;
|
||||
|
||||
export const b = g<Stuff, number, string, boolean> `
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type '{}'.
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type '{}'.
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
~
|
||||
!!! error TS2339: Property 'z' does not exist on type '{}'.
|
||||
`;
|
||||
|
||||
declare let obj: {
|
||||
prop: <T>(strs: TemplateStringsArray, x: (input: T) => T) => {
|
||||
returnedObjProp: T
|
||||
}
|
||||
}
|
||||
|
||||
export let c = obj["prop"]<Stuff> `${(input) => ({ ...input })}`
|
||||
c.returnedObjProp.x;
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type '{}'.
|
||||
c.returnedObjProp.y;
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type '{}'.
|
||||
c.returnedObjProp.z;
|
||||
~
|
||||
!!! error TS2339: Property 'z' does not exist on type '{}'.
|
||||
|
||||
c = obj.prop<Stuff> `${(input) => ({ ...input })}`
|
||||
c.returnedObjProp.x;
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type '{}'.
|
||||
c.returnedObjProp.y;
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type '{}'.
|
||||
c.returnedObjProp.z;
|
||||
~
|
||||
!!! error TS2339: Property 'z' does not exist on type '{}'.
|
||||
@@ -30,17 +30,23 @@ export const a = f<Stuff> `
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 10, 6))
|
||||
>stuff.x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 10, 6))
|
||||
>x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 12, 6))
|
||||
>stuff.y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 12, 6))
|
||||
>y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 14, 6))
|
||||
>stuff.z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 14, 6))
|
||||
>z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
|
||||
`;
|
||||
|
||||
@@ -80,17 +86,23 @@ export const b = g<Stuff, number, string, boolean> `
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 23, 6))
|
||||
>stuff.x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 23, 6))
|
||||
>x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 25, 6))
|
||||
>stuff.y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 25, 6))
|
||||
>y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 27, 6))
|
||||
>stuff.z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
>stuff : Symbol(stuff, Decl(taggedTemplatesWithTypeArguments1.ts, 27, 6))
|
||||
>z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
|
||||
`;
|
||||
|
||||
@@ -122,19 +134,25 @@ export let c = obj["prop"]<Stuff> `${(input) => ({ ...input })}`
|
||||
>input : Symbol(input, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 38))
|
||||
|
||||
c.returnedObjProp.x;
|
||||
>c.returnedObjProp.x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
|
||||
c.returnedObjProp.y;
|
||||
>c.returnedObjProp.y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
|
||||
c.returnedObjProp.z;
|
||||
>c.returnedObjProp.z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
|
||||
c = obj.prop<Stuff> `${(input) => ({ ...input })}`
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
@@ -146,17 +164,23 @@ c = obj.prop<Stuff> `${(input) => ({ ...input })}`
|
||||
>input : Symbol(input, Decl(taggedTemplatesWithTypeArguments1.ts, 41, 24))
|
||||
|
||||
c.returnedObjProp.x;
|
||||
>c.returnedObjProp.x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>x : Symbol(Stuff.x, Decl(taggedTemplatesWithTypeArguments1.ts, 2, 17))
|
||||
|
||||
c.returnedObjProp.y;
|
||||
>c.returnedObjProp.y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>y : Symbol(Stuff.y, Decl(taggedTemplatesWithTypeArguments1.ts, 3, 14))
|
||||
|
||||
c.returnedObjProp.z;
|
||||
>c.returnedObjProp.z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
>c.returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments1.ts, 36, 10))
|
||||
>returnedObjProp : Symbol(returnedObjProp, Decl(taggedTemplatesWithTypeArguments1.ts, 31, 66))
|
||||
>z : Symbol(Stuff.z, Decl(taggedTemplatesWithTypeArguments1.ts, 4, 14))
|
||||
|
||||
|
||||
@@ -31,27 +31,27 @@ export const a = f<Stuff> `
|
||||
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
>stuff => stuff.x : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.x : any
|
||||
>stuff : {}
|
||||
>x : any
|
||||
>stuff => stuff.x : (stuff: Stuff) => number
|
||||
>stuff : Stuff
|
||||
>stuff.x : number
|
||||
>stuff : Stuff
|
||||
>x : number
|
||||
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
>stuff => stuff.y : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.y : any
|
||||
>stuff : {}
|
||||
>y : any
|
||||
>stuff => stuff.y : (stuff: Stuff) => string
|
||||
>stuff : Stuff
|
||||
>stuff.y : string
|
||||
>stuff : Stuff
|
||||
>y : string
|
||||
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
>stuff => stuff.z : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.z : any
|
||||
>stuff : {}
|
||||
>z : any
|
||||
>stuff => stuff.z : (stuff: Stuff) => boolean
|
||||
>stuff : Stuff
|
||||
>stuff.z : boolean
|
||||
>stuff : Stuff
|
||||
>z : boolean
|
||||
|
||||
`;
|
||||
|
||||
@@ -84,35 +84,35 @@ declare function g<Input, T, U, V>(
|
||||
>V : V
|
||||
|
||||
export const b = g<Stuff, number, string, boolean> `
|
||||
>b : any
|
||||
>g<Stuff, number, string, boolean> ` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : any
|
||||
>b : string | number | boolean
|
||||
>g<Stuff, number, string, boolean> ` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : string | number | boolean
|
||||
>g : <Input, T, U, V>(strs: TemplateStringsArray, t: (i: Input) => T, u: (i: Input) => U, v: (i: Input) => V) => T | U | V
|
||||
>Stuff : Stuff
|
||||
>` hello ${stuff => stuff.x} brave ${stuff => stuff.y} world ${stuff => stuff.z}` : string
|
||||
|
||||
hello
|
||||
${stuff => stuff.x}
|
||||
>stuff => stuff.x : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.x : any
|
||||
>stuff : {}
|
||||
>x : any
|
||||
>stuff => stuff.x : (stuff: Stuff) => number
|
||||
>stuff : Stuff
|
||||
>stuff.x : number
|
||||
>stuff : Stuff
|
||||
>x : number
|
||||
|
||||
brave
|
||||
${stuff => stuff.y}
|
||||
>stuff => stuff.y : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.y : any
|
||||
>stuff : {}
|
||||
>y : any
|
||||
>stuff => stuff.y : (stuff: Stuff) => string
|
||||
>stuff : Stuff
|
||||
>stuff.y : string
|
||||
>stuff : Stuff
|
||||
>y : string
|
||||
|
||||
world
|
||||
${stuff => stuff.z}
|
||||
>stuff => stuff.z : (stuff: {}) => any
|
||||
>stuff : {}
|
||||
>stuff.z : any
|
||||
>stuff : {}
|
||||
>z : any
|
||||
>stuff => stuff.z : (stuff: Stuff) => boolean
|
||||
>stuff : Stuff
|
||||
>stuff.z : boolean
|
||||
>stuff : Stuff
|
||||
>z : boolean
|
||||
|
||||
`;
|
||||
|
||||
@@ -136,73 +136,73 @@ declare let obj: {
|
||||
}
|
||||
|
||||
export let c = obj["prop"]<Stuff> `${(input) => ({ ...input })}`
|
||||
>c : { returnedObjProp: {}; }
|
||||
>obj["prop"]<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: {}; }
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>obj["prop"]<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: Stuff; }
|
||||
>obj["prop"] : <T>(strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }
|
||||
>obj : { prop: <T>(strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }; }
|
||||
>"prop" : "prop"
|
||||
>Stuff : Stuff
|
||||
>`${(input) => ({ ...input })}` : string
|
||||
>(input) => ({ ...input }) : (input: {}) => {}
|
||||
>input : {}
|
||||
>({ ...input }) : {}
|
||||
>{ ...input } : {}
|
||||
>input : {}
|
||||
>(input) => ({ ...input }) : (input: Stuff) => { x: number; y: string; z: boolean; }
|
||||
>input : Stuff
|
||||
>({ ...input }) : { x: number; y: string; z: boolean; }
|
||||
>{ ...input } : { x: number; y: string; z: boolean; }
|
||||
>input : Stuff
|
||||
|
||||
c.returnedObjProp.x;
|
||||
>c.returnedObjProp.x : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>x : any
|
||||
>c.returnedObjProp.x : number
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>x : number
|
||||
|
||||
c.returnedObjProp.y;
|
||||
>c.returnedObjProp.y : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>y : any
|
||||
>c.returnedObjProp.y : string
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>y : string
|
||||
|
||||
c.returnedObjProp.z;
|
||||
>c.returnedObjProp.z : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>z : any
|
||||
>c.returnedObjProp.z : boolean
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>z : boolean
|
||||
|
||||
c = obj.prop<Stuff> `${(input) => ({ ...input })}`
|
||||
>c = obj.prop<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: {}; }
|
||||
>c : { returnedObjProp: {}; }
|
||||
>obj.prop<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: {}; }
|
||||
>c = obj.prop<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: Stuff; }
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>obj.prop<Stuff> `${(input) => ({ ...input })}` : { returnedObjProp: Stuff; }
|
||||
>obj.prop : <T>(strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }
|
||||
>obj : { prop: <T>(strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }; }
|
||||
>prop : <T>(strs: TemplateStringsArray, x: (input: T) => T) => { returnedObjProp: T; }
|
||||
>Stuff : Stuff
|
||||
>`${(input) => ({ ...input })}` : string
|
||||
>(input) => ({ ...input }) : (input: {}) => {}
|
||||
>input : {}
|
||||
>({ ...input }) : {}
|
||||
>{ ...input } : {}
|
||||
>input : {}
|
||||
>(input) => ({ ...input }) : (input: Stuff) => { x: number; y: string; z: boolean; }
|
||||
>input : Stuff
|
||||
>({ ...input }) : { x: number; y: string; z: boolean; }
|
||||
>{ ...input } : { x: number; y: string; z: boolean; }
|
||||
>input : Stuff
|
||||
|
||||
c.returnedObjProp.x;
|
||||
>c.returnedObjProp.x : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>x : any
|
||||
>c.returnedObjProp.x : number
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>x : number
|
||||
|
||||
c.returnedObjProp.y;
|
||||
>c.returnedObjProp.y : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>y : any
|
||||
>c.returnedObjProp.y : string
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>y : string
|
||||
|
||||
c.returnedObjProp.z;
|
||||
>c.returnedObjProp.z : any
|
||||
>c.returnedObjProp : {}
|
||||
>c : { returnedObjProp: {}; }
|
||||
>returnedObjProp : {}
|
||||
>z : any
|
||||
>c.returnedObjProp.z : boolean
|
||||
>c.returnedObjProp : Stuff
|
||||
>c : { returnedObjProp: Stuff; }
|
||||
>returnedObjProp : Stuff
|
||||
>z : boolean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user