Update Baselines and/or Applied Lint Fixes

This commit is contained in:
TypeScript Bot 2022-12-07 18:05:05 +00:00
Родитель 9c00001a26
Коммит bef1da1ba3
45 изменённых файлов: 246 добавлений и 461 удалений

Просмотреть файл

@ -1,21 +0,0 @@
//// [NonNullableInNonStrictMode.ts]
// These should all resolve to never
type T0 = NonNullable<null>;
type T1 = NonNullable<undefined>;
type T2 = null & {};
type T3 = undefined & {};
type T4 = null & undefined;
type T6 = null & { a: string } & {};
// Repro from #50519
type NonNullableNew<T> = T & {};
type NonNullableOld<T> = T extends null | undefined ? never : T;
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
type IsAlwaysNever = NonNullableOld<null>;
//// [NonNullableInNonStrictMode.js]
// These should all resolve to never

Просмотреть файл

@ -1,45 +0,0 @@
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
// These should all resolve to never
type T0 = NonNullable<null>;
>T0 : Symbol(T0, Decl(NonNullableInNonStrictMode.ts, 0, 0))
>NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --))
type T1 = NonNullable<undefined>;
>T1 : Symbol(T1, Decl(NonNullableInNonStrictMode.ts, 2, 28))
>NonNullable : Symbol(NonNullable, Decl(lib.es5.d.ts, --, --))
type T2 = null & {};
>T2 : Symbol(T2, Decl(NonNullableInNonStrictMode.ts, 3, 33))
type T3 = undefined & {};
>T3 : Symbol(T3, Decl(NonNullableInNonStrictMode.ts, 4, 20))
type T4 = null & undefined;
>T4 : Symbol(T4, Decl(NonNullableInNonStrictMode.ts, 5, 25))
type T6 = null & { a: string } & {};
>T6 : Symbol(T6, Decl(NonNullableInNonStrictMode.ts, 6, 27))
>a : Symbol(a, Decl(NonNullableInNonStrictMode.ts, 7, 18))
// Repro from #50519
type NonNullableNew<T> = T & {};
>NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36))
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20))
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 11, 20))
type NonNullableOld<T> = T extends null | undefined ? never : T;
>NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32))
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
>T : Symbol(T, Decl(NonNullableInNonStrictMode.ts, 12, 20))
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
>IsNullWithoutStrictNullChecks : Symbol(IsNullWithoutStrictNullChecks, Decl(NonNullableInNonStrictMode.ts, 12, 64))
>NonNullableNew : Symbol(NonNullableNew, Decl(NonNullableInNonStrictMode.ts, 7, 36))
type IsAlwaysNever = NonNullableOld<null>;
>IsAlwaysNever : Symbol(IsAlwaysNever, Decl(NonNullableInNonStrictMode.ts, 14, 58))
>NonNullableOld : Symbol(NonNullableOld, Decl(NonNullableInNonStrictMode.ts, 11, 32))

Просмотреть файл

@ -1,43 +0,0 @@
=== tests/cases/compiler/NonNullableInNonStrictMode.ts ===
// These should all resolve to never
type T0 = NonNullable<null>;
>T0 : never
>null : null
type T1 = NonNullable<undefined>;
>T1 : never
type T2 = null & {};
>T2 : never
>null : null
type T3 = undefined & {};
>T3 : never
type T4 = null & undefined;
>T4 : never
>null : null
type T6 = null & { a: string } & {};
>T6 : never
>null : null
>a : string
// Repro from #50519
type NonNullableNew<T> = T & {};
>NonNullableNew : NonNullableNew<T>
type NonNullableOld<T> = T extends null | undefined ? never : T;
>NonNullableOld : NonNullableOld<T>
>null : null
type IsNullWithoutStrictNullChecks = NonNullableNew<null>;
>IsNullWithoutStrictNullChecks : never
>null : null
type IsAlwaysNever = NonNullableOld<null>;
>IsAlwaysNever : never
>null : null

Просмотреть файл

@ -12,7 +12,12 @@ var h = tag `Hello` as string;
//// [asOperator3.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var a = "".concat(123 + 456);

Просмотреть файл

@ -13,7 +13,12 @@ as(Foo); // should emit
//// [asOperatorASI.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var Foo = /** @class */ (function () {

Просмотреть файл

