Files
tsgo/testdata/baselines/reference/submodule/conformance/jsDeclarationsExportAssignedClassExpressionAnonymousWithSub(target=es2015).errors.txt.diff

34 lines
1.1 KiB
Diff

--- old.jsDeclarationsExportAssignedClassExpressionAnonymousWithSub(target=es2015).errors.txt
+++ new.jsDeclarationsExportAssignedClassExpressionAnonymousWithSub(target=es2015).errors.txt
@@= skipped -0, +0 lines =@@
-<no content>
+index.js(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
+index.js(9,16): error TS2339: Property 'Sub' does not exist on type 'typeof exports'.
+
+
+==== index.js (2 errors) ====
+ module.exports = class {
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ /**
+ ~~~~~~~
+ * @param {number} p
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+ ~~~~~~~
+ constructor(p) {
+ ~~~~~~~~~~~~~~~~~~~~
+ this.t = 12 + p;
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ }
+ ~~~~~
+ }
+ ~
+!!! error TS2309: An export assignment cannot be used in a module with other exported elements.
+ module.exports.Sub = class {
+ ~~~
+!!! error TS2339: Property 'Sub' does not exist on type 'typeof exports'.
+ constructor() {
+ this.instance = new module.exports(10);
+ }
+ }
+