mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Accepted baselines.
This commit is contained in:
@@ -27,4 +27,14 @@ tests/cases/conformance/es6/templates/taggedTemplatesWithTypeArguments2.ts(17,30
|
||||
const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
~~~~~~~
|
||||
!!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'.
|
||||
|
||||
|
||||
/**
|
||||
* Testing ASI. This should never parse as
|
||||
*
|
||||
* ```ts
|
||||
* new tag<number>;
|
||||
* `hello${369}`();
|
||||
* ```
|
||||
*/
|
||||
const e = new tag<number>
|
||||
`hello`();
|
||||
@@ -16,10 +16,29 @@ 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);
|
||||
|
||||
|
||||
/**
|
||||
* Testing ASI. This should never parse as
|
||||
*
|
||||
* ```ts
|
||||
* new tag<number>;
|
||||
* `hello${369}`();
|
||||
* ```
|
||||
*/
|
||||
const e = new tag<number>
|
||||
`hello`();
|
||||
|
||||
//// [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);
|
||||
/**
|
||||
* Testing ASI. This should never parse as
|
||||
*
|
||||
* ```ts
|
||||
* new tag<number>;
|
||||
* `hello${369}`();
|
||||
* ```
|
||||
*/
|
||||
const e = new tag `hello`();
|
||||
|
||||
@@ -40,3 +40,16 @@ 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))
|
||||
|
||||
/**
|
||||
* Testing ASI. This should never parse as
|
||||
*
|
||||
* ```ts
|
||||
* new tag<number>;
|
||||
* `hello${369}`();
|
||||
* ```
|
||||
*/
|
||||
const e = new tag<number>
|
||||
>e : Symbol(e, Decl(taggedTemplatesWithTypeArguments2.ts, 26, 5))
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesWithTypeArguments2.ts, 8, 13))
|
||||
|
||||
`hello`();
|
||||
|
||||
@@ -70,3 +70,20 @@ const d = new tag<number> `${"hello"} ${"world"}`<string>(100, 200);
|
||||
>100 : 100
|
||||
>200 : 200
|
||||
|
||||
/**
|
||||
* Testing ASI. This should never parse as
|
||||
*
|
||||
* ```ts
|
||||
* new tag<number>;
|
||||
* `hello${369}`();
|
||||
* ```
|
||||
*/
|
||||
const e = new tag<number>
|
||||
>e : any
|
||||
>new tag<number>`hello`() : any
|
||||
>tag<number>`hello` : SomethingNewable
|
||||
>tag : SomethingTaggable
|
||||
|
||||
`hello`();
|
||||
>`hello` : "hello"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user