Skip to content

Commit 258c4e0

Browse files
Accepted baselines.
1 parent 50085ba commit 258c4e0

6 files changed

+134
-6
lines changed

tests/baselines/reference/importHelpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ var C = /** @class */ (function () {
8383
function id(x) {
8484
return x;
8585
}
86-
exports.result = id(_a || (_a = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
87-
var _a;
86+
exports.result = id(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
87+
var templateObject_1;
8888
//// [script.js]
8989
var __extends = (this && this.__extends) || (function () {
9090
var extendStatics = Object.setPrototypeOf ||

tests/baselines/reference/taggedTemplateWithoutDeclaredHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ var tslib_1 = require("tslib");
1818
function id(x) {
1919
return x;
2020
}
21-
exports.result = id(_a || (_a = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
22-
var _a;
21+
exports.result = id(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
22+
var templateObject_1;
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//// [taggedTemplatesInDifferentScopes.ts]
2+
export function tag(parts: TemplateStringsArray, ...values: any[]) {
3+
return parts[0];
4+
}
5+
function foo() {
6+
tag `foo`;
7+
tag `foo2`;
8+
}
9+
10+
function bar() {
11+
tag `bar`;
12+
tag `bar2`;
13+
}
14+
15+
foo();
16+
bar();
17+
18+
19+
//// [taggedTemplatesInDifferentScopes.js]
20+
"use strict";
21+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
22+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
23+
return cooked;
24+
};
25+
exports.__esModule = true;
26+
function tag(parts) {
27+
var values = [];
28+
for (var _i = 1; _i < arguments.length; _i++) {
29+
values[_i - 1] = arguments[_i];
30+
}
31+
return parts[0];
32+
}
33+
exports.tag = tag;
34+
function foo() {
35+
tag(templateObject_1 || (templateObject_1 = __makeTemplateObject(["foo"], ["foo"])));
36+
tag(templateObject_2 || (templateObject_2 = __makeTemplateObject(["foo2"], ["foo2"])));
37+
}
38+
function bar() {
39+
tag(templateObject_3 || (templateObject_3 = __makeTemplateObject(["bar"], ["bar"])));
40+
tag(templateObject_4 || (templateObject_4 = __makeTemplateObject(["bar2"], ["bar2"])));
41+
}
42+
foo();
43+
bar();
44+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
=== tests/cases/compiler/taggedTemplatesInDifferentScopes.ts ===
2+
export function tag(parts: TemplateStringsArray, ...values: any[]) {
3+
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
4+
>parts : Symbol(parts, Decl(taggedTemplatesInDifferentScopes.ts, 0, 20))
5+
>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --))
6+
>values : Symbol(values, Decl(taggedTemplatesInDifferentScopes.ts, 0, 48))
7+
8+
return parts[0];
9+
>parts : Symbol(parts, Decl(taggedTemplatesInDifferentScopes.ts, 0, 20))
10+
}
11+
function foo() {
12+
>foo : Symbol(foo, Decl(taggedTemplatesInDifferentScopes.ts, 2, 1))
13+
14+
tag `foo`;
15+
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
16+
17+
tag `foo2`;
18+
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
19+
}
20+
21+
function bar() {
22+
>bar : Symbol(bar, Decl(taggedTemplatesInDifferentScopes.ts, 6, 1))
23+
24+
tag `bar`;
25+
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
26+
27+
tag `bar2`;
28+
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
29+
}
30+
31+
foo();
32+
>foo : Symbol(foo, Decl(taggedTemplatesInDifferentScopes.ts, 2, 1))
33+
34+
bar();
35+
>bar : Symbol(bar, Decl(taggedTemplatesInDifferentScopes.ts, 6, 1))
36+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
=== tests/cases/compiler/taggedTemplatesInDifferentScopes.ts ===
2+
export function tag(parts: TemplateStringsArray, ...values: any[]) {
3+
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
4+
>parts : TemplateStringsArray
5+
>TemplateStringsArray : TemplateStringsArray
6+
>values : any[]
7+
8+
return parts[0];
9+
>parts[0] : string
10+
>parts : TemplateStringsArray
11+
>0 : 0
12+
}
13+
function foo() {
14+
>foo : () => void
15+
16+
tag `foo`;
17+
>tag `foo` : string
18+
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
19+
>`foo` : "foo"
20+
21+
tag `foo2`;
22+
>tag `foo2` : string
23+
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
24+
>`foo2` : "foo2"
25+
}
26+
27+
function bar() {
28+
>bar : () => void
29+
30+
tag `bar`;
31+
>tag `bar` : string
32+
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
33+
>`bar` : "bar"
34+
35+
tag `bar2`;
36+
>tag `bar2` : string
37+
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
38+
>`bar2` : "bar2"
39+
}
40+
41+
foo();
42+
>foo() : void
43+
>foo : () => void
44+
45+
bar();
46+
>bar() : void
47+
>bar : () => void
48+

tests/baselines/reference/taggedTemplatesInModuleAndGlobal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function id(x) {
4949
return x;
5050
}
5151
function templateObjectFactory() {
52-
return id(_a || (_a = __makeTemplateObject(["hello world"], ["hello world"])));
52+
return id(templateObject_1 || (templateObject_1 = __makeTemplateObject(["hello world"], ["hello world"])));
5353
}
5454
var result = templateObjectFactory() === templateObjectFactory();
55-
var _a;
55+
var templateObject_1;

0 commit comments

Comments
 (0)