Remove even more

This commit is contained in:
Jake Bailey
2025-10-24 12:30:46 -07:00
parent 1cd78aa245
commit 300eae56f7
155 changed files with 559 additions and 1681 deletions
+1 -30
View File
@@ -16,7 +16,6 @@ import {
FunctionExpression,
GeneratedIdentifierFlags,
getEmitFlags,
getEmitScriptTarget,
getPropertyNameOfBindingOrAssignmentElement,
Identifier,
InternalEmitFlags,
@@ -28,7 +27,6 @@ import {
ObjectLiteralElementLike,
ParameterDeclaration,
PrivateIdentifier,
ScriptTarget,
setEmitFlags,
setInternalEmitFlags,
setTextRange,
@@ -400,15 +398,7 @@ export function createEmitHelperFactory(context: TransformationContext): EmitHel
// ES2018 Helpers
function createAssignHelper(attributesSegments: Expression[]) {
if (getEmitScriptTarget(context.getCompilerOptions()) >= ScriptTarget.ES2015) {
return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"), /*typeArguments*/ undefined, attributesSegments);
}
context.requestEmitHelper(assignHelper);
return factory.createCallExpression(
getUnscopedHelperName("__assign"),
/*typeArguments*/ undefined,
attributesSegments,
);
return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"), /*typeArguments*/ undefined, attributesSegments);
}
function createAwaitHelper(expression: Expression) {
@@ -816,25 +806,6 @@ const runInitializersHelper: UnscopedEmitHelper = {
// ES2018 Helpers
const assignHelper: UnscopedEmitHelper = {
name: "typescript:assign",
importName: "__assign",
scoped: false,
priority: 1,
text: `
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};`,
};
const awaitHelper: UnscopedEmitHelper = {
name: "typescript:await",
importName: "__await",
+1 -3
View File
@@ -6665,9 +6665,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
}
else if (isSuperKeyword(callee)) {
thisArg = createThis();
target = languageVersion !== undefined && languageVersion < ScriptTarget.ES2015
? setTextRange(createIdentifier("_super"), callee)
: callee as PrimaryExpression;
target = callee as PrimaryExpression;
}
else if (getEmitFlags(callee) & EmitFlags.HelperName) {
thisArg = createVoidZero();
+5 -14
View File
@@ -11655,13 +11655,6 @@ export function createNameResolver({
}
}
break;
case SyntaxKind.ArrowFunction:
// when targeting ES6 or higher there is no 'arguments' in an arrow function
// for lower compile targets the resolved symbol is used to emit an error
if (getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015) {
break;
}
// falls through
case SyntaxKind.MethodDeclaration:
case SyntaxKind.Constructor:
case SyntaxKind.GetAccessor:
@@ -11835,14 +11828,12 @@ export function createNameResolver({
// - optional chaining pre-es2020
// - nullish coalesce pre-es2020
// - spread assignment in binding pattern pre-es2017
if (target >= ScriptTarget.ES2015) {
let declarationRequiresScopeChange = getRequiresScopeChangeCache(functionLocation);
if (declarationRequiresScopeChange === undefined) {
declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false;
setRequiresScopeChangeCache(functionLocation, declarationRequiresScopeChange);
}
return !declarationRequiresScopeChange;
let declarationRequiresScopeChange = getRequiresScopeChangeCache(functionLocation);
if (declarationRequiresScopeChange === undefined) {
declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false;
setRequiresScopeChangeCache(functionLocation, declarationRequiresScopeChange);
}
return !declarationRequiresScopeChange;
}
return false;
+1 -6
View File
@@ -6,7 +6,6 @@ import {
factory,
FunctionBody,
getEmitFlags,
getEmitScriptTarget,
HasChildren,
Identifier,
isArray,
@@ -93,7 +92,6 @@ import {
NodeVisitor,
nullTransformationContext,
ParameterDeclaration,
ScriptTarget,
setEmitFlags,
setTextRange,
setTextRangePosEnd,
@@ -405,10 +403,7 @@ export function visitParameterList(nodes: NodeArray<ParameterDeclaration> | unde
// exists in a different lexical scope. To address this, we move any binding patterns and initializers
// in a parameter list to the body if we detect a variable being hoisted while visiting a parameter list
// when the emit target is greater than ES2015.
if (
context.getLexicalEnvironmentFlags() & LexicalEnvironmentFlags.VariablesHoistedInParameters &&
getEmitScriptTarget(context.getCompilerOptions()) >= ScriptTarget.ES2015
) {
if (context.getLexicalEnvironmentFlags() & LexicalEnvironmentFlags.VariablesHoistedInParameters) {
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
}
context.setLexicalEnvironmentFlags(LexicalEnvironmentFlags.InParameters, false);
@@ -31,26 +31,15 @@ function foo2() {
//// [anyAndUnknownHaveFalsyComponents.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
const y1 = x1 && 3;
function foo1() {
return __assign({ display: "block" }, (isTreeHeader1 && {
return Object.assign({ display: "block" }, (isTreeHeader1 && {
display: "flex",
}));
}
const y2 = x2 && 3;
function foo2() {
return __assign({ display: "block" }, (isTreeHeader1 && {
return Object.assign({ display: "block" }, (isTreeHeader1 && {
display: "flex",
}));
}
@@ -21,23 +21,28 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
function foo(y = (_a = class {
get [x]() { return x; }
constructor() { x; }
[z]() { return z; }
},
__setFunctionName(_a, "y"),
_a.c = x,
_a), x = 1, z = 2) {
function foo(y, x, z) {
var _a;
if (y === void 0) { y = (_a = class {
get [x]() { return x; }
constructor() { x; }
[z]() { return z; }
},
__setFunctionName(_a, "y"),
_a.c = x,
_a); }
if (x === void 0) { x = 1; }
if (z === void 0) { z = 2; }
y.c;
}
function foo2(y = (_a = class {
constructor() {
this[_b] = x;
}
},
_b = x,
_a), x = 1) {
var _b, _a;
function foo2(y, x) {
var _a, _b;
if (y === void 0) { y = (_b = class {
constructor() {
this[_a] = x;
}
},
_a = x,
_b); }
if (x === void 0) { x = 1; }
}
@@ -6,7 +6,7 @@
//// [classWithStaticFieldInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
(({ [(_a = class {
((_a) => { var _b; var { [(_b = class {
},
_a.x = 1,
_a).x]: b = "" }) => { var _a; })();
_b.x = 1,
_b).x]: b = "" } = _a; })();
@@ -10,8 +10,8 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
// https://github.com/microsoft/TypeScript/issues/36295
((b = (_a = class {
((b) => { var _a; if (b === void 0) { b = (_a = class {
},
__setFunctionName(_a, "b"),
_a.x = 1,
_a)) => { var _a; })();
_a); } })();
@@ -9,16 +9,5 @@ i = { ...{ a: "a" } };
//// [contextualTypeObjectSpreadExpression.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let i;
i = __assign({ a: "a" });
i = Object.assign({ a: "a" });
@@ -33,21 +33,10 @@ function createInstance() {
}
//// [index.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.spread = void 0;
const bug_1 = require("./bug");
exports.spread = __assign({}, (0, bug_1.createInstance)());
exports.spread = Object.assign({}, (0, bug_1.createInstance)());
//// [bug.d.ts]
@@ -6,17 +6,6 @@ export const SpotifyAgeGroupEnum = { ...AgeGroups };
//// [declarationEmitSpreadStringlyKeyedEnum.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpotifyAgeGroupEnum = void 0;
var AgeGroups;
@@ -29,7 +18,7 @@ var AgeGroups;
AgeGroups[AgeGroups["45-59"] = 5] = "45-59";
AgeGroups[AgeGroups["60-150"] = 6] = "60-150";
})(AgeGroups || (AgeGroups = {}));
exports.SpotifyAgeGroupEnum = __assign({}, AgeGroups);
exports.SpotifyAgeGroupEnum = Object.assign({}, AgeGroups);
//// [declarationEmitSpreadStringlyKeyedEnum.d.ts]
@@ -46,23 +46,12 @@ class A {
exports.A = A;
//// [index.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.B = void 0;
const class_1 = require("./class");
class B extends class_1.A {
getA() {
return __assign(__assign({}, super.getA()), { a: '123' });
return Object.assign(Object.assign({}, super.getA()), { a: '123' });
}
}
exports.B = B;
@@ -46,17 +46,6 @@ void p3.result.three;
"use strict";
// Note that both of the following have an `any` in their return type from where we bottom out the type printout
// for having too many instances of the same symbol nesting.
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.testRecFun = exports.updateIfChanged = void 0;
const updateIfChanged = (t) => {
@@ -73,7 +62,7 @@ exports.updateIfChanged = updateIfChanged;
const testRecFun = (parent) => {
return {
result: parent,
deeper: (child) => (0, exports.testRecFun)(__assign(__assign({}, parent), child))
deeper: (child) => (0, exports.testRecFun)(Object.assign(Object.assign({}, parent), child))
};
};
exports.testRecFun = testRecFun;
@@ -9,15 +9,4 @@ const { a } = { ...x } // error
//// [destructuringFromUnionSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
const { a } = __assign({}, x); // error
const { a } = Object.assign({}, x); // error
@@ -29,17 +29,6 @@ f(([_1, _2 = undefined]) => undefined)
//// [destructuringInitializerContextualTypeFromContext.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -53,7 +42,7 @@ var __rest = (this && this.__rest) || function (s, e) {
};
const Parent = (_a) => {
var { children, name = "Artemis" } = _a, props = __rest(_a, ["children", "name"]);
return Child(__assign({ name }, props));
return Child(Object.assign({ name }, props));
};
const Child = (_a) => {
var { children, name = "Artemis" } = _a, props = __rest(_a, ["children", "name"]);
@@ -31,20 +31,9 @@ const { c, d, e, f, g } = {
//// [destructuringSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
const { x } = __assign({}, { x: 0 });
const { y } = __assign({ y: 0 }, {});
const { z, a, b } = __assign({ z: 0 }, { a: 0, b: 0 });
const { c, d, e, f, g } = __assign(__assign({}, __assign(__assign({}, __assign({
const { x } = Object.assign({}, { x: 0 });
const { y } = Object.assign({ y: 0 }, {});
const { z, a, b } = Object.assign({ z: 0 }, { a: 0, b: 0 });
const { c, d, e, f, g } = Object.assign(Object.assign({}, Object.assign(Object.assign({}, Object.assign({
c: 0,
}, { d: 0 })), { e: 0 })), { f: 0 });
@@ -1,14 +1,14 @@
emitArrowFunctionWhenUsingArguments01.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
emitArrowFunctionWhenUsingArguments01.ts(2,15): error TS2304: Cannot find name 'arguments'.
emitArrowFunctionWhenUsingArguments01.ts(7,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
emitArrowFunctionWhenUsingArguments01.ts(13,13): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
emitArrowFunctionWhenUsingArguments01.ts(19,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
emitArrowFunctionWhenUsingArguments01.ts(19,15): error TS2304: Cannot find name 'arguments'.
==== emitArrowFunctionWhenUsingArguments01.ts (4 errors) ====
var a = () => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
!!! error TS2304: Cannot find name 'arguments'.
}
var b = function () {
@@ -31,7 +31,7 @@ emitArrowFunctionWhenUsingArguments01.ts(19,15): error TS2496: The 'arguments' o
foo(() => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
!!! error TS2304: Cannot find name 'arguments'.
});
function bar() {
@@ -6,7 +6,6 @@ var a = () => {
var arg = arguments[0]; // error
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01.ts, 1, 7))
>arguments : Symbol(arguments)
}
var b = function () {
@@ -40,7 +39,6 @@ foo(() => {
var arg = arguments[0]; // error
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01.ts, 18, 7))
>arguments : Symbol(arguments)
});
@@ -12,8 +12,8 @@ var a = () => {
> : ^^^
>arguments[0] : any
> : ^^^
>arguments : IArguments
> : ^^^^^^^^^^
>arguments : any
> : ^^^
>0 : 0
> : ^
}
@@ -81,8 +81,8 @@ foo(() => {
> : ^^^
>arguments[0] : any
> : ^^^
>arguments : IArguments
> : ^^^^^^^^^^
>arguments : any
> : ^^^
>0 : 0
> : ^
@@ -1,7 +1,7 @@
emitArrowFunctionWhenUsingArguments02.ts(1,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
emitArrowFunctionWhenUsingArguments02.ts(1,15): error TS2304: Cannot find name 'arguments'.
==== emitArrowFunctionWhenUsingArguments02.ts (1 errors) ====
var a = () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
!!! error TS2304: Cannot find name 'arguments'.
@@ -3,5 +3,4 @@
=== emitArrowFunctionWhenUsingArguments02.ts ===
var a = () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments02.ts, 0, 3))
>arguments : Symbol(arguments)
@@ -2,10 +2,10 @@
=== emitArrowFunctionWhenUsingArguments02.ts ===
var a = () => arguments;
>a : () => IArguments
> : ^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => any
> : ^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
> : ^^^
@@ -1,8 +0,0 @@
emitArrowFunctionWhenUsingArguments03.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments03.ts (1 errors) ====
var arguments;
var a = () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
@@ -6,5 +6,5 @@ var arguments;
var a = () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03.ts, 1, 3))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03.ts, 0, 3))
@@ -3,13 +3,11 @@
=== emitArrowFunctionWhenUsingArguments03.ts ===
var arguments;
>arguments : any
> : ^^^
var a = () => arguments;
>a : () => IArguments
> : ^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => any
> : ^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
@@ -1,10 +0,0 @@
emitArrowFunctionWhenUsingArguments04.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments04.ts (1 errors) ====
function f() {
var arguments;
var a = () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
@@ -9,5 +9,5 @@ function f() {
var a = () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04.ts, 2, 7))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04.ts, 1, 7))
}
@@ -7,13 +7,11 @@ function f() {
var arguments;
>arguments : any
> : ^^^
var a = () => arguments;
>a : () => IArguments
> : ^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => any
> : ^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
}
@@ -1,9 +0,0 @@
emitArrowFunctionWhenUsingArguments05.ts(2,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments05.ts (1 errors) ====
function f(arguments) {
var a = () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
@@ -7,5 +7,5 @@ function f(arguments) {
var a = () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05.ts, 1, 7))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05.ts, 0, 11))
}
@@ -5,13 +5,11 @@ function f(arguments) {
>f : (arguments: any) => void
> : ^ ^^^^^^^^^^^^^^
>arguments : any
> : ^^^
var a = () => arguments;
>a : () => IArguments
> : ^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => any
> : ^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
}
@@ -1,9 +0,0 @@
emitArrowFunctionWhenUsingArguments06.ts(2,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments06.ts (1 errors) ====
function f(arguments) {
var a = () => () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
@@ -7,5 +7,5 @@ function f(arguments) {
var a = () => () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06.ts, 1, 7))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06.ts, 0, 11))
}
@@ -5,15 +5,13 @@ function f(arguments) {
>f : (arguments: any) => void
> : ^ ^^^^^^^^^^^^^^
>arguments : any
> : ^^^
var a = () => () => arguments;
>a : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>() => () => arguments : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => () => any
> : ^^^^^^^^^^^^^^^
>() => () => arguments : () => () => any
> : ^^^^^^^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
}
@@ -1,9 +0,0 @@
emitArrowFunctionWhenUsingArguments07.ts(2,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments07.ts (1 errors) ====
function f(arguments) {
var a = (arguments) => () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
@@ -8,5 +8,5 @@ function f(arguments) {
var a = (arguments) => () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 7))
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07.ts, 1, 13))
}
@@ -5,17 +5,14 @@ function f(arguments) {
>f : (arguments: any) => void
> : ^ ^^^^^^^^^^^^^^
>arguments : any
> : ^^^
var a = (arguments) => () => arguments;
>a : (arguments: any) => () => IArguments
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
>(arguments) => () => arguments : (arguments: any) => () => IArguments
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
>a : (arguments: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>(arguments) => () => arguments : (arguments: any) => () => any
> : ^ ^^^^^^^^^^^^^^^^^^^
>arguments : any
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
> : ^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
}
@@ -1,10 +0,0 @@
emitArrowFunctionWhenUsingArguments11.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments11.ts (1 errors) ====
function f(arguments) {
var _arguments = 10;
var a = () => () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
@@ -10,5 +10,5 @@ function f(arguments) {
var a = () => () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11.ts, 2, 7))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11.ts, 0, 11))
}
@@ -5,7 +5,6 @@ function f(arguments) {
>f : (arguments: any) => void
> : ^ ^^^^^^^^^^^^^^
>arguments : any
> : ^^^
var _arguments = 10;
>_arguments : number
@@ -14,12 +13,11 @@ function f(arguments) {
> : ^^
var a = () => () => arguments;
>a : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>() => () => arguments : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => () => any
> : ^^^^^^^^^^^^^^^
>() => () => arguments : () => () => any
> : ^^^^^^^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
}
@@ -1,14 +1,11 @@
emitArrowFunctionWhenUsingArguments12.ts(2,7): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
emitArrowFunctionWhenUsingArguments12.ts(3,23): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments12.ts (2 errors) ====
==== emitArrowFunctionWhenUsingArguments12.ts (1 errors) ====
class C {
f(arguments) {
~~~~~~~~~
!!! error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'arguments'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
var a = () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
}
@@ -10,6 +10,6 @@ class C {
var a = () => arguments;
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments12.ts, 2, 11))
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments12.ts, 1, 6))
}
}
@@ -12,11 +12,11 @@ class C {
> : ^^^
var a = () => arguments;
>a : () => IArguments
> : ^^^^^^^^^^^^^^^^
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>a : () => any
> : ^^^^^^^^^
>() => arguments : () => any
> : ^^^^^^^^^
>arguments : any
> : ^^^
}
}
@@ -1,12 +0,0 @@
emitArrowFunctionWhenUsingArguments14.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments14.ts (1 errors) ====
function f() {
if (Math.random()) {
const arguments = 100;
return () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
}
@@ -13,6 +13,6 @@ function f() {
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13))
return () => arguments;
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14.ts, 2, 13))
}
}
@@ -2,8 +2,8 @@
=== emitArrowFunctionWhenUsingArguments14.ts ===
function f() {
>f : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>f : () => () => number
> : ^^^^^^^^^^^^^^^^^^
if (Math.random()) {
>Math.random() : number
@@ -22,9 +22,9 @@ function f() {
> : ^^^
return () => arguments;
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>() => arguments : () => number
> : ^^^^^^^^^^^^
>arguments : 100
> : ^^^
}
}
@@ -1,13 +0,0 @@
emitArrowFunctionWhenUsingArguments15.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments15.ts (1 errors) ====
function f() {
var arguments = "hello";
if (Math.random()) {
const arguments = 100;
return () => arguments;
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
}
@@ -16,6 +16,6 @@ function f() {
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13))
return () => arguments;
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15.ts, 3, 13))
}
}
@@ -2,8 +2,8 @@
=== emitArrowFunctionWhenUsingArguments15.ts ===
function f() {
>f : () => () => IArguments
> : ^^^^^^^^^^^^^^^^^^^^^^
>f : () => () => number
> : ^^^^^^^^^^^^^^^^^^
var arguments = "hello";
>arguments : string
@@ -28,9 +28,9 @@ function f() {
> : ^^^
return () => arguments;
>() => arguments : () => IArguments
> : ^^^^^^^^^^^^^^^^
>arguments : IArguments
> : ^^^^^^^^^^
>() => arguments : () => number
> : ^^^^^^^^^^^^
>arguments : 100
> : ^^^
}
}
@@ -1,13 +0,0 @@
emitArrowFunctionWhenUsingArguments16.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments16.ts (1 errors) ====
function f() {
var arguments = "hello";
if (Math.random()) {
return () => arguments[0];
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
var arguments = "world";
}
@@ -13,7 +13,7 @@ function f() {
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
return () => arguments[0];
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7))
}
var arguments = "world";
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16.ts, 1, 7), Decl(emitArrowFunctionWhenUsingArguments16.ts, 5, 7))
@@ -2,8 +2,8 @@
=== emitArrowFunctionWhenUsingArguments16.ts ===
function f() {
>f : () => () => any
> : ^^^^^^^^^^^^^^^
>f : () => () => string
> : ^^^^^^^^^^^^^^^^^^
var arguments = "hello";
>arguments : string
@@ -22,12 +22,12 @@ function f() {
> : ^^^^^^
return () => arguments[0];
>() => arguments[0] : () => any
> : ^^^^^^^^^
>arguments[0] : any
> : ^^^
>arguments : IArguments
> : ^^^^^^^^^^
>() => arguments[0] : () => string
> : ^^^^^^^^^^^^
>arguments[0] : string
> : ^^^^^^
>arguments : string
> : ^^^^^^
>0 : 0
> : ^
}
@@ -1,13 +0,0 @@
emitArrowFunctionWhenUsingArguments17.ts(4,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
==== emitArrowFunctionWhenUsingArguments17.ts (1 errors) ====
function f() {
var { arguments } = { arguments: "hello" };
if (Math.random()) {
return () => arguments[0];
~~~~~~~~~
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
}
var arguments = "world";
}
@@ -14,7 +14,7 @@ function f() {
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
return () => arguments[0];
>arguments : Symbol(arguments)
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7))
}
var arguments = "world";
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17.ts, 1, 9), Decl(emitArrowFunctionWhenUsingArguments17.ts, 5, 7))
@@ -2,8 +2,8 @@
=== emitArrowFunctionWhenUsingArguments17.ts ===
function f() {
>f : () => () => any
> : ^^^^^^^^^^^^^^^
>f : () => () => string
> : ^^^^^^^^^^^^^^^^^^
var { arguments } = { arguments: "hello" };
>arguments : string
@@ -26,12 +26,12 @@ function f() {
> : ^^^^^^
return () => arguments[0];
>() => arguments[0] : () => any
> : ^^^^^^^^^
>arguments[0] : any
> : ^^^
>arguments : IArguments
> : ^^^^^^^^^^
>() => arguments[0] : () => string
> : ^^^^^^^^^^^^
>arguments[0] : string
> : ^^^^^^
>arguments : string
> : ^^^^^^
>0 : 0
> : ^
}
@@ -20,16 +20,5 @@ f({ a: 1, ...l, ...r });
//// [excessPropertyCheckWithSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
f(__assign({ a: 1 }, i));
f(__assign(__assign({ a: 1 }, l), r));
f(Object.assign({ a: 1 }, i));
f(Object.assign(Object.assign({ a: 1 }, l), r));
@@ -156,17 +156,6 @@ F2({
//// [excessPropertyCheckWithUnions.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let wrong = { tag: "T", a1: "extra" };
wrong = { tag: "A", d20: 12 };
wrong = { tag: "D" };
@@ -185,7 +174,7 @@ let over;
// these two are still errors despite their doubled up discriminants
over = { a: 1, b: 1, first: "ok", second: "error" };
over = { a: 1, b: 1, first: "ok", third: "error" };
let t2 = __assign({}, t1);
let t2 = Object.assign({}, t1);
t0 = t2;
const abab = {
kind: "A",
@@ -6,16 +6,5 @@ let x: any;
//// [explicitAnyAfterSpreadNoImplicitAnyError.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
(__assign({ a: [] }, null));
(Object.assign({ a: [] }, null));
let x;
@@ -1,10 +1,9 @@
functionImplementationErrors.ts(25,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value.
functionImplementationErrors.ts(30,17): error TS2373: Parameter 'n' cannot reference identifier 'm' declared after it.
functionImplementationErrors.ts(35,17): error TS2373: Parameter 'n' cannot reference identifier 'm' declared after it.
functionImplementationErrors.ts(40,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.
==== functionImplementationErrors.ts (4 errors) ====
==== functionImplementationErrors.ts (3 errors) ====
// FunctionExpression with no return type annotation with multiple return statements with unrelated types
var f1 = function () {
return '';
@@ -37,8 +36,6 @@ functionImplementationErrors.ts(40,1): error TS2839: This condition will always
var m;
// Function signature with parameter initializer referencing in scope local variable
function f6(n = m) {
~
!!! error TS2373: Parameter 'n' cannot reference identifier 'm' declared after it.
var m = 4;
}
@@ -45,7 +45,7 @@ var m;
function f6(n = m) {
>f6 : Symbol(f6, Decl(functionImplementationErrors.ts, 27, 6))
>n : Symbol(n, Decl(functionImplementationErrors.ts, 29, 12))
>m : Symbol(m, Decl(functionImplementationErrors.ts, 30, 7))
>m : Symbol(m, Decl(functionImplementationErrors.ts, 27, 3))
var m = 4;
>m : Symbol(m, Decl(functionImplementationErrors.ts, 30, 7))
@@ -88,12 +88,12 @@ var m;
// Function signature with parameter initializer referencing in scope local variable
function f6(n = m) {
>f6 : (n?: number) => void
> : ^ ^^^^^^^^^^^^^^^^^^
>n : number
> : ^^^^^^
>m : number
> : ^^^^^^
>f6 : (n?: any) => void
> : ^ ^^^^^^^^^^^^^^^
>n : any
> : ^^^
>m : any
> : ^^^
var m = 4;
>m : number
@@ -0,0 +1,34 @@
functionLikeInParameterInitializer.ts(2,34): error TS2304: Cannot find name 'foo'.
functionLikeInParameterInitializer.ts(6,44): error TS2304: Cannot find name 'foo'.
functionLikeInParameterInitializer.ts(11,50): error TS2304: Cannot find name 'foo'.
functionLikeInParameterInitializer.ts(16,41): error TS2304: Cannot find name 'foo'.
==== functionLikeInParameterInitializer.ts (4 errors) ====
// error
export function bar(func = () => foo) {
~~~
!!! error TS2304: Cannot find name 'foo'.
let foo = "in";
}
// error
export function baz1(func = { f() { return foo } }) {
~~~
!!! error TS2304: Cannot find name 'foo'.
let foo = "in";
}
// error
export function baz2(func = function () { return foo }) {
~~~
!!! error TS2304: Cannot find name 'foo'.
let foo = "in";
}
// error
export function baz3(func = class { x = foo }) {
~~~
!!! error TS2304: Cannot find name 'foo'.
let foo = "in";
}
@@ -5,7 +5,6 @@
export function bar(func = () => foo) {
>bar : Symbol(bar, Decl(functionLikeInParameterInitializer.ts, 0, 0))
>func : Symbol(func, Decl(functionLikeInParameterInitializer.ts, 1, 20))
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 2, 7))
let foo = "in";
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 2, 7))
@@ -15,7 +14,6 @@ export function baz1(func = { f() { return foo } }) {
>baz1 : Symbol(baz1, Decl(functionLikeInParameterInitializer.ts, 3, 1))
>func : Symbol(func, Decl(functionLikeInParameterInitializer.ts, 5, 21))
>f : Symbol(f, Decl(functionLikeInParameterInitializer.ts, 5, 29))
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 6, 7))
let foo = "in";
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 6, 7))
@@ -25,7 +23,6 @@ export function baz1(func = { f() { return foo } }) {
export function baz2(func = function () { return foo }) {
>baz2 : Symbol(baz2, Decl(functionLikeInParameterInitializer.ts, 7, 1))
>func : Symbol(func, Decl(functionLikeInParameterInitializer.ts, 10, 21))
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 11, 7))
let foo = "in";
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 11, 7))
@@ -36,7 +33,6 @@ export function baz3(func = class { x = foo }) {
>baz3 : Symbol(baz3, Decl(functionLikeInParameterInitializer.ts, 12, 1))
>func : Symbol(func, Decl(functionLikeInParameterInitializer.ts, 15, 21))
>x : Symbol((Anonymous class).x, Decl(functionLikeInParameterInitializer.ts, 15, 35))
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 16, 7))
let foo = "in";
>foo : Symbol(foo, Decl(functionLikeInParameterInitializer.ts, 16, 7))
@@ -3,14 +3,14 @@
=== functionLikeInParameterInitializer.ts ===
// error
export function bar(func = () => foo) {
>bar : (func?: () => string) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^
>func : () => string
> : ^^^^^^^^^^^^
>() => foo : () => string
> : ^^^^^^^^^^^^
>foo : string
> : ^^^^^^
>bar : (func?: () => any) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^
>func : () => any
> : ^^^^^^^^^
>() => foo : () => any
> : ^^^^^^^^^
>foo : any
> : ^^^
let foo = "in";
>foo : string
@@ -20,16 +20,16 @@ export function bar(func = () => foo) {
}
// error
export function baz1(func = { f() { return foo } }) {
>baz1 : (func?: { f(): string; }) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>func : { f(): string; }
> : ^^^^^^^^^^^^^^^^
>{ f() { return foo } } : { f(): string; }
> : ^^^^^^^^^^^^^^^^
>f : () => string
> : ^^^^^^^^^^^^
>foo : string
> : ^^^^^^
>baz1 : (func?: { f(): any; }) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^
>func : { f(): any; }
> : ^^^^^^^^^^^^^
>{ f() { return foo } } : { f(): any; }
> : ^^^^^^^^^^^^^
>f : () => any
> : ^^^^^^^^^
>foo : any
> : ^^^
let foo = "in";
>foo : string
@@ -40,14 +40,14 @@ export function baz1(func = { f() { return foo } }) {
// error
export function baz2(func = function () { return foo }) {
>baz2 : (func?: () => string) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^
>func : () => string
> : ^^^^^^^^^^^^
>function () { return foo } : () => string
> : ^^^^^^^^^^^^
>foo : string
> : ^^^^^^
>baz2 : (func?: () => any) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^
>func : () => any
> : ^^^^^^^^^
>function () { return foo } : () => any
> : ^^^^^^^^^
>foo : any
> : ^^^
let foo = "in";
>foo : string
@@ -64,10 +64,10 @@ export function baz3(func = class { x = foo }) {
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>class { x = foo } : typeof (Anonymous class)
> : ^^^^^^^^^^^^^^^^^^^^^^^^
>x : string
> : ^^^^^^
>foo : string
> : ^^^^^^
>x : any
> : ^^^
>foo : any
> : ^^^
let foo = "in";
>foo : string
@@ -15,17 +15,6 @@ let o2: { b: string, x: number } = test(o1);
//// [genericIsNeverEmptyObject.js]
"use strict";
// Repro from #29067
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -39,7 +28,7 @@ var __rest = (this && this.__rest) || function (s, e) {
};
function test(obj) {
let { a } = obj, rest = __rest(obj, ["a"]);
return __assign(__assign({}, rest), { b: a });
return Object.assign(Object.assign({}, rest), { b: a });
}
let o1 = { a: 'hello', x: 42 };
let o2 = test(o1);
@@ -23,18 +23,6 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.x = void 0;
const tslib_1 = require("tslib");
exports.x = React.createElement("span", tslib_1.__assign({}, o));
exports.x = React.createElement("span", Object.assign({}, o));
//// [script.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
const x = React.createElement("span", __assign({}, o));
const x = React.createElement("span", Object.assign({}, o));
@@ -67,7 +67,7 @@ C = tslib_1.__decorate([
dec
], C);
const o = { a: 1 };
const y = tslib_1.__assign({}, o);
const y = Object.assign({}, o);
const x = tslib_1.__rest(y, []);
//// [script.js]
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -23,22 +23,11 @@ function test<T extends object>(value: T): Test {
//// [intersectionPropertyCheck.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let obj = { a: { x: 'hello', y: 2 }, c: 5 }; // Nested excess property
let weak = wrong; // Nested weak object type
function foo(x, y) {
x = y; // Mismatched property in source intersection
}
function test(value) {
return __assign(__assign({}, value), { hi: true });
return Object.assign(Object.assign({}, value), { hi: true });
}
@@ -336,17 +336,6 @@ const distantRes = distant({
//// [intraExpressionInferences.js]
"use strict";
// Repros from #47599
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
callIt({
produce: () => 0,
consume: n => n.toFixed()
@@ -458,7 +447,7 @@ branch({
let test1 = u;
}
});
Foo(__assign({
Foo(Object.assign({
a: (x) => 10,
b: (arg) => {
arg.toString();
@@ -613,23 +613,12 @@ export interface ReactSelectProps<TValue = OptionValues> extends React.Props<Rea
//// [jsxComplexSignatureHasApplicabilityError.js]
"use strict";
/// <reference path="react16.d.ts" />
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createReactSingleSelect = createReactSingleSelect;
const React = require("react");
function createReactSingleSelect(WrappedComponent) {
return (props) => {
return (React.createElement(ReactSelectClass, __assign({}, props, { multi: false, autosize: false, value: props.value, onChange: (value) => {
return (React.createElement(ReactSelectClass, Object.assign({}, props, { multi: false, autosize: false, value: props.value, onChange: (value) => {
if (props.onChange) {
props.onChange(value === null ? undefined : value);
}
@@ -21,22 +21,11 @@ const myHoc = <ComposedComponentProps extends any>(
//// [jsxExcessPropsAndAssignability.js]
"use strict";
/// <reference path="react16.d.ts" />
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const myHoc = (ComposedComponent) => {
const WrapperComponent = null;
const props = null;
React.createElement(WrapperComponent, __assign({}, props, { myProp: '1000000' }));
React.createElement(WrapperComponent, __assign({}, props, { myProp: 1000000 }));
React.createElement(WrapperComponent, Object.assign({}, props, { myProp: '1000000' }));
React.createElement(WrapperComponent, Object.assign({}, props, { myProp: 1000000 }));
};
@@ -11,21 +11,10 @@ export {};
//// [jsxJsxsCjsTransformKeyProp.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const jsx_runtime_1 = require("react/jsx-runtime");
/// <reference path="react16.d.ts" />
const props = { answer: 42 };
const a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
const b = (0, react_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { children: "text" }), "foo");
const b = (0, react_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
@@ -11,22 +11,11 @@ export {};
//// [jsxJsxsCjsTransformKeyProp.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
const _jsxFileName = "jsxJsxsCjsTransformKeyProp.tsx";
/// <reference path="react16.d.ts" />
const props = { answer: 42 };
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
const b = (0, react_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", Object.assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
const b = (0, react_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
@@ -11,21 +11,10 @@ export {};
//// [jsxJsxsCjsTransformKeyPropCustomImport.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const preact_1 = require("preact");
const jsx_runtime_1 = require("preact/jsx-runtime");
/// <reference path="react16.d.ts" />
const props = { answer: 42 };
const a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
const b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { children: "text" }), "foo");
const b = (0, preact_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
@@ -11,22 +11,11 @@ export {};
//// [jsxJsxsCjsTransformKeyPropCustomImport.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const preact_1 = require("preact");
const jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
const _jsxFileName = "jsxJsxsCjsTransformKeyPropCustomImport.tsx";
/// <reference path="react16.d.ts" />
const props = { answer: 42 };
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
const b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", Object.assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 10 }, this);
const b = (0, preact_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
@@ -22,38 +22,16 @@ export {};
//// [preact.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const preact_1 = require("preact");
const jsx_runtime_1 = require("preact/jsx-runtime");
/// <reference path="react16.d.ts" />
/* @jsxImportSource preact */
const props = { answer: 42 };
const a = (0, jsx_runtime_1.jsx)("div", __assign({}, props, { children: "text" }), "foo");
const b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { children: "text" }), "foo");
const b = (0, preact_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
//// [react.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const jsx_runtime_1 = require("react/jsx-runtime");
@@ -61,5 +39,5 @@ const jsx_runtime_1 = require("react/jsx-runtime");
/* @jsxImportSource react */
require("./preact");
const props2 = { answer: 42 };
const a2 = (0, jsx_runtime_1.jsx)("div", __assign({}, props2, { children: "text" }), "foo");
const b2 = (0, react_1.createElement)("div", __assign({}, props2, { key: "bar" }), "text");
const a2 = (0, jsx_runtime_1.jsx)("div", Object.assign({}, props2, { children: "text" }), "foo");
const b2 = (0, react_1.createElement)("div", Object.assign({}, props2, { key: "bar" }), "text");
@@ -22,17 +22,6 @@ export {};
//// [preact.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const preact_1 = require("preact");
const jsx_dev_runtime_1 = require("preact/jsx-dev-runtime");
@@ -40,21 +29,10 @@ const _jsxFileName = "preact.tsx";
/// <reference path="react16.d.ts" />
/* @jsxImportSource preact */
const props = { answer: 42 };
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 10 }, this);
const b = (0, preact_1.createElement)("div", __assign({}, props, { key: "bar" }), "text");
const a = (0, jsx_dev_runtime_1.jsxDEV)("div", Object.assign({}, props, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 4, columnNumber: 10 }, this);
const b = (0, preact_1.createElement)("div", Object.assign({}, props, { key: "bar" }), "text");
//// [react.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const jsx_dev_runtime_1 = require("react/jsx-dev-runtime");
@@ -63,5 +41,5 @@ const _jsxFileName = "react.tsx";
/* @jsxImportSource react */
require("./preact");
const props2 = { answer: 42 };
const a2 = (0, jsx_dev_runtime_1.jsxDEV)("div", __assign({}, props2, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 11 }, this);
const b2 = (0, react_1.createElement)("div", __assign({}, props2, { key: "bar" }), "text");
const a2 = (0, jsx_dev_runtime_1.jsxDEV)("div", Object.assign({}, props2, { children: "text" }), "foo", false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 11 }, this);
const b2 = (0, react_1.createElement)("div", Object.assign({}, props2, { key: "bar" }), "text");
@@ -34,17 +34,6 @@ var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
//// [jsxNamespacePrefixInNameReact.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var justElement1 = React.createElement("a:element", null);
var justElement2 = React.createElement("a:element", null);
var justElement3 = React.createElement("a:element", { attr: "value" });
@@ -65,9 +54,9 @@ var justAttribute3 = React.createElement("element", { "a:attr": "value" }, "text
var both1 = React.createElement("a:element", { "a:attr": "value" });
var both2 = React.createElement("a:element", { "k:attr": "value" });
var both3 = React.createElement("a:element", { "a:attr": "value" }, "text");
var endOfIdent1 = React.createElement("a:attr", __assign({}, "value"));
var endOfIdent1 = React.createElement("a:attr", Object.assign({}, "value"));
var endOfIdent2 = React.createElement("a", { "attr:": "value" });
var beginOfIdent1 = < , a, attr = { "value": } / > ;
var beginOfIdent2 = React.createElement("a:attr", __assign({}, "value"));
var beginOfIdent2 = React.createElement("a:attr", Object.assign({}, "value"));
var upcaseComponent1 = React.createElement("ns:Upcase", null); // Parsed as intrinsic
var upcaseComponent2 = React.createElement("Upcase:element", null); // Parsed as instrinsic
@@ -20,17 +20,6 @@ const c = <Info {...infoProps} />;
//// [jsxSpreadFirstUnionNoErrors.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const Info = (props) => props.status === "hidden"
@@ -38,4 +27,4 @@ const Info = (props) => props.status === "hidden"
: react_1.default.createElement("div", null, props.content);
const a = react_1.default.createElement(Info, { status: "hidden" });
const b = react_1.default.createElement(Info, { status: "visible", content: "hello world" });
const c = react_1.default.createElement(Info, __assign({}, infoProps));
const c = react_1.default.createElement(Info, Object.assign({}, infoProps));
@@ -149,17 +149,6 @@ const b: E.A = a;
//// [literalTypeWidening.js]
"use strict";
// Widening vs. non-widening literal types
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -271,7 +260,7 @@ const arr = exports.langCodes.map(code => ({ code }));
// Repro from #29081
function test(obj) {
let { a } = obj, rest = __rest(obj, ["a"]);
return __assign({ a: 'hello' }, rest);
return Object.assign({ a: 'hello' }, rest);
}
var E;
(function (E) {
@@ -89,7 +89,7 @@ __decorate([
], B.prototype, "d", void 0);
__decorate([
PropDeco,
__metadata("design:type", typeof Symbol === "function" ? Symbol : Object)
__metadata("design:type", Symbol)
], B.prototype, "e", void 0);
__decorate([
PropDeco,
@@ -105,5 +105,5 @@ __decorate([
], B.prototype, "h", void 0);
__decorate([
PropDeco,
__metadata("design:type", typeof Symbol === "function" ? Symbol : Object)
__metadata("design:type", Symbol)
], B.prototype, "j", void 0);
@@ -8,4 +8,4 @@ const a = (): string | undefined => undefined;
//// [nullishCoalescingOperatorInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
const a = () => undefined;
(({ [(_a = a()) !== null && _a !== void 0 ? _a : "d"]: c = "" }) => { var _a; })();
((_a) => { var _b; var { [(_b = a()) !== null && _b !== void 0 ? _b : "d"]: c = "" } = _a; })();
@@ -8,4 +8,4 @@ const a = (): string | undefined => undefined;
//// [nullishCoalescingOperatorInParameterInitializer.js]
// https://github.com/microsoft/TypeScript/issues/36295
const a = () => undefined;
((b = (_a = a()) !== null && _a !== void 0 ? _a : "d") => { var _a; })();
((b) => { var _a; if (b === void 0) { b = (_a = a()) !== null && _a !== void 0 ? _a : "d"; } })();
@@ -24,20 +24,9 @@ function f2<T>(a: Item[]) {
//// [objectInstantiationFromUnionSpread.js]
// #40995
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function f1(a) {
a.map(item => (__assign({}, item))).filter(value => { });
a.map(item => (Object.assign({}, item))).filter(value => { });
}
function f2(a) {
a.map(item => (__assign({}, item))).filter(value => { });
a.map(item => (Object.assign({}, item))).filter(value => { });
}
@@ -6,16 +6,5 @@ let xx: { a, b } = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra'
//// [objectLiteralFreshnessWithSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let x = { b: 1, extra: 2 };
let xx = __assign(__assign({ a: 1 }, x), { z: 3 }); // error for 'z', no error for 'extra'
let xx = Object.assign(Object.assign({ a: 1 }, x), { z: 3 }); // error for 'z', no error for 'extra'
@@ -54,17 +54,6 @@ let e4 = f({ a: 2 }, data);
//// [objectLiteralNormalization.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
// Object literals in unions are normalized upon widening
let a1 = [{ a: 0 }, { a: 1, b: "x" }, { a: 2, b: "y", c: true }][0];
a1.a; // number
@@ -82,8 +71,8 @@ a2 = { a: "def" };
a2 = {};
a2 = { a: "def", b: 20 }; // Error
a2 = { a: 1 }; // Error
let b2 = __assign(__assign({}, b1), { z: 55 });
let b3 = __assign({}, b2);
let b2 = Object.assign(Object.assign({}, b1), { z: 55 });
let b3 = Object.assign({}, b2);
let c1 = !true ? {} : opts;
let c2 = !true ? opts : {};
let c3 = !true ? { a: 0, b: 0 } : {};
+47 -58
View File
@@ -146,60 +146,49 @@ function genericSpread<T, U>(t: T, u: U, v: T | U, w: T | { s: string }, obj: {
//// [objectSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let o = { a: 1, b: 'no' };
let o2 = { b: 'yes', c: true };
let swap = { a: 'yes', b: -1 };
let addAfter = __assign(__assign({}, o), { c: false });
let addBefore = __assign({ c: false }, o);
let override = __assign(__assign({}, o), { b: 'override' });
let nested = __assign(__assign({}, __assign({ a: 3 }, { b: false, c: 'overriden' })), { c: 'whatever' });
let combined = __assign(__assign({}, o), o2);
let combinedAfter = __assign(__assign(__assign({}, o), o2), { b: 'ok' });
let combinedNestedChangeType = __assign(__assign({}, __assign({ a: 1 }, { b: false, c: 'overriden' })), { c: -1 });
let propertyNested = { a: __assign({}, o) };
let addAfter = Object.assign(Object.assign({}, o), { c: false });
let addBefore = Object.assign({ c: false }, o);
let override = Object.assign(Object.assign({}, o), { b: 'override' });
let nested = Object.assign(Object.assign({}, Object.assign({ a: 3 }, { b: false, c: 'overriden' })), { c: 'whatever' });
let combined = Object.assign(Object.assign({}, o), o2);
let combinedAfter = Object.assign(Object.assign(Object.assign({}, o), o2), { b: 'ok' });
let combinedNestedChangeType = Object.assign(Object.assign({}, Object.assign({ a: 1 }, { b: false, c: 'overriden' })), { c: -1 });
let propertyNested = { a: Object.assign({}, o) };
// accessors don't copy the descriptor
// (which means that readonly getters become read/write properties)
let op = { get a() { return 6; } };
let getter = __assign(__assign({}, op), { c: 7 });
let getter = Object.assign(Object.assign({}, op), { c: 7 });
getter.a = 12;
// functions result in { }
let spreadFunc = __assign({}, (function () { }));
let spreadFunc = Object.assign({}, (function () { }));
function from16326(header, authToken) {
return __assign(__assign(__assign({}, this.header), header), authToken && { authToken });
return Object.assign(Object.assign(Object.assign({}, this.header), header), authToken && { authToken });
}
// boolean && T results in Partial<T>
function conditionalSpreadBoolean(b) {
let o = { x: 12, y: 13 };
o = __assign(__assign({}, o), b && { x: 14 });
let o2 = __assign({}, b && { x: 21 });
o = Object.assign(Object.assign({}, o), b && { x: 14 });
let o2 = Object.assign({}, b && { x: 21 });
return o;
}
function conditionalSpreadNumber(nt) {
let o = { x: 15, y: 16 };
o = __assign(__assign({}, o), nt && { x: nt });
let o2 = __assign({}, nt && { x: nt });
o = Object.assign(Object.assign({}, o), nt && { x: nt });
let o2 = Object.assign({}, nt && { x: nt });
return o;
}
function conditionalSpreadString(st) {
let o = { x: 'hi', y: 17 };
o = __assign(__assign({}, o), st && { x: st });
let o2 = __assign({}, st && { x: st });
o = Object.assign(Object.assign({}, o), st && { x: st });
let o2 = Object.assign({}, st && { x: st });
return o;
}
// any results in any
let anything;
let spreadAny = __assign({}, anything);
let spreadAny = Object.assign({}, anything);
// methods are not enumerable
class C {
constructor() {
@@ -208,51 +197,51 @@ class C {
m() { }
}
let c = new C();
let spreadC = __assign({}, c);
let spreadC = Object.assign({}, c);
// own methods are enumerable
let cplus = __assign(__assign({}, c), { plus() { return this.p + 1; } });
let cplus = Object.assign(Object.assign({}, c), { plus() { return this.p + 1; } });
cplus.plus();
// new field's type conflicting with existing field is OK
let changeTypeAfter = __assign(__assign({}, o), { a: 'wrong type?' });
let changeTypeBoth = __assign(__assign({}, o), swap);
let changeTypeAfter = Object.assign(Object.assign({}, o), { a: 'wrong type?' });
let changeTypeBoth = Object.assign(Object.assign({}, o), swap);
// optional
function container(definiteBoolean, definiteString, optionalString, optionalNumber) {
let optionalUnionStops = __assign(__assign(__assign({}, definiteBoolean), definiteString), optionalNumber);
let optionalUnionDuplicates = __assign(__assign(__assign(__assign({}, definiteBoolean), definiteString), optionalString), optionalNumber);
let allOptional = __assign(__assign({}, optionalString), optionalNumber);
let optionalUnionStops = Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), optionalNumber);
let optionalUnionDuplicates = Object.assign(Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), optionalString), optionalNumber);
let allOptional = Object.assign(Object.assign({}, optionalString), optionalNumber);
// computed property
let computedFirst = __assign(__assign({ ['before everything']: 12 }, o), { b: 'yes' });
let computedAfter = __assign(__assign({}, o), { b: 'yeah', ['at the end']: 14 });
let computedFirst = Object.assign(Object.assign({ ['before everything']: 12 }, o), { b: 'yes' });
let computedAfter = Object.assign(Object.assign({}, o), { b: 'yeah', ['at the end']: 14 });
}
// shortcut syntax
let a = 12;
let shortCutted = __assign(__assign({}, o), { a });
let shortCutted = Object.assign(Object.assign({}, o), { a });
// non primitive
let spreadNonPrimitive = __assign({}, {});
let spreadNonPrimitive = Object.assign({}, {});
// generic spreads
function f(t, u) {
return __assign(__assign(__assign({}, t), u), { id: 'id' });
return Object.assign(Object.assign(Object.assign({}, t), u), { id: 'id' });
}
let exclusive = f({ a: 1, b: 'yes' }, { c: 'no', d: false });
let overlap = f({ a: 1 }, { a: 2, b: 'extra' });
let overlapConflict = f({ a: 1 }, { a: 'mismatch' });
let overwriteId = f({ a: 1, id: true }, { c: 1, d: 'no' });
function genericSpread(t, u, v, w, obj) {
let x01 = __assign({}, t);
let x02 = __assign(__assign({}, t), t);
let x03 = __assign(__assign({}, t), u);
let x04 = __assign(__assign({}, u), t);
let x05 = __assign({ a: 5, b: 'hi' }, t);
let x06 = __assign(__assign({}, t), { a: 5, b: 'hi' });
let x07 = __assign(__assign(__assign({ a: 5, b: 'hi' }, t), { c: true }), obj);
let x09 = __assign(__assign(__assign({ a: 5 }, t), { b: 'hi', c: true }), obj);
let x10 = __assign(__assign(__assign(__assign({ a: 5 }, t), { b: 'hi' }), u), obj);
let x11 = __assign({}, v);
let x12 = __assign(__assign({}, v), obj);
let x13 = __assign({}, w);
let x14 = __assign(__assign({}, w), obj);
let x15 = __assign(__assign({}, t), v);
let x16 = __assign(__assign({}, t), w);
let x17 = __assign(__assign(__assign({}, t), w), obj);
let x18 = __assign(__assign(__assign({}, t), v), w);
let x01 = Object.assign({}, t);
let x02 = Object.assign(Object.assign({}, t), t);
let x03 = Object.assign(Object.assign({}, t), u);
let x04 = Object.assign(Object.assign({}, u), t);
let x05 = Object.assign({ a: 5, b: 'hi' }, t);
let x06 = Object.assign(Object.assign({}, t), { a: 5, b: 'hi' });
let x07 = Object.assign(Object.assign(Object.assign({ a: 5, b: 'hi' }, t), { c: true }), obj);
let x09 = Object.assign(Object.assign(Object.assign({ a: 5 }, t), { b: 'hi', c: true }), obj);
let x10 = Object.assign(Object.assign(Object.assign(Object.assign({ a: 5 }, t), { b: 'hi' }), u), obj);
let x11 = Object.assign({}, v);
let x12 = Object.assign(Object.assign({}, v), obj);
let x13 = Object.assign({}, w);
let x14 = Object.assign(Object.assign({}, w), obj);
let x15 = Object.assign(Object.assign({}, t), v);
let x16 = Object.assign(Object.assign({}, t), w);
let x17 = Object.assign(Object.assign(Object.assign({}, t), w), obj);
let x18 = Object.assign(Object.assign(Object.assign({}, t), v), w);
}
@@ -13,23 +13,12 @@ function f() {
//// [objectSpreadComputedProperty.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
// fixes #12200
function f() {
let n = 12;
let m = 13;
let a = null;
const o1 = __assign({}, { [n]: n });
const o2 = __assign({}, { [a]: n });
const o3 = __assign(__assign(__assign(__assign({ [a]: n }, {}), { [n]: n }), {}), { [m]: m });
const o1 = Object.assign({}, { [n]: n });
const o2 = Object.assign({}, { [a]: n });
const o3 = Object.assign(Object.assign(Object.assign(Object.assign({ [a]: n }, {}), { [n]: n }), {}), { [m]: m });
}
@@ -21,23 +21,12 @@ writable.a = 0; // should be ok.
//// [objectSpreadIndexSignature.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let i = __assign(__assign({}, indexed1), { b: 11 });
let i = Object.assign(Object.assign({}, indexed1), { b: 11 });
// only indexed has indexer, so i[101]: any
i[101];
let ii = __assign(__assign({}, indexed1), indexed2);
let ii = Object.assign(Object.assign({}, indexed1), indexed2);
// both have indexer, so i[1001]: number | boolean
ii[1001];
indexed3 = __assign({}, b ? indexed3 : undefined);
var writable = __assign({}, roindex);
indexed3 = Object.assign({}, b ? indexed3 : undefined);
var writable = Object.assign({}, roindex);
writable.a = 0; // should be ok.
@@ -78,59 +78,48 @@ spreadObj.a; // error 'a' is not in {}
//// [objectSpreadNegative.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let o = { a: 1, b: 'no' };
/// private propagates
class PrivateOptionalX {
}
class PublicX {
}
let o2 = __assign(__assign({}, publicX), privateOptionalX);
let o2 = Object.assign(Object.assign({}, publicX), privateOptionalX);
let sn = o2.x; // error, x is private
let allOptional = __assign(__assign({}, optionalString), optionalNumber);
let allOptional = Object.assign(Object.assign({}, optionalString), optionalNumber);
;
;
let spread = __assign({ b: true }, { s: "foo" });
let spread = Object.assign({ b: true }, { s: "foo" });
spread = { s: "foo" }; // error, missing 'b'
let b = { b: false };
spread = b; // error, missing 's'
// literal repeats are not allowed, but spread repeats are fine
let duplicated = __assign(__assign(__assign(__assign({ b: 'bad' }, o), { b: 'bad' }), o2), { b: 'bad' });
let duplicatedSpread = __assign(__assign({}, o), o);
let duplicated = Object.assign(Object.assign(Object.assign(Object.assign({ b: 'bad' }, o), { b: 'bad' }), o2), { b: 'bad' });
let duplicatedSpread = Object.assign(Object.assign({}, o), o);
// Note: ignore changes the order that properties are printed
let ignore = __assign({ b: 'ignored' }, o);
let ignore = Object.assign({ b: 'ignored' }, o);
let o3 = { a: 1, b: 'no' };
let o4 = { b: 'yes', c: true };
let combinedBefore = __assign(__assign({ b: 'ok' }, o3), o4);
let combinedMid = __assign(__assign(__assign({}, o3), { b: 'ok' }), o4);
let combinedNested = __assign(__assign(__assign({}, __assign({ a: 4 }, { b: false, c: 'overriden' })), { d: 'actually new' }), { a: 5, d: 'maybe new' });
let changeTypeBefore = __assign({ a: 'wrong type?' }, o3);
let computedMiddle = __assign(__assign(__assign({}, o3), { ['in the middle']: 13, b: 'maybe?' }), o4);
let combinedBefore = Object.assign(Object.assign({ b: 'ok' }, o3), o4);
let combinedMid = Object.assign(Object.assign(Object.assign({}, o3), { b: 'ok' }), o4);
let combinedNested = Object.assign(Object.assign(Object.assign({}, Object.assign({ a: 4 }, { b: false, c: 'overriden' })), { d: 'actually new' }), { a: 5, d: 'maybe new' });
let changeTypeBefore = Object.assign({ a: 'wrong type?' }, o3);
let computedMiddle = Object.assign(Object.assign(Object.assign({}, o3), { ['in the middle']: 13, b: 'maybe?' }), o4);
// primitives are not allowed, except for falsy ones
let spreadNum = __assign({}, 12);
let spreadSum = __assign({}, 1 + 1);
let spreadZero = __assign({}, 0);
let spreadNum = Object.assign({}, 12);
let spreadSum = Object.assign({}, 1 + 1);
let spreadZero = Object.assign({}, 0);
spreadZero.toFixed(); // error, no methods even from a falsy number
let spreadBool = __assign({}, true);
let spreadBool = Object.assign({}, true);
spreadBool.valueOf();
let spreadStr = __assign({}, 'foo');
let spreadStr = Object.assign({}, 'foo');
spreadStr.length; // error, no 'length'
spreadStr.charAt(1); // error, no methods either
// functions are skipped
let spreadFunc = __assign({}, function () { });
let spreadFunc = Object.assign({}, function () { });
spreadFunc(); // error, no call signature
// write-only properties get skipped
let setterOnly = __assign({ set b(bad) { } });
let setterOnly = Object.assign({ set b(bad) { } });
setterOnly.b = 12; // error, 'b' does not exist
// methods are skipped because they aren't enumerable
class C {
@@ -140,9 +129,9 @@ class C {
m() { }
}
let c = new C();
let spreadC = __assign({}, c);
let spreadC = Object.assign({}, c);
spreadC.m(); // error 'm' is not in '{ ... c }'
// non primitive
let obj = { a: 123 };
let spreadObj = __assign({}, obj);
let spreadObj = Object.assign({}, obj);
spreadObj.a; // error 'a' is not in {}
@@ -8,19 +8,8 @@ let o10 = { ...get x() { return 12; }};
//// [objectSpreadNegativeParse.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
let o7 = __assign({}, o ? : );
let o8 = __assign({}, * o);
let o9 = __assign({}, matchMedia()), {};
let o7 = Object.assign({}, o ? : );
let o8 = Object.assign({}, * o);
let o9 = Object.assign({}, matchMedia()), {};
;
let o10 = __assign(__assign({}, get), { x() { return 12; } });
let o10 = Object.assign(Object.assign({}, get), { x() { return 12; } });
@@ -88,20 +88,9 @@ function f(cnd: Record<number, boolean>){
//// [objectSpreadRepeatedComplexity.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function f(cnd) {
// Type is a union of 2^(n-1) members, where n is the number of spread objects
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (cnd[1] &&
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (cnd[1] &&
cnd[2] && {
prop0: 0,
})), (cnd[3] && {
@@ -65,18 +65,7 @@ parseWithSpread({ a: 1, b: 2, z: 26 })
//// [objectSpreadRepeatedNullCheckPerf.js]
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function parseWithSpread(config) {
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, config.a !== undefined && { a: config.a.toString() }), config.b !== undefined && { b: config.b.toString() }), config.c !== undefined && { c: config.c.toString() }), config.d !== undefined && { d: config.d.toString() }), config.e !== undefined && { e: config.e.toString() }), config.f !== undefined && { f: config.f.toString() }), config.g !== undefined && { g: config.g.toString() }), config.h !== undefined && { h: config.h.toString() }), config.i !== undefined && { i: config.i.toString() }), config.j !== undefined && { j: config.j.toString() }), config.k !== undefined && { k: config.k.toString() }), config.l !== undefined && { l: config.l.toString() }), config.m !== undefined && { m: config.m.toString() }), config.n !== undefined && { n: config.n.toString() }), config.o !== undefined && { o: config.o.toString() }), config.p !== undefined && { p: config.p.toString() }), config.q !== undefined && { q: config.q.toString() }), config.r !== undefined && { r: config.r.toString() }), config.s !== undefined && { s: config.s.toString() }), config.t !== undefined && { t: config.t.toString() }), config.u !== undefined && { u: config.u.toString() }), config.v !== undefined && { v: config.v.toString() }), config.w !== undefined && { w: config.w.toString() }), config.x !== undefined && { x: config.x.toString() }), config.y !== undefined && { y: config.y.toString() }), config.z !== undefined && { z: config.z.toString() });
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, config.a !== undefined && { a: config.a.toString() }), config.b !== undefined && { b: config.b.toString() }), config.c !== undefined && { c: config.c.toString() }), config.d !== undefined && { d: config.d.toString() }), config.e !== undefined && { e: config.e.toString() }), config.f !== undefined && { f: config.f.toString() }), config.g !== undefined && { g: config.g.toString() }), config.h !== undefined && { h: config.h.toString() }), config.i !== undefined && { i: config.i.toString() }), config.j !== undefined && { j: config.j.toString() }), config.k !== undefined && { k: config.k.toString() }), config.l !== undefined && { l: config.l.toString() }), config.m !== undefined && { m: config.m.toString() }), config.n !== undefined && { n: config.n.toString() }), config.o !== undefined && { o: config.o.toString() }), config.p !== undefined && { p: config.p.toString() }), config.q !== undefined && { q: config.q.toString() }), config.r !== undefined && { r: config.r.toString() }), config.s !== undefined && { s: config.s.toString() }), config.t !== undefined && { t: config.t.toString() }), config.u !== undefined && { u: config.u.toString() }), config.v !== undefined && { v: config.v.toString() }), config.w !== undefined && { w: config.w.toString() }), config.x !== undefined && { x: config.x.toString() }), config.y !== undefined && { y: config.y.toString() }), config.z !== undefined && { z: config.z.toString() });
}
parseWithSpread({ a: 1, b: 2, z: 26 });
@@ -47,34 +47,23 @@ function g(fields: Fields, partialFields: Partial<Fields>, nearlyPartialFields:
//// [objectSpreadStrictNull.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function f(definiteBoolean, definiteString, optionalString, optionalNumber, undefinedString, undefinedNumber) {
// optional
let optionalUnionStops = __assign(__assign(__assign({}, definiteBoolean), definiteString), optionalNumber);
let optionalUnionDuplicates = __assign(__assign(__assign(__assign({}, definiteBoolean), definiteString), optionalString), optionalNumber);
let allOptional = __assign(__assign({}, optionalString), optionalNumber);
let optionalUnionStops = Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), optionalNumber);
let optionalUnionDuplicates = Object.assign(Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), optionalString), optionalNumber);
let allOptional = Object.assign(Object.assign({}, optionalString), optionalNumber);
// undefined
let undefinedUnionStops = __assign(__assign(__assign({}, definiteBoolean), definiteString), undefinedNumber);
let undefinedUnionDuplicates = __assign(__assign(__assign(__assign({}, definiteBoolean), definiteString), undefinedString), undefinedNumber);
let allUndefined = __assign(__assign({}, undefinedString), undefinedNumber);
let undefinedWithOptionalContinues = __assign(__assign(__assign({}, definiteBoolean), undefinedString), optionalNumber);
let undefinedUnionStops = Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), undefinedNumber);
let undefinedUnionDuplicates = Object.assign(Object.assign(Object.assign(Object.assign({}, definiteBoolean), definiteString), undefinedString), undefinedNumber);
let allUndefined = Object.assign(Object.assign({}, undefinedString), undefinedNumber);
let undefinedWithOptionalContinues = Object.assign(Object.assign(Object.assign({}, definiteBoolean), undefinedString), optionalNumber);
}
const m = { title: "The Matrix", yearReleased: 1999 };
// should error here because title: undefined is not assignable to string
const x = __assign(__assign({}, m), { title: undefined });
const x = Object.assign(Object.assign({}, m), { title: undefined });
function g(fields, partialFields, nearlyPartialFields) {
// ok, undefined is stripped from optional properties when spread
fields = __assign(__assign({}, fields), partialFields);
fields = Object.assign(Object.assign({}, fields), partialFields);
// error: not optional, undefined remains
fields = __assign(__assign({}, fields), nearlyPartialFields);
fields = Object.assign(Object.assign({}, fields), nearlyPartialFields);
}
@@ -14,18 +14,7 @@ const a = {
//// [objectSpreadWithinMethodWithinObjectWithSpread.js]
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
const obj = {};
const a = __assign(__assign({}, obj), { prop() {
return __assign(__assign({}, obj), { metadata: 213 });
const a = Object.assign(Object.assign({}, obj), { prop() {
return Object.assign(Object.assign({}, obj), { metadata: 213 });
} });
@@ -8,4 +8,4 @@ const a = (): { d: string } | undefined => undefined;
//// [optionalChainingInParameterBindingPattern.js]
// https://github.com/microsoft/TypeScript/issues/36295
const a = () => undefined;
(({ [(_a = a()) === null || _a === void 0 ? void 0 : _a.d]: c = "" }) => { var _a; })();
((_a) => { var _b; var { [(_b = a()) === null || _b === void 0 ? void 0 : _b.d]: c = "" } = _a; })();
@@ -8,4 +8,4 @@ const a = (): { d: string } | undefined => undefined;
//// [optionalChainingInParameterInitializer.js]
// https://github.com/microsoft/TypeScript/issues/36295
const a = () => undefined;
((b = (_a = a()) === null || _a === void 0 ? void 0 : _a.d) => { var _a; })();
((b) => { var _a; if (b === void 0) { b = (_a = a()) === null || _a === void 0 ? void 0 : _a.d; } })();
@@ -1,11 +1,11 @@
optionalParamReferencingOtherParams2.ts(2,29): error TS2373: Parameter 'y' cannot reference identifier 'b' declared after it.
optionalParamReferencingOtherParams2.ts(2,29): error TS2304: Cannot find name 'b'.
==== optionalParamReferencingOtherParams2.ts (1 errors) ====
var a = 1;
function strange(x = a, y = b) {
~
!!! error TS2373: Parameter 'y' cannot reference identifier 'b' declared after it.
!!! error TS2304: Cannot find name 'b'.
var b = "";
return y;
}
@@ -9,7 +9,6 @@ function strange(x = a, y = b) {
>x : Symbol(x, Decl(optionalParamReferencingOtherParams2.ts, 1, 17))
>a : Symbol(a, Decl(optionalParamReferencingOtherParams2.ts, 0, 3))
>y : Symbol(y, Decl(optionalParamReferencingOtherParams2.ts, 1, 23))
>b : Symbol(b, Decl(optionalParamReferencingOtherParams2.ts, 2, 7))
var b = "";
>b : Symbol(b, Decl(optionalParamReferencingOtherParams2.ts, 2, 7))
@@ -8,16 +8,16 @@ var a = 1;
> : ^
function strange(x = a, y = b) {
>strange : (x?: number, y?: string) => string
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
>strange : (x?: number, y?: any) => any
> : ^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^
>x : number
> : ^^^^^^
>a : number
> : ^^^^^^
>y : string
> : ^^^^^^
>b : string
> : ^^^^^^
>y : any
> : ^^^
>b : any
> : ^^^
var b = "";
>b : string
@@ -26,6 +26,6 @@ function strange(x = a, y = b) {
> : ^^
return y;
>y : string
> : ^^^^^^
>y : any
> : ^^^
}

Some files were not shown because too many files have changed in this diff Show More