@ -1,116 +0,0 @@
// === /tests/cases/fourslash/findAllRefsOnDefinition-import.ts ===
// export class Test{
//
// constructor(){
//
// }
//
// public /*FIND ALL REFS*/[|start|](){
// return this;
// }
//
// public stop(){
// return this;
// }
// }
// === /tests/cases/fourslash/findAllRefsOnDefinition.ts ===
// import Second = require("./findAllRefsOnDefinition-import");
//
// var second = new Second.Test()
// second.[|start|]();
// second.stop();
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/findAllRefsOnDefinition-import.ts",
"kind": "method",
"name": "(method) Test.start(): this",
"textSpan": {
"start": 58,
"length": 5
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "method",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "Test",
"kind": "className"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "start",
"kind": "methodName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "this",
"kind": "keyword"
}
],
"contextSpan": {
"start": 51,
"length": 42
}
},
"references": [
{
"textSpan": {
"start": 58,
"length": 5
},
"fileName": "/tests/cases/fourslash/findAllRefsOnDefinition-import.ts",
"contextSpan": {
"start": 51,
"length": 42
},
"isWriteAccess": true,
"isDefinition": true
},
{
"textSpan": {
"start": 100,
"length": 5
},
"fileName": "/tests/cases/fourslash/findAllRefsOnDefinition.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]

Просмотреть файл

@ -94,7 +94,12 @@ const testRegExpUnicode = /abc/g.unicode;
//// [doYouNeedToChangeYourTargetLibraryES2015.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
// es2015

Просмотреть файл

@ -1,195 +0,0 @@
// === /tests/cases/fourslash/a.ts ===
// interface A {
// /*FIND ALL REFS*/[|foo|]: string;
// }
// === /tests/cases/fourslash/b.ts ===
// ///<reference path='a.ts'/>
//
//
// function foo(x: A) {
// x.[|foo|]
// }
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/a.ts",
"kind": "property",
"name": "(property) A.foo: string",
"textSpan": {
"start": 18,
"length": 3
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "A",
"kind": "interfaceName"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "foo",
"kind": "propertyName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"contextSpan": {
"start": 18,
"length": 12
}
},
"references": [
{
"textSpan": {
"start": 18,
"length": 3
},
"fileName": "/tests/cases/fourslash/a.ts",
"contextSpan": {
"start": 18,
"length": 12
},
"isWriteAccess": false,
"isDefinition": true
},
{
"textSpan": {
"start": 57,
"length": 3
},
"fileName": "/tests/cases/fourslash/b.ts",
"isWriteAccess": false,
"isDefinition": false
}
]
}
]
// === /tests/cases/fourslash/a.ts ===
// interface A {
// [|foo|]: string;
// }
// === /tests/cases/fourslash/b.ts ===
// ///<reference path='a.ts'/>
//
//
// function foo(x: A) {
// x./*FIND ALL REFS*/[|foo|]
// }
[
{
"definition": {
"containerKind": "",
"containerName": "",
"fileName": "/tests/cases/fourslash/a.ts",
"kind": "property",
"name": "(property) A.foo: string",
"textSpan": {
"start": 18,
"length": 3
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "property",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "A",
"kind": "interfaceName"
},
{
"text": ".",
"kind": "punctuation"
},
{
"text": "foo",
"kind": "propertyName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"contextSpan": {
"start": 18,
"length": 12
}
},
"references": [
{
"textSpan": {
"start": 18,
"length": 3
},
"fileName": "/tests/cases/fourslash/a.ts",
"contextSpan": {
"start": 18,
"length": 12
},
"isWriteAccess": false
},
{
"textSpan": {
"start": 57,
"length": 3
},
"fileName": "/tests/cases/fourslash/b.ts",
"isWriteAccess": false
}
]
}
]

Просмотреть файл

@ -13,7 +13,12 @@ expect(fooFn<number>``);
//// [genericTemplateOverloadResolution.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
expect(fooFn(__makeTemplateObject([""], [""])));

Просмотреть файл

@ -103,7 +103,12 @@ var __extends = (this && this.__extends) || (function () {
};
})();
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

Просмотреть файл

@ -27,7 +27,12 @@ const a14 = tag`${ 100 }\x00` // \x00
//// [invalidTaggedTemplateEscapeSequences.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function tag(str, ...args) {

Просмотреть файл

@ -27,7 +27,12 @@ const a14 = tag`${ 100 }\x00` // \x00
//// [invalidTaggedTemplateEscapeSequences.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function tag(str) {

Просмотреть файл

