Accepted baselines.
This commit is contained in:
parent
2024ca20f8
commit
70579497c5
|
@ -83,8 +83,8 @@ var C = /** @class */ (function () {
|
|||
function id(x) {
|
||||
return x;
|
||||
}
|
||||
exports.result = id(_a || (_a = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
|
||||
var _a;
|
||||
exports.result = id(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
|
||||
var templateObject_1;
|
||||
//// [script.js]
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = Object.setPrototypeOf ||
|
||||
|
|
|
@ -18,5 +18,5 @@ var tslib_1 = require("tslib");
|
|||
function id(x) {
|
||||
return x;
|
||||
}
|
||||
exports.result = id(_a || (_a = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
|
||||
var _a;
|
||||
exports.result = id(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["hello world"], ["hello world"])));
|
||||
var templateObject_1;
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
//// [taggedTemplatesInDifferentScopes.ts]
|
||||
export function tag(parts: TemplateStringsArray, ...values: any[]) {
|
||||
return parts[0];
|
||||
}
|
||||
function foo() {
|
||||
tag `foo`;
|
||||
tag `foo2`;
|
||||
}
|
||||
|
||||
function bar() {
|
||||
tag `bar`;
|
||||
tag `bar2`;
|
||||
}
|
||||
|
||||
foo();
|
||||
bar();
|
||||
|
||||
|
||||
//// [taggedTemplatesInDifferentScopes.js]
|
||||
"use strict";
|
||||
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
exports.__esModule = true;
|
||||
function tag(parts) {
|
||||
var values = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
values[_i - 1] = arguments[_i];
|
||||
}
|
||||
return parts[0];
|
||||
}
|
||||
exports.tag = tag;
|
||||
function foo() {
|
||||
tag(templateObject_1 || (templateObject_1 = __makeTemplateObject(["foo"], ["foo"])));
|
||||
tag(templateObject_2 || (templateObject_2 = __makeTemplateObject(["foo2"], ["foo2"])));
|
||||
}
|
||||
function bar() {
|
||||
tag(templateObject_3 || (templateObject_3 = __makeTemplateObject(["bar"], ["bar"])));
|
||||
tag(templateObject_4 || (templateObject_4 = __makeTemplateObject(["bar2"], ["bar2"])));
|
||||
}
|
||||
foo();
|
||||
bar();
|
||||
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@ -0,0 +1,36 @@
|
|||
=== tests/cases/compiler/taggedTemplatesInDifferentScopes.ts ===
|
||||
export function tag(parts: TemplateStringsArray, ...values: any[]) {
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
|
||||
>parts : Symbol(parts, Decl(taggedTemplatesInDifferentScopes.ts, 0, 20))
|
||||
>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --))
|
||||
>values : Symbol(values, Decl(taggedTemplatesInDifferentScopes.ts, 0, 48))
|
||||
|
||||
return parts[0];
|
||||
>parts : Symbol(parts, Decl(taggedTemplatesInDifferentScopes.ts, 0, 20))
|
||||
}
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(taggedTemplatesInDifferentScopes.ts, 2, 1))
|
||||
|
||||
tag `foo`;
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
|
||||
|
||||
tag `foo2`;
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
|
||||
}
|
||||
|
||||
function bar() {
|
||||
>bar : Symbol(bar, Decl(taggedTemplatesInDifferentScopes.ts, 6, 1))
|
||||
|
||||
tag `bar`;
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
|
||||
|
||||
tag `bar2`;
|
||||
>tag : Symbol(tag, Decl(taggedTemplatesInDifferentScopes.ts, 0, 0))
|
||||
}
|
||||
|
||||
foo();
|
||||
>foo : Symbol(foo, Decl(taggedTemplatesInDifferentScopes.ts, 2, 1))
|
||||
|
||||
bar();
|
||||
>bar : Symbol(bar, Decl(taggedTemplatesInDifferentScopes.ts, 6, 1))
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
=== tests/cases/compiler/taggedTemplatesInDifferentScopes.ts ===
|
||||
export function tag(parts: TemplateStringsArray, ...values: any[]) {
|
||||
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
|
||||
>parts : TemplateStringsArray
|
||||
>TemplateStringsArray : TemplateStringsArray
|
||||
>values : any[]
|
||||
|
||||
return parts[0];
|
||||
>parts[0] : string
|
||||
>parts : TemplateStringsArray
|
||||
>0 : 0
|
||||
}
|
||||
function foo() {
|
||||
>foo : () => void
|
||||
|
||||
tag `foo`;
|
||||
>tag `foo` : string
|
||||
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
|
||||
>`foo` : "foo"
|
||||
|
||||
tag `foo2`;
|
||||
>tag `foo2` : string
|
||||
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
|
||||
>`foo2` : "foo2"
|
||||
}
|
||||
|
||||
function bar() {
|
||||
>bar : () => void
|
||||
|
||||
tag `bar`;
|
||||
>tag `bar` : string
|
||||
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
|
||||
>`bar` : "bar"
|
||||
|
||||
tag `bar2`;
|
||||
>tag `bar2` : string
|
||||
>tag : (parts: TemplateStringsArray, ...values: any[]) => string
|
||||
>`bar2` : "bar2"
|
||||
}
|
||||
|
||||
foo();
|
||||
>foo() : void
|
||||
>foo : () => void
|
||||
|
||||
bar();
|
||||
>bar() : void
|
||||
>bar : () => void
|
||||
|
|
@ -49,7 +49,7 @@ function id(x) {
|
|||
return x;
|
||||
}
|
||||
function templateObjectFactory() {
|
||||
return id(_a || (_a = __makeTemplateObject(["hello world"], ["hello world"])));
|
||||
return id(templateObject_1 || (templateObject_1 = __makeTemplateObject(["hello world"], ["hello world"])));
|
||||
}
|
||||
var result = templateObjectFactory() === templateObjectFactory();
|
||||
var _a;
|
||||
var templateObject_1;
|
||||
|
|
Loading…
Reference in a new issue