mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
921 B
Diff
26 lines
921 B
Diff
--- old.commonjsAccessExports.errors.txt
|
|
+++ new.commonjsAccessExports.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
-<no content>
|
|
+/a.js(8,9): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+/a.js(12,18): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+
|
|
+
|
|
+==== /a.js (2 errors) ====
|
|
+ exports.x = 0;
|
|
+ exports.x;
|
|
+
|
|
+ // Works nested
|
|
+ {
|
|
+ // 'exports' does not provide a contextual type to a function-class
|
|
+ exports.Cls = function() {
|
|
+ this.x = 0;
|
|
+ ~~~~
|
|
+!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+ }
|
|
+ }
|
|
+
|
|
+ const instance = new exports.Cls();
|
|
+ ~~~~~~~~~~~~~~~~~
|
|
+!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+
|