diff --git a/tests/baselines/reference/classExpressionWithStaticProperties1.errors.txt b/tests/baselines/reference/classExpressionWithStaticProperties1.errors.txt new file mode 100644 index 00000000000..28e42dd33f1 --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticProperties1.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/classExpressionWithStaticProperties1.ts(1,15): error TS9003: 'class' expressions are not currently supported. + + +==== tests/cases/compiler/classExpressionWithStaticProperties1.ts (1 errors) ==== + var v = class C { static a = 1; static b = 2 }; + ~ +!!! error TS9003: 'class' expressions are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionWithStaticProperties1.js b/tests/baselines/reference/classExpressionWithStaticProperties1.js new file mode 100644 index 00000000000..344dbff50ed --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticProperties1.js @@ -0,0 +1,11 @@ +//// [classExpressionWithStaticProperties1.ts] +var v = class C { static a = 1; static b = 2 }; + +//// [classExpressionWithStaticProperties1.js] +var v = (function () { + function C() { + } + C.a = 1; + C.b = 2; + return C; +})(); diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2.errors.txt b/tests/baselines/reference/classExpressionWithStaticProperties2.errors.txt new file mode 100644 index 00000000000..9a915f70193 --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticProperties2.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/classExpressionWithStaticProperties2.ts(1,15): error TS9003: 'class' expressions are not currently supported. + + +==== tests/cases/compiler/classExpressionWithStaticProperties2.ts (1 errors) ==== + var v = class C { static a = 1; static b }; + ~ +!!! error TS9003: 'class' expressions are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionWithStaticProperties2.js b/tests/baselines/reference/classExpressionWithStaticProperties2.js new file mode 100644 index 00000000000..9ff9c06ffe4 --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticProperties2.js @@ -0,0 +1,10 @@ +//// [classExpressionWithStaticProperties2.ts] +var v = class C { static a = 1; static b }; + +//// [classExpressionWithStaticProperties2.js] +var v = (function () { + function C() { + } + C.a = 1; + return C; +})(); diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES62.errors.txt b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.errors.txt new file mode 100644 index 00000000000..bed4b2c01aa --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts(1,15): error TS9003: 'class' expressions are not currently supported. + + +==== tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts (1 errors) ==== + var v = class C { static a = 1; static b }; + ~ +!!! error TS9003: 'class' expressions are not currently supported. \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js new file mode 100644 index 00000000000..1efa56ecaa2 --- /dev/null +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES62.js @@ -0,0 +1,9 @@ +//// [classExpressionWithStaticPropertiesES62.ts] +var v = class C { static a = 1; static b }; + +//// [classExpressionWithStaticPropertiesES62.js] +var v = (_a = class C { + }, + _a.a = 1, + _a); +var _a; diff --git a/tests/cases/compiler/classExpressionWithStaticProperties1.ts b/tests/cases/compiler/classExpressionWithStaticProperties1.ts new file mode 100644 index 00000000000..19fe035e6a7 --- /dev/null +++ b/tests/cases/compiler/classExpressionWithStaticProperties1.ts @@ -0,0 +1 @@ +var v = class C { static a = 1; static b = 2 }; \ No newline at end of file diff --git a/tests/cases/compiler/classExpressionWithStaticProperties2.ts b/tests/cases/compiler/classExpressionWithStaticProperties2.ts new file mode 100644 index 00000000000..f7b9606b6e0 --- /dev/null +++ b/tests/cases/compiler/classExpressionWithStaticProperties2.ts @@ -0,0 +1 @@ +var v = class C { static a = 1; static b }; \ No newline at end of file diff --git a/tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts b/tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts new file mode 100644 index 00000000000..ee0430eb793 --- /dev/null +++ b/tests/cases/compiler/classExpressionWithStaticPropertiesES62.ts @@ -0,0 +1,2 @@ +//@target: es6 +var v = class C { static a = 1; static b }; \ No newline at end of file