perf(es/compat): Reimplement constructor transform (#9519)
Some checks are pending
CI / Cargo fmt (push) Waiting to run
CI / Cargo clippy (push) Waiting to run
CI / Check license of dependencies (push) Waiting to run
CI / Check (macos-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / Test wasm (binding_core_wasm) (push) Waiting to run
CI / Test wasm (binding_minifier_wasm) (push) Waiting to run
CI / Test wasm (binding_typescript_wasm) (push) Waiting to run
CI / List crates (push) Waiting to run
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Blocked by required conditions
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test with @swc/cli (push) Waiting to run
CI / Miri (better_scoped_tls) (push) Waiting to run
CI / Miri (string_enum) (push) Waiting to run
CI / Miri (swc) (push) Waiting to run
CI / Miri (swc_bundler) (push) Waiting to run
CI / Miri (swc_ecma_codegen) (push) Waiting to run
CI / Miri (swc_ecma_minifier) (push) Waiting to run
CI / Done (push) Blocked by required conditions
Benchmark / Bench everything (push) Waiting to run

**Related issue:**

- Closes #9494 
- babel/babel#16194
This commit is contained in:
magic-akari 2024-09-02 18:53:16 +08:00 committed by GitHub
parent 6b19c0c12a
commit 4b85a92170
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
786 changed files with 3112 additions and 4492 deletions

View File

@ -0,0 +1,5 @@
---
swc_ecma_transforms_base: minor
---
perf(es/compat): Reimplement constructor transform

View File

@ -1,10 +1,9 @@
var _assert_this_initialized = require("@swc/helpers/_/_assert_this_initialized");
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _decorate = require("@swc/helpers/_/_decorate");
var _get = require("@swc/helpers/_/_get");
var _get_prototype_of = require("@swc/helpers/_/_get_prototype_of");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var SomeClass = _decorate._([], function(_initialize) {
"use strict";
var SomeClass = function SomeClass() {
@ -31,12 +30,11 @@ var OtherClass = _decorate._([], function(_initialize, _SomeClass) {
var OtherClass = /*#__PURE__*/ function(_SomeClass) {
"use strict";
_inherits._(OtherClass, _SomeClass);
var _super = _create_super._(OtherClass);
function OtherClass() {
_class_call_check._(this, OtherClass);
var _this;
_this = _super.apply(this, arguments);
_initialize(_assert_this_initialized._(_this));
_this = _call_super._(this, OtherClass, arguments);
_initialize(_this);
return _this;
}
return OtherClass;

View File

@ -1,16 +1,15 @@
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _create_class = require("@swc/helpers/_/_create_class");
var _get = require("@swc/helpers/_/_get");
var _get_prototype_of = require("@swc/helpers/_/_get_prototype_of");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var ColouredCanvasElement = /*#__PURE__*/ function(CanvasElement1) {
"use strict";
_inherits._(ColouredCanvasElement, CanvasElement1);
var _super = _create_super._(ColouredCanvasElement);
function ColouredCanvasElement() {
_class_call_check._(this, ColouredCanvasElement);
return _super.apply(this, arguments);
return _call_super._(this, ColouredCanvasElement, arguments);
}
_create_class._(ColouredCanvasElement, [
{

View File

@ -1,11 +1,11 @@
"use strict";
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _create_class = require("@swc/helpers/_/_create_class");
var _get = require("@swc/helpers/_/_get");
var _get_prototype_of = require("@swc/helpers/_/_get_prototype_of");
var _inherits = require("@swc/helpers/_/_inherits");
var _wrap_native_super = require("@swc/helpers/_/_wrap_native_super");
var _create_super = require("@swc/helpers/_/_create_super");
var Element = /*#__PURE__*/ function() {
function Element() {
_class_call_check._(this, Element);
@ -22,10 +22,9 @@ var Element = /*#__PURE__*/ function() {
}();
var CanvasElement = /*#__PURE__*/ function(Element) {
_inherits._(CanvasElement, Element);
var _super = _create_super._(CanvasElement);
function CanvasElement() {
_class_call_check._(this, CanvasElement);
return _super.apply(this, arguments);
return _call_super._(this, CanvasElement, arguments);
}
_create_class._(CanvasElement, [
{
@ -40,10 +39,9 @@ var CanvasElement = /*#__PURE__*/ function(Element) {
}(_wrap_native_super._(Element));
var ColouredCanvasElement = /*#__PURE__*/ function(CanvasElement) {
_inherits._(ColouredCanvasElement, CanvasElement);
var _super = _create_super._(ColouredCanvasElement);
function ColouredCanvasElement() {
_class_call_check._(this, ColouredCanvasElement);
return _super.apply(this, arguments);
return _call_super._(this, ColouredCanvasElement, arguments);
}
_create_class._(ColouredCanvasElement, [
{
@ -58,10 +56,9 @@ var ColouredCanvasElement = /*#__PURE__*/ function(CanvasElement) {
}(CanvasElement);
var ColouredSquare = /*#__PURE__*/ function(ColouredCanvasElement) {
_inherits._(ColouredSquare, ColouredCanvasElement);
var _super = _create_super._(ColouredSquare);
function ColouredSquare() {
_class_call_check._(this, ColouredSquare);
return _super.apply(this, arguments);
return _call_super._(this, ColouredSquare, arguments);
}
return ColouredSquare;
}(ColouredCanvasElement);

View File

@ -1,7 +1,7 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _define_property } from "@swc/helpers/_/_define_property";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var MyClass = function MyClass() {
"use strict";
_class_call_check(this, MyClass);
@ -10,10 +10,9 @@ export var fn = function() {
var _class = /*#__PURE__*/ function(MyClass) {
"use strict";
_inherits(_class, MyClass);
var _super = _create_super(_class);
function _class() {
_class_call_check(this, _class);
return _super.apply(this, arguments);
return _call_super(this, _class, arguments);
}
return _class;
}(MyClass);

View File

@ -1,6 +1,6 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var MyClass = function MyClass() {
"use strict";
_class_call_check(this, MyClass);
@ -9,10 +9,9 @@ export var fn = function() {
return /*#__PURE__*/ function(MyClass) {
"use strict";
_inherits(_class, MyClass);
var _super = _create_super(_class);
function _class() {
_class_call_check(this, _class);
return _super.apply(this, arguments);
return _call_super(this, _class, arguments);
}
return _class;
}(MyClass);

View File

@ -1,7 +1,7 @@
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _define_property = require("@swc/helpers/_/_define_property");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var Component = function Component() {
"use strict";
_class_call_check._(this, Component);
@ -14,10 +14,9 @@ var withTeamsForUser = function(_WrappedComponent) {
var _class = /*#__PURE__*/ function(Component) {
"use strict";
_inherits._(_class, Component);
var _super = _create_super._(_class);
function _class() {
_class_call_check._(this, _class);
return _super.apply(this, arguments);
return _call_super._(this, _class, arguments);
}
return _class;
}(Component);

View File

@ -1,13 +1,12 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
export var a = /*#__PURE__*/ function(Component1) {
"use strict";
_inherits(a, Component1);
var _super = _create_super(a);
function a() {
_class_call_check(this, a);
return _super.apply(this, arguments);
return _call_super(this, a, arguments);
}
return a;
}(Component);

View File

@ -1,15 +1,14 @@
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _define_property = require("@swc/helpers/_/_define_property");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var withTeamsForUser = function() {
var _class = /*#__PURE__*/ function(Component1) {
"use strict";
_inherits._(_class, Component1);
var _super = _create_super._(_class);
function _class() {
_class_call_check._(this, _class);
return _super.apply(this, arguments);
return _call_super._(this, _class, arguments);
}
return _class;
}(Component);

View File

@ -1,6 +1,6 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var MyClass = function MyClass() {
"use strict";
_class_call_check(this, MyClass);
@ -9,10 +9,9 @@ export var fn = function() {
return /*#__PURE__*/ function(MyClass) {
"use strict";
_inherits(_class, MyClass);
var _super = _create_super(_class);
function _class() {
_class_call_check(this, _class);
return _super.apply(this, arguments);
return _call_super(this, _class, arguments);
}
return _class;
}(MyClass);

View File

@ -1,5 +1,5 @@
{
"mappings": ";;;+BACaA;;;eAAAA;;;;;;;oBADQ;AACd,IAAA,AAAMA,oBAAD,AAAL;;gBAAMA;iCAAAA;aAAAA;kCAAAA;;;oBAAAA;;YACTC,KAAAA;mBAAAA,SAAAA;gBACI,OAAO,IAAI,IAAI,CAACC,GAAG;YACvB;;;WAHSF;EAAYG,UAAI",
"mappings": ";;;+BACaA;;;eAAAA;;;;;;;oBADQ;AACd,IAAA,AAAMA,oBAAD,AAAL;;gBAAMA;aAAAA;kCAAAA;mCAAAA;;oBAAAA;;YACTC,KAAAA;mBAAAA,SAAAA;gBACI,OAAO,IAAI,IAAI,CAACC,GAAG;YACvB;;;WAHSF;EAAYG,UAAI",
"names": [
"Foo",
"bar",

View File

@ -7,18 +7,17 @@ Object.defineProperty(exports, "Foo", {
return Foo;
}
});
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _create_class = require("@swc/helpers/_/_create_class");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var _base = require("../b/base");
var Foo = /*#__PURE__*/ function(Base) {
"use strict";
_inherits._(Foo, Base);
var _super = _create_super._(Foo);
function Foo() {
_class_call_check._(this, Foo);
return _super.apply(this, arguments);
return _call_super._(this, Foo, arguments);
}
_create_class._(Foo, [
{

View File

@ -1,17 +1,16 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _create_class } from "@swc/helpers/_/_create_class";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate";
import React from 'react';
import { withRouter } from 'react-router-dom';
var App = /*#__PURE__*/ function(_React_Component) {
"use strict";
_inherits(App, _React_Component);
var _super = _create_super(App);
function App() {
_class_call_check(this, App);
return _super.apply(this, arguments);
return _call_super(this, App, arguments);
}
_create_class(App, [
{

View File

@ -5,7 +5,7 @@ export default {
"use strict";
_inherits(ClassName1, ClassName);
function ClassName1() {
return ClassName.call(this);
return ClassName.call(this) || this;
}
return ClassName1;
}(ClassName)

View File

@ -0,0 +1,9 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript"
},
"externalHelpers": false,
"target": "es5"
}
}

View File

@ -0,0 +1,17 @@
class Foo1 extends Bar {
constructor() {
super(); // ok
}
}
class Foo2 extends Bar {
constructor() {
0, super(); // ?
}
}
class Foo3 extends Bar {
constructor() {
[super()]; // ?
}
}

View File

@ -0,0 +1,35 @@
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _inherits = require("@swc/helpers/_/_inherits");
var Foo1 = /*#__PURE__*/ function(Bar1) {
"use strict";
_inherits._(Foo1, Bar1);
function Foo1() {
_class_call_check._(this, Foo1);
return _call_super._(this, Foo1); // ok
}
return Foo1;
}(Bar);
var Foo2 = /*#__PURE__*/ function(Bar1) {
"use strict";
_inherits._(Foo2, Bar1);
function Foo2() {
_class_call_check._(this, Foo2);
var _this;
return 0, _this = _call_super._(this, Foo2); // ?
}
return Foo2;
}(Bar);
var Foo3 = /*#__PURE__*/ function(Bar1) {
"use strict";
_inherits._(Foo3, Bar1);
function Foo3() {
_class_call_check._(this, Foo3);
var _this;
[
_this = _call_super._(this, Foo3)
]; // ?
return _this;
}
return Foo3;
}(Bar);

View File

@ -1,15 +1,14 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { PartialType } from "@nestjs/mapped-types";
import { CreateUserDto } from "./create-user.dto";
export var UpdateUserDto = /*#__PURE__*/ function(_PartialType) {
"use strict";
_inherits(UpdateUserDto, _PartialType);
var _super = _create_super(UpdateUserDto);
function UpdateUserDto() {
_class_call_check(this, UpdateUserDto);
return _super.apply(this, arguments);
return _call_super(this, UpdateUserDto, arguments);
}
return UpdateUserDto;
}(PartialType(CreateUserDto));

View File

@ -1,15 +1,14 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { PartialType } from "@nestjs/mapped-types";
import { CreateUserDto } from "./create-user.dto";
export var UpdateUserDto = /*#__PURE__*/ function(_PartialType) {
"use strict";
_inherits(UpdateUserDto, _PartialType);
var _super = _create_super(UpdateUserDto);
function UpdateUserDto() {
_class_call_check(this, UpdateUserDto);
return _super.apply(this, arguments);
return _call_super(this, UpdateUserDto, arguments);
}
return UpdateUserDto;
}(PartialType(CreateUserDto));

View File

@ -1,18 +1,18 @@
var _assert_this_initialized = require("@swc/helpers/_/_assert_this_initialized");
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _inherits = require("@swc/helpers/_/_inherits");
var _instanceof = require("@swc/helpers/_/_instanceof");
var _wrap_native_super = require("@swc/helpers/_/_wrap_native_super");
var _create_super = require("@swc/helpers/_/_create_super");
var CustomError = /*#__PURE__*/ function _target(Error1) {
"use strict";
_inherits._(CustomError, Error1);
var _super = _create_super._(CustomError);
function CustomError(message) {
_class_call_check._(this, CustomError);
var _this;
_this = _super.call(this, message); // 'Error' breaks prototype chain here
Object.setPrototypeOf(_assert_this_initialized._(_this), (_instanceof._(this, CustomError) ? this.constructor : void 0).prototype); // restore prototype chain
_this = _call_super._(this, CustomError, [
message
]); // 'Error' breaks prototype chain here
Object.setPrototypeOf(_this, (_instanceof._(this, CustomError) ? this.constructor : void 0).prototype); // restore prototype chain
return _this;
}
return CustomError;

View File

@ -1,9 +1,9 @@
var _async_to_generator = require("@swc/helpers/_/_async_to_generator");
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _create_class = require("@swc/helpers/_/_create_class");
var _define_property = require("@swc/helpers/_/_define_property");
var _inherits = require("@swc/helpers/_/_inherits");
var _create_super = require("@swc/helpers/_/_create_super");
var _ts_generator = require("@swc/helpers/_/_ts_generator");
var Foo = function Foo(v) {
"use strict";
@ -23,10 +23,9 @@ _async_to_generator._(function() {
Bar = /*#__PURE__*/ function(Foo1) {
"use strict";
_inherits._(Bar, Foo1);
var _super = _create_super._(Bar);
function Bar() {
_class_call_check._(this, Bar);
return _super.apply(this, arguments);
return _call_super._(this, Bar, arguments);
}
_create_class._(Bar, [
{

View File

@ -1,14 +1,13 @@
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { BExtend } from 'mod';
export var B = /*#__PURE__*/ function(BExtend) {
"use strict";
_inherits(B, BExtend);
var _super = _create_super(B);
function B() {
_class_call_check(this, B);
return _super.apply(this, arguments);
return _call_super(this, B, arguments);
}
return B;
}(BExtend);

View File

@ -1,7 +1,7 @@
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A;
(function(A) {
var Point = function Point() {
@ -16,10 +16,9 @@ var A;
var Point3d = /*#__PURE__*/ function(Point) {
"use strict";
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
_class_call_check(this, Point3d);
return _super.apply(this, arguments);
return _call_super(this, Point3d, arguments);
}
return Point3d;
}(Point);

View File

@ -1,20 +1,18 @@
//// [ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts]
var A, A1, Point, Point3d;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
A1 = A || (A = {}), Point = function Point() {
_class_call_check(this, Point);
}, A1.Point = Point, A1.Origin = {
x: 0,
y: 0
}, Point3d = /*#__PURE__*/ function(Point) {
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
return _class_call_check(this, Point3d), _super.apply(this, arguments);
return _class_call_check(this, Point3d), _call_super(this, Point3d, arguments);
}
return Point3d;
return _inherits(Point3d, Point), Point3d;
}(Point), A1.Point3d = Point3d, A1.Origin3d = {
x: 0,
y: 0,

View File

@ -1,7 +1,7 @@
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A;
(function(A) {
var Point = function Point() {
@ -15,10 +15,9 @@ var A;
var Point3d = /*#__PURE__*/ function(Point) {
"use strict";
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
_class_call_check(this, Point3d);
return _super.apply(this, arguments);
return _call_super(this, Point3d, arguments);
}
return Point3d;
}(Point);

View File

@ -1,18 +1,16 @@
//// [ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts]
var A, A1, Point3d, Line;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
(A1 = A || (A = {})).Origin = {
x: 0,
y: 0
}, Point3d = /*#__PURE__*/ function(Point) {
_inherits(Point3d, Point);
var _super = _create_super(Point3d);
function Point3d() {
return _class_call_check(this, Point3d), _super.apply(this, arguments);
return _class_call_check(this, Point3d), _call_super(this, Point3d, arguments);
}
return Point3d;
return _inherits(Point3d, Point), Point3d;
}(function Point() {
_class_call_check(this, Point);
}), A1.Point3d = Point3d, A1.Origin3d = {

View File

@ -1,9 +1,9 @@
//// [apparentTypeSubtyping.ts]
// subtype checks use the apparent type of the target type
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S:
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -12,10 +12,9 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
@ -27,10 +26,9 @@ var Base2 = function Base2() {
var Derived2 = /*#__PURE__*/ function(Base2) {
"use strict";
_inherits(Derived2, Base2);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base2);

View File

@ -1,4 +1,4 @@
//// [apparentTypeSubtyping.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,9 +1,9 @@
//// [apparentTypeSupertype.ts]
// subtype checks use the apparent type of the target type
// S is a subtype of a type T, and T is a supertype of S, if one of the following is true, where S' denotes the apparent type (section 3.8.1) of S:
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -12,10 +12,9 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [apparentTypeSupertype.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [arrayLiterals.ts]
// Empty array literal with no contextual type has type Undefined[]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var arr1 = [
[],
[
@ -95,20 +95,18 @@ var Base = function Base() {
var Derived1 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived1, Base);
var _super = _create_super(Derived1);
function Derived1() {
_class_call_check(this, Derived1);
return _super.apply(this, arguments);
return _call_super(this, Derived1, arguments);
}
return Derived1;
}(Base);
var Derived2 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base);

View File

@ -1,7 +1,7 @@
//// [arrayLiterals.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var C = function C() {
_class_call_check(this, C);
};
@ -9,18 +9,14 @@ new C(), new C();
var Base = function Base() {
_class_call_check(this, Base);
}, Derived1 = /*#__PURE__*/ function(Base) {
_inherits(Derived1, Base);
var _super = _create_super(Derived1);
function Derived1() {
return _class_call_check(this, Derived1), _super.apply(this, arguments);
return _class_call_check(this, Derived1), _call_super(this, Derived1, arguments);
}
return Derived1;
return _inherits(Derived1, Base), Derived1;
}(Base), Derived2 = /*#__PURE__*/ function(Base) {
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
return _class_call_check(this, Derived2), _super.apply(this, arguments);
return _class_call_check(this, Derived2), _call_super(this, Derived2, arguments);
}
return Derived2;
return _inherits(Derived2, Base), Derived2;
}(Base);
new Derived1(), new Derived2(), new Derived1(), new Derived1();

View File

@ -1,7 +1,7 @@
//// [arrayLiteralsWithRecursiveGenerics.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var List = function List() {
"use strict";
_class_call_check(this, List);
@ -9,10 +9,9 @@ var List = function List() {
var DerivedList = /*#__PURE__*/ function(List) {
"use strict";
_inherits(DerivedList, List);
var _super = _create_super(DerivedList);
function DerivedList() {
_class_call_check(this, DerivedList);
return _super.apply(this, arguments);
return _call_super(this, DerivedList, arguments);
}
return DerivedList;
}(List);

View File

@ -1,4 +1,4 @@
//// [arrayLiteralsWithRecursiveGenerics.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithCallSignatures3.ts]
// these are all permitted with the current rules, since we do not do contextual signature instantiation
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [assignmentCompatWithCallSignatures3.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithCallSignatures4.ts]
// These are mostly permitted with the current loose rules. All ok unless otherwise noted.
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Errors;
(function(Errors) {
var Base = function Base() {
@ -12,30 +12,27 @@ var Errors;
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithCallSignatures4.ts]
var Errors, WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Errors || (Errors = {}), WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithCallSignatures5.ts]
// checking assignment compat for function types. No errors in this file
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [assignmentCompatWithCallSignatures5.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithCallSignatures6.ts]
// checking assignment compatibility relations for function types. All valid
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithCallSignatures6.ts]
var x, b, b2, b3, b4, b5, b11, b16;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
x.a = b, b = x.a, x.a2 = b2, b2 = x.a2, x.a3 = b3, b3 = x.a3, x.a4 = b4, b4 = x.a4, x.a5 = b5, b5 = x.a5, x.a11 = b11, b11 = x.a11, x.a16 = b16, x.a16;

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithConstructSignatures3.ts]
// checking assignment compatibility relations for function types. All of these are valid.
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [assignmentCompatWithConstructSignatures3.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithConstructSignatures4.ts]
// checking assignment compatibility relations for function types.
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Errors;
(function(Errors) {
var Base = function Base() {
@ -12,30 +12,27 @@ var Errors;
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithConstructSignatures4.ts]
var Errors, WithNonGenericSignaturesInBaseType, WithGenericSignaturesInBaseType;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Errors || (Errors = {}), WithNonGenericSignaturesInBaseType || (WithNonGenericSignaturesInBaseType = {}), WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {});

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithConstructSignatures5.ts]
// checking assignment compat for function types. All valid
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [assignmentCompatWithConstructSignatures5.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithConstructSignatures6.ts]
// checking assignment compatibility relations for function types. All valid.
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithConstructSignatures6.ts]
var x, b, b2, b3, b4, b5, b11, b16;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
x.a = b, b = x.a, x.a2 = b2, b2 = x.a2, x.a3 = b3, b3 = x.a3, x.a4 = b4, b4 = x.a4, x.a5 = b5, b5 = x.a5, x.a11 = b11, b11 = x.a11, x.a16 = b16, x.a16;

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithNumericIndexer.ts]
// Derived type indexer must be subtype of base type indexer
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
"use strict";
_class_call_check(this, A);
@ -23,10 +23,9 @@ var Generics;
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super = _create_super(B);
function B() {
_class_call_check(this, B);
return _super.apply(this, arguments);
return _call_super(this, B, arguments);
}
return B;
}(A);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithNumericIndexer.ts]
var Generics;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Generics || (Generics = {});

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithNumericIndexer3.ts]
// Derived type indexer must be subtype of base type indexer
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
"use strict";
_class_call_check(this, A);
@ -14,10 +14,9 @@ b = a; // ok
var B2 = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B2, A);
var _super = _create_super(B2);
function B2() {
_class_call_check(this, B2);
return _super.apply(this, arguments);
return _call_super(this, B2, arguments);
}
return B2;
}(A);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithNumericIndexer3.ts]
var Generics;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Generics || (Generics = {});

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithObjectMembers4.ts]
// members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var OnlyDerived;
(function(OnlyDerived) {
var Base = function Base() {
@ -12,20 +12,18 @@ var OnlyDerived;
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base);
@ -78,20 +76,18 @@ var WithBase;
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base);

View File

@ -1,31 +1,25 @@
//// [assignmentCompatWithObjectMembers4.ts]
var OnlyDerived, WithBase, Base, Derived, Derived2, Base1, Derived21;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
OnlyDerived || (OnlyDerived = {}), Derived = /*#__PURE__*/ function(Base) {
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
return _class_call_check(this, Derived), _super.apply(this, arguments);
return _class_call_check(this, Derived), _call_super(this, Derived, arguments);
}
return Derived;
return _inherits(Derived, Base), Derived;
}(Base = function Base() {
_class_call_check(this, Base);
}), Derived2 = /*#__PURE__*/ function(Base) {
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
return _class_call_check(this, Derived2), _super.apply(this, arguments);
return _class_call_check(this, Derived2), _call_super(this, Derived2, arguments);
}
return Derived2;
return _inherits(Derived2, Base), Derived2;
}(Base), new Derived(), new Derived2(), WithBase || (WithBase = {}), Derived21 = /*#__PURE__*/ function(Base) {
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
return _class_call_check(this, Derived2), _super.apply(this, arguments);
return _class_call_check(this, Derived2), _call_super(this, Derived2, arguments);
}
return Derived2;
return _inherits(Derived2, Base), Derived2;
}(Base1 = function Base() {
_class_call_check(this, Base);
}), new Base1(), new Derived21();

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithObjectMembersOptionality.ts]
// Derived member is not optional but base member is, should be ok
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,20 +10,18 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);

View File

@ -1,7 +1,7 @@
//// [assignmentCompatWithObjectMembersOptionality.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var TargetHasOptional, SourceHasOptional, Base = function Base() {
_class_call_check(this, Base);
};

View File

@ -1,9 +1,9 @@
//// [assignmentCompatWithObjectMembersOptionality2.ts]
// M is optional and S contains no property with the same name as M
// N is optional and T contains no property with the same name as N
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -11,20 +11,18 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);

View File

@ -1,7 +1,7 @@
//// [assignmentCompatWithObjectMembersOptionality2.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var TargetHasOptional, SourceHasOptional, Base = function Base() {
_class_call_check(this, Base);
};

View File

@ -1,8 +1,8 @@
//// [assignmentCompatWithStringIndexer.ts]
// index signatures must be compatible in assignments
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
"use strict";
_class_call_check(this, A);
@ -23,10 +23,9 @@ var Generics;
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super = _create_super(B);
function B() {
_class_call_check(this, B);
return _super.apply(this, arguments);
return _call_super(this, B, arguments);
}
return B;
}(A);
@ -37,10 +36,9 @@ var Generics;
var B2 = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B2, A);
var _super = _create_super(B2);
function B2() {
_class_call_check(this, B2);
return _super.apply(this, arguments);
return _call_super(this, B2, arguments);
}
return B2;
}(A);

View File

@ -1,6 +1,6 @@
//// [assignmentCompatWithStringIndexer.ts]
var Generics;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Generics || (Generics = {});

View File

@ -9,17 +9,16 @@ Object.defineProperty(exports, "Task", {
return Task;
}
});
var _call_super = require("@swc/helpers/_/_call_super");
var _class_call_check = require("@swc/helpers/_/_class_call_check");
var _inherits = require("@swc/helpers/_/_inherits");
var _wrap_native_super = require("@swc/helpers/_/_wrap_native_super");
var _create_super = require("@swc/helpers/_/_create_super");
var Task = /*#__PURE__*/ function(Promise1) {
"use strict";
_inherits._(Task, Promise1);
var _super = _create_super._(Task);
function Task() {
_class_call_check._(this, Task);
return _super.apply(this, arguments);
return _call_super._(this, Task, arguments);
}
return Task;
}(_wrap_native_super._(Promise));

View File

@ -7,14 +7,12 @@ Object.defineProperty(exports, "__esModule", {
return Task;
}
});
var _class_call_check = require("@swc/helpers/_/_class_call_check"), _inherits = require("@swc/helpers/_/_inherits"), _wrap_native_super = require("@swc/helpers/_/_wrap_native_super"), _create_super = require("@swc/helpers/_/_create_super"), Task = /*#__PURE__*/ function(Promise1) {
_inherits._(Task, Promise1);
var _super = _create_super._(Task);
var _call_super = require("@swc/helpers/_/_call_super"), _class_call_check = require("@swc/helpers/_/_class_call_check"), _inherits = require("@swc/helpers/_/_inherits"), Task = /*#__PURE__*/ function(Promise1) {
function Task() {
return _class_call_check._(this, Task), _super.apply(this, arguments);
return _class_call_check._(this, Task), _call_super._(this, Task, arguments);
}
return Task;
}(_wrap_native_super._(Promise));
return _inherits._(Task, Promise1), Task;
}(require("@swc/helpers/_/_wrap_native_super")._(Promise));
//// [test.ts]
Object.defineProperty(exports, "__esModule", {
value: !0

View File

@ -1,11 +1,11 @@
//// [asyncMethodWithSuper_es5.ts]
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _set } from "@swc/helpers/_/_set";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
var A = /*#__PURE__*/ function() {
"use strict";
@ -20,10 +20,9 @@ var A = /*#__PURE__*/ function() {
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super = _create_super(B);
function B() {
_class_call_check(this, B);
return _super.apply(this, arguments);
return _call_super(this, B, arguments);
}
var _proto = B.prototype;
// async method with only call/get on 'super' does not require a binding

View File

@ -1,9 +1,9 @@
//// [asyncMethodWithSuper_es5.ts]
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _set } from "@swc/helpers/_/_set";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";

View File

@ -1,8 +1,8 @@
//// [awaitClassExpression_es5.ts]
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
function func() {
return _func.apply(this, arguments);
@ -16,10 +16,9 @@ function _func() {
_ = function(_superClass) {
"use strict";
_inherits(D, _superClass);
var _super = _create_super(D);
function D() {
_class_call_check(this, D);
return _super.apply(this, arguments);
return _call_super(this, D, arguments);
}
return D;
};

View File

@ -1,6 +1,6 @@
//// [awaitClassExpression_es5.ts]
import "@swc/helpers/_/_async_to_generator";
import "@swc/helpers/_/_call_super";
import "@swc/helpers/_/_class_call_check";
import "@swc/helpers/_/_inherits";
import "@swc/helpers/_/_create_super";
import "@swc/helpers/_/_ts_generator";

View File

@ -1,9 +1,9 @@
//// [bestCommonTypeOfConditionalExpressions.ts]
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
// no errors expected here
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var a;
var b;
var Base = function Base() {
@ -13,20 +13,18 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base);

View File

@ -1,4 +1,4 @@
//// [bestCommonTypeOfConditionalExpressions.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,9 +1,9 @@
//// [bestCommonTypeOfConditionalExpressions2.ts]
// conditional expressions return the best common type of the branches plus contextual type (using the first candidate if multiple BCTs exist)
// these are errors
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -11,20 +11,18 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived2, Base);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Base);

View File

@ -1,4 +1,4 @@
//// [bestCommonTypeOfConditionalExpressions2.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,7 +1,7 @@
//// [bestCommonTypeOfTuple2.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var C = function C() {
"use strict";
_class_call_check(this, C);
@ -17,10 +17,9 @@ var E = function E() {
var F = /*#__PURE__*/ function(C) {
"use strict";
_inherits(F, C);
var _super = _create_super(F);
function F() {
_class_call_check(this, F);
return _super.apply(this, arguments);
return _call_super(this, F, arguments);
}
return F;
}(C);
@ -32,11 +31,10 @@ var C1 = function C1() {
var D1 = /*#__PURE__*/ function(C1) {
"use strict";
_inherits(D1, C1);
var _super = _create_super(D1);
function D1() {
_class_call_check(this, D1);
var _this;
_this = _super.apply(this, arguments);
_this = _call_super(this, D1, arguments);
_this.i = "bar";
return _this;
}

View File

@ -1,6 +1,6 @@
//// [bestCommonTypeOfTuple2.ts]
var t1, t2, t3, t4, t5;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
t1[4], t2[4], t3[4], t4[2], t5[2];

View File

@ -1,10 +1,10 @@
//// [callChainWithSuper.ts]
// GH#34952
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = /*#__PURE__*/ function() {
"use strict";
function Base() {
@ -17,10 +17,9 @@ var Base = /*#__PURE__*/ function() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
var _proto = Derived.prototype;
_proto.method1 = function method1() {

View File

@ -1,6 +1,6 @@
//// [callChainWithSuper.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,8 +1,8 @@
//// [callSignatureAssignabilityInInheritance2.ts]
// checking subtype relations for function types as it relates to contextual signature instantiation
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [callSignatureAssignabilityInInheritance2.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,9 +1,9 @@
//// [callSignatureAssignabilityInInheritance3.ts]
// checking subtype relations for function types as it relates to contextual signature instantiation
// error cases
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Errors;
(function(Errors) {
var Base = function Base() {
@ -13,30 +13,27 @@ var Errors;
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,6 +1,6 @@
//// [callSignatureAssignabilityInInheritance3.ts]
var Errors;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
Errors || (Errors = {});

View File

@ -1,8 +1,8 @@
//// [callSignatureAssignabilityInInheritance4.ts]
// checking subtype relations for function types as it relates to contextual signature instantiation
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -10,30 +10,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [callSignatureAssignabilityInInheritance4.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,9 +1,9 @@
//// [callSignatureAssignabilityInInheritance5.ts]
// checking subtype relations for function types as it relates to contextual signature instantiation
// same as subtypingWithCallSignatures2 just with an extra level of indirection in the inheritance chain
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -11,30 +11,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [callSignatureAssignabilityInInheritance5.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -2,9 +2,9 @@
// checking subtype relations for function types as it relates to contextual signature instantiation
// same as subtypingWithCallSignatures4 but using class type parameters instead of generic signatures
// all are errors
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var Base = function Base() {
"use strict";
_class_call_check(this, Base);
@ -12,30 +12,27 @@ var Base = function Base() {
var Derived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(Derived, Base);
var _super = _create_super(Derived);
function Derived() {
_class_call_check(this, Derived);
return _super.apply(this, arguments);
return _call_super(this, Derived, arguments);
}
return Derived;
}(Base);
var Derived2 = /*#__PURE__*/ function(Derived) {
"use strict";
_inherits(Derived2, Derived);
var _super = _create_super(Derived2);
function Derived2() {
_class_call_check(this, Derived2);
return _super.apply(this, arguments);
return _call_super(this, Derived2, arguments);
}
return Derived2;
}(Derived);
var OtherDerived = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(OtherDerived, Base);
var _super = _create_super(OtherDerived);
function OtherDerived() {
_class_call_check(this, OtherDerived);
return _super.apply(this, arguments);
return _call_super(this, OtherDerived, arguments);
}
return OtherDerived;
}(Base);

View File

@ -1,4 +1,4 @@
//// [callSignatureAssignabilityInInheritance6.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";

View File

@ -1,10 +1,10 @@
//// [callWithSpread.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var _obj, _obj1, _obj2, _obj3, _foo_apply, _obj4, _foo_apply1, _obj5, _obj6, _obj7, _obj8, _foo_apply2, _obj9, _foo_apply3, _xa_, _xa_1, _xa_2;
function foo(x, y) {
for(var _len = arguments.length, z = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
@ -128,12 +128,14 @@ var C = /*#__PURE__*/ function() {
var D = /*#__PURE__*/ function(C) {
"use strict";
_inherits(D, C);
var _super = _create_super(D);
function D() {
_class_call_check(this, D);
return _super.call(this, 1, 2);
return _super.call.apply(_super, [
this,
var _this;
_this = _call_super(this, D, [
1,
2
]);
return _this = _call_super(this, D, [
1,
2
].concat(_to_consumable_array(a)));

View File

@ -1,11 +1,11 @@
//// [callWithSpread.ts]
var _foo_apply, _foo_apply1, _foo_apply2, _foo_apply3, _xa_, _xa_1, _xa_2, a, obj, xa;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _get } from "@swc/helpers/_/_get";
import { _ as _get_prototype_of } from "@swc/helpers/_/_get_prototype_of";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
function foo(x, y) {
for(var _len = arguments.length, z = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++)z[_key - 2] = arguments[_key];
}

View File

@ -1,7 +1,7 @@
//// [castingTuple.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
"use strict";
_class_call_check(this, A);
@ -18,20 +18,18 @@ var D = function D() {
var E = /*#__PURE__*/ function(A) {
"use strict";
_inherits(E, A);
var _super = _create_super(E);
function E() {
_class_call_check(this, E);
return _super.apply(this, arguments);
return _call_super(this, E, arguments);
}
return E;
}(A);
var F = /*#__PURE__*/ function(A) {
"use strict";
_inherits(F, A);
var _super = _create_super(F);
function F() {
_class_call_check(this, F);
return _super.apply(this, arguments);
return _call_super(this, F, arguments);
}
return F;
}(A);

View File

@ -1,7 +1,7 @@
//// [castingTuple.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var E1, E2, E11, E21, C = function C() {
_class_call_check(this, C);
}, D = function D() {

View File

@ -1,16 +1,15 @@
//// [checkJsxChildrenCanBeTupleType.tsx]
/// <reference path="/.lib/react16.d.ts" />
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import React from 'react';
var ResizablePanel = /*#__PURE__*/ function(_React_Component) {
"use strict";
_inherits(ResizablePanel, _React_Component);
var _super = _create_super(ResizablePanel);
function ResizablePanel() {
_class_call_check(this, ResizablePanel);
return _super.apply(this, arguments);
return _call_super(this, ResizablePanel, arguments);
}
return ResizablePanel;
}(React.Component);

View File

@ -1,6 +1,6 @@
//// [checkJsxChildrenCanBeTupleType.tsx]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import React from 'react';
/*#__PURE__*/ React.Component;

View File

@ -1,14 +1,13 @@
//// [checkJsxIntersectionElementPropsType.tsx]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var C = /*#__PURE__*/ function(Component1) {
"use strict";
_inherits(C, Component1);
var _super = _create_super(C);
function C() {
_class_call_check(this, C);
return _super.apply(this, arguments);
return _call_super(this, C, arguments);
}
return C;
}(Component);

View File

@ -1,14 +1,12 @@
//// [checkJsxIntersectionElementPropsType.tsx]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
new /*#__PURE__*/ (function(Component1) {
_inherits(C, Component1);
var _super = _create_super(C);
function C() {
return _class_call_check(this, C), _super.apply(this, arguments);
return _class_call_check(this, C), _call_super(this, C, arguments);
}
return C;
return _inherits(C, Component1), C;
}(Component))({
foobar: "example"
});

View File

@ -1,18 +1,17 @@
//// [checkJsxSubtleSkipContextSensitiveBug.tsx]
/// <reference path="/.lib/react16.d.ts" />
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
import * as React from "react";
var AsyncLoader = /*#__PURE__*/ function(_React_Component) {
"use strict";
_inherits(AsyncLoader, _React_Component);
var _super = _create_super(AsyncLoader);
function AsyncLoader() {
_class_call_check(this, AsyncLoader);
return _super.apply(this, arguments);
return _call_super(this, AsyncLoader, arguments);
}
var _proto = AsyncLoader.prototype;
_proto.render = function render() {

View File

@ -1,8 +1,8 @@
//// [checkJsxSubtleSkipContextSensitiveBug.tsx]
import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
import * as React from "react";
/*#__PURE__*/ React.Component;

View File

@ -1,18 +1,17 @@
//// [circularImportAlias.ts]
// expected no error
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var B;
(function(B) {
B.a = A;
var D = /*#__PURE__*/ function(_B_a_C) {
"use strict";
_inherits(D, _B_a_C);
var _super = _create_super(D);
function D() {
_class_call_check(this, D);
return _super.apply(this, arguments);
return _call_super(this, D, arguments);
}
return D;
}(B.a.C);

View File

@ -1,15 +1,13 @@
//// [circularImportAlias.ts]
var B, A, B1, D, A1;
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
(B1 = B || (B = {})).a = A, D = /*#__PURE__*/ function(_B_a_C) {
_inherits(D, _B_a_C);
var _super = _create_super(D);
function D() {
return _class_call_check(this, D), _super.apply(this, arguments);
return _class_call_check(this, D), _call_super(this, D, arguments);
}
return D;
return _inherits(D, _B_a_C), D;
}(B1.a.C), B1.D = D, (A1 = A || (A = {})).C = function C() {
_class_call_check(this, C);
}, A1.b = B, new B.a.C();

View File

@ -1,7 +1,7 @@
//// [classAbstractConstructorAssignability.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
"use strict";
_class_call_check(this, A);
@ -9,20 +9,18 @@ var A = function A() {
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super = _create_super(B);
function B() {
_class_call_check(this, B);
return _super.apply(this, arguments);
return _call_super(this, B, arguments);
}
return B;
}(A);
var C = /*#__PURE__*/ function(B) {
"use strict";
_inherits(C, B);
var _super = _create_super(C);
function C() {
_class_call_check(this, C);
return _super.apply(this, arguments);
return _call_super(this, C, arguments);
}
return C;
}(B);

View File

@ -1,15 +1,13 @@
//// [classAbstractConstructorAssignability.ts]
import { _ as _call_super } from "@swc/helpers/_/_call_super";
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
import { _ as _inherits } from "@swc/helpers/_/_inherits";
import { _ as _create_super } from "@swc/helpers/_/_create_super";
var A = function A() {
_class_call_check(this, A);
}, B = /*#__PURE__*/ function(A) {
_inherits(B, A);
var _super = _create_super(B);
function B() {
return _class_call_check(this, B), _super.apply(this, arguments);
return _class_call_check(this, B), _call_super(this, B, arguments);
}
return B;
return _inherits(B, A), B;
}(A);
new B, new A, new B;

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