Accepted baselines.

This commit is contained in:
Daniel Rosenwasser
2018-04-19 10:34:43 -07:00
parent 8e27f4693c
commit e21a8b8cfd
4 changed files with 61 additions and 2 deletions

View File

@@ -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`();

View File

@@ -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`();

View File

@@ -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`();

View File

@@ -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"