@ -16,7 +16,12 @@ export default function Component() {
//// [jsxImportSourceNonPragmaComment.jsx]
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
exports.__esModule = true;

Просмотреть файл

@ -6,7 +6,12 @@ var array = [
//// [missingCommaInTemplateStringsArray.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var array = [

Просмотреть файл

@ -6,7 +6,12 @@ a?.`b${1}c`;
//// [taggedTemplateChain.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
a(__makeTemplateObject(["b"], ["b"]));

Просмотреть файл

@ -10,7 +10,12 @@ let result: number = foo`${x}`;
//// [taggedTemplateStringWithSymbolExpression01.js]
// taggedTemplateStringWithSymbolExpression01.ts
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var x;

Просмотреть файл

@ -6,7 +6,12 @@ f `\x0D${ "Interrupted CRLF" }\x0A`;
//// [taggedTemplateStringsHexadecimalEscapes.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f() {

Просмотреть файл

@ -7,7 +7,12 @@ f `0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2028 2029 0085 t v f b r
//// [taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f() {

Просмотреть файл

@ -93,7 +93,12 @@ var arr: any[];
//// [taggedTemplateStringsTypeArgumentInference.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
// Generic tag with one parameter

Просмотреть файл

@ -13,7 +13,12 @@ f({ x: (() => 1)(), ...{ y: 1 } })``;
//// [taggedTemplateStringsWithCurriedFunction.js]
// Originated from #38558
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var __assign = (this && this.__assign) || function () {

Просмотреть файл

@ -35,7 +35,12 @@ f.thisIsNotATag(`abc${1}def${2}ghi`);
//// [taggedTemplateStringsWithIncompatibleTypedTags.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var f;

Просмотреть файл

@ -17,7 +17,12 @@ var x = new new new f `abc${ 0 }def`.member("hello")(42) === true;
//// [taggedTemplateStringsWithManyCallAndMemberExpressions.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var f;

Просмотреть файл

@ -9,7 +9,12 @@ f `
//// [taggedTemplateStringsWithMultilineTemplate.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f() {

Просмотреть файл

@ -24,7 +24,12 @@ var z = foo `${1}${2}${3}`; // any (with error)
//// [taggedTemplateStringsWithOverloadResolution1.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function foo() {

Просмотреть файл

@ -19,7 +19,12 @@ var d = foo2([], 1);
//// [taggedTemplateStringsWithOverloadResolution2.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function foo1() {

Просмотреть файл

@ -74,7 +74,12 @@ fn5 `${ (n) => n.substr(0) }`;
//// [taggedTemplateStringsWithOverloadResolution3.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function fn1() { return null; }

Просмотреть файл

@ -6,7 +6,12 @@ declare `Hello ${0} world!`;
//// [taggedTemplateStringsWithTagNamedDeclare.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function declare(x) {

Просмотреть файл

@ -27,7 +27,12 @@ f.thisIsNotATag(`abc${1}def${2}ghi`);
//// [taggedTemplateStringsWithTagsTypedAsAny.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var f;

Просмотреть файл

@ -6,7 +6,12 @@ foo `${function (x: number) { x = "bad"; } }`;
//// [taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function foo() {

Просмотреть файл

@ -33,7 +33,12 @@ f.thisIsNotATag(`abc${1}def${2}ghi`);
//// [taggedTemplateStringsWithTypedTags.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var f;

Просмотреть файл

@ -6,7 +6,12 @@ f `'\u{1f4a9}'${ " should be converted to " }'\uD83D\uDCA9'`;
//// [taggedTemplateStringsWithUnicodeEscapes.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f() {

Просмотреть файл

@ -6,7 +6,12 @@ f `\t\n\v\f\r\\`;
//// [taggedTemplateStringsWithWhitespaceEscapes.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f() {

Просмотреть файл

@ -4,7 +4,12 @@ tag `Hello world!`;
//// [taggedTemplateUntypedTagCall01.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var tag;

Просмотреть файл

@ -5,7 +5,12 @@ CtorTag `Hello world!`;
//// [taggedTemplateWithConstructableTag01.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var CtorTag = /** @class */ (function () {

Просмотреть файл

@ -8,7 +8,12 @@ tag `Hello world!`;
//// [taggedTemplateWithConstructableTag02.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var tag;

Просмотреть файл

@ -19,7 +19,12 @@ 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; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
exports.__esModule = true;

Просмотреть файл

@ -25,7 +25,12 @@ let result = templateObjectFactory() === templateObjectFactory();
//// [global.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var n;
@ -41,7 +46,12 @@ var n;
//// [module.js]
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
Object.defineProperty(exports, "__esModule", { value: true });

Просмотреть файл

@ -7,7 +7,12 @@ declare module `M${2}` {
//// [templateStringInModuleName.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
declare;

Просмотреть файл

@ -6,7 +6,12 @@ var x = {
//// [templateStringInObjectLiteral.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var x = {

Просмотреть файл

@ -5,7 +5,12 @@ var x = {
//// [templateStringInPropertyName1.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var x = {}(__makeTemplateObject(["a"], ["a"]));

Просмотреть файл

@ -5,7 +5,12 @@ var x = {
//// [templateStringInPropertyName2.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var x = {}(__makeTemplateObject(["abc", "def", "ghi"], ["abc", "def", "ghi"]), 123, 456);

Просмотреть файл

@ -3,7 +3,12 @@
//// [templateStringInTaggedTemplate.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
"I AM THE ".concat("".concat("TAG", " "), " PORTION")(__makeTemplateObject(["I ", " THE TEMPLATE PORTION"], ["I ", " THE TEMPLATE PORTION"]), "AM");

Просмотреть файл

@ -11,7 +11,12 @@ f `abcdef${ 1234 }${ 5678 }ghijkl`;
//// [templateStringsArrayTypeDefinedInES5Mode.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
var TemplateStringsArray = /** @class */ (function () {

Просмотреть файл

@ -8,7 +8,12 @@ f `abcdef${ 1234 }${ 5678 }ghijkl`;
//// [templateStringsArrayTypeNotDefinedES5Mode.js]
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
function f(x, y, z) {

Просмотреть файл

@ -1,5 +1,10 @@
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
if (Object.freeze) {
Object.freeze(Object.defineProperty(cooked, "raw", { value: Object.freeze(raw) }));
}
else {
cooked.raw = raw;
}
return cooked;
};
$tpl(__makeTemplateObject(["foo"], ["foo"]));