mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Accepted baselines.
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,11): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,27): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(13,60): error TS1005: ')' expected.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,27): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(15,68): error TS1005: ')' expected.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,11): error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,11): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,27): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,68): error TS1005: ')' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts (15 errors) ====
|
||||
export interface SomethingTaggable {
|
||||
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
|
||||
}
|
||||
|
||||
export interface SomethingNewable {
|
||||
new <T>(...args: T[]): any;
|
||||
}
|
||||
|
||||
declare const tag: SomethingTaggable;
|
||||
|
||||
const a = new tag `${100} ${200}`<string>("hello", "world");
|
||||
|
||||
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
~
|
||||
!!! error TS1005: ')' expected.
|
||||
|
||||
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
~
|
||||
!!! error TS1005: ')' expected.
|
||||
|
||||
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2350: Only a void function can be called with the 'new' keyword.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
||||
~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
|
||||
~
|
||||
!!! error TS1005: ')' expected.
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//// [taggedTemplatesWithTypeArguments2.ts]
|
||||
export interface SomethingTaggable {
|
||||
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
|
||||
}
|
||||
|
||||
export interface SomethingNewable {
|
||||
new <T>(...args: T[]): any;
|
||||
}
|
||||
|
||||
declare const tag: SomethingTaggable;
|
||||
|
||||
const a = new tag `${100} ${200}`<string>("hello", "world");
|
||||
|
||||
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
|
||||
|
||||
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
|
||||
|
||||
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
|
||||
|
||||
//// [taggedTemplatesWithTypeArguments2.js]
|
||||
const a = new tag `${100} ${200}`("hello", "world");
|
||||
const b = new tag(`${"hello"} ${"world"}`(100, 200));
|
||||
const c = new tag(`${100} ${200}`("hello", "world"));
|
||||
const d = new tag(`${"hello"} ${"world"}`(100, 200));
|
||||
@@ -0,0 +1,42 @@
|
||||
=== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts ===
|
||||
export interface SomethingTaggable {
|
||||
>SomethingTaggable : Symbol(SomethingTaggable, Decl(taggedTemplatesWithTypeArguments2.ts, 0, 0))
|
||||
|
||||
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
|
||||
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 5))
|
||||
>t : Symbol(t, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 8))
|
||||
>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --))
|
||||
>args : Symbol(args, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 32))
|
||||
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 1, 5))
|
||||
>SomethingNewable : Symbol(SomethingNewable, Decl(taggedTemplatesWithTypeArguments2.ts, 2, 1))
|
||||
}
|
||||
|
||||
export interface SomethingNewable {
|
||||
>SomethingNewable : Symbol(SomethingNewable, Decl(taggedTemplatesWithTypeArguments2.ts, 2, 1))
|
||||
|
||||
new <T>(...args: T[]): any;
|
||||
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 9))
|
||||
>args : Symbol(args, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 12))
|
||||
>T : Symbol(T, Decl(taggedTemplatesWithTypeArguments2.ts, 5, 9))
|
||||
}
|
||||
|
||||
declare const tag: SomethingTaggable;
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
>SomethingTaggable : Symbol(SomethingTaggable, Decl(taggedTemplatesWithTypeArguments2.ts, 0, 0))
|
||||
|
||||
const a = new tag `${100} ${200}`<string>("hello", "world");
|
||||
>a : Symbol(a, Decl(taggedTemplatesWithTypeArguments2.ts, 10, 5))
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
|
||||
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
|
||||
>b : Symbol(b, Decl(taggedTemplatesWithTypeArguments2.ts, 12, 5))
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
|
||||
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
|
||||
>c : Symbol(c, Decl(taggedTemplatesWithTypeArguments2.ts, 14, 5))
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
|
||||
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
>d : Symbol(d, Decl(taggedTemplatesWithTypeArguments2.ts, 16, 5))
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
=== tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts ===
|
||||
export interface SomethingTaggable {
|
||||
>SomethingTaggable : SomethingTaggable
|
||||
|
||||
<T>(t: TemplateStringsArray, ...args: T[]): SomethingNewable;
|
||||
>T : T
|
||||
>t : TemplateStringsArray
|
||||
>TemplateStringsArray : TemplateStringsArray
|
||||
>args : T[]
|
||||
>T : T
|
||||
>SomethingNewable : SomethingNewable
|
||||
}
|
||||
|
||||
export interface SomethingNewable {
|
||||
>SomethingNewable : SomethingNewable
|
||||
|
||||
new <T>(...args: T[]): any;
|
||||
>T : T
|
||||
>args : T[]
|
||||
>T : T
|
||||
}
|
||||
|
||||
declare const tag: SomethingTaggable;
|
||||
>tag : SomethingTaggable
|
||||
>SomethingTaggable : SomethingTaggable
|
||||
|
||||
const a = new tag `${100} ${200}`<string>("hello", "world");
|
||||
>a : any
|
||||
>new tag `${100} ${200}`<string>("hello", "world") : any
|
||||
>tag `${100} ${200}` : SomethingNewable
|
||||
>tag : SomethingTaggable
|
||||
>`${100} ${200}` : string
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
>"hello" : "hello"
|
||||
>"world" : "world"
|
||||
|
||||
const b = new tag<number> `${"hello"} ${"world"}`(100, 200);
|
||||
>b : any
|
||||
>new tag<number> `${"hello"} ${"world"}`(100, 200) : any
|
||||
>tag : SomethingTaggable
|
||||
>`${"hello"} ${"world"}`(100, 200) : any
|
||||
>`${"hello"} ${"world"}` : string
|
||||
>"hello" : "hello"
|
||||
>"world" : "world"
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
|
||||
const c = new tag<number> `${100} ${200}`<string>("hello", "world");
|
||||
>c : any
|
||||
>new tag<number> `${100} ${200}`<string>("hello", "world") : any
|
||||
>tag : SomethingTaggable
|
||||
>`${100} ${200}`<string>("hello", "world") : any
|
||||
>`${100} ${200}` : string
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
>"hello" : "hello"
|
||||
>"world" : "world"
|
||||
|
||||
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
>d : any
|
||||
>new tag<number> `${"hello"} ${"world"}`<string>(100, 200) : any
|
||||
>tag : SomethingTaggable
|
||||
>`${"hello"} ${"world"}`<string>(100, 200) : any
|
||||
>`${"hello"} ${"world"}` : string
|
||||
>"hello" : "hello"
|
||||
>"world" : "world"
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
|
||||
Reference in New Issue
Block a user