mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
--- old.constructorFunctionMergeWithClass.errors.txt
|
|
+++ new.constructorFunctionMergeWithClass.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
-<no content>
|
|
+file1.js(1,5): error TS2300: Duplicate identifier 'SomeClass'.
|
|
+file1.js(2,5): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+file1.js(5,1): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+file2.js(1,7): error TS2300: Duplicate identifier 'SomeClass'.
|
|
+file2.js(2,11): error TS2339: Property 'prop' does not exist on type '() => void'.
|
|
+
|
|
+
|
|
+==== file1.js (3 errors) ====
|
|
+ var SomeClass = function () {
|
|
+ ~~~~~~~~~
|
|
+!!! error TS2300: Duplicate identifier 'SomeClass'.
|
|
+!!! related TS6203 file2.js:1:7: 'SomeClass' was also declared here.
|
|
+ this.otherProp = 0;
|
|
+ ~~~~
|
|
+!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+ };
|
|
+
|
|
+ new SomeClass();
|
|
+ ~~~~~~~~~~~~~~~
|
|
+!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+
|
|
+==== file2.js (2 errors) ====
|
|
+ class SomeClass { }
|
|
+ ~~~~~~~~~
|
|
+!!! error TS2300: Duplicate identifier 'SomeClass'.
|
|
+!!! related TS6203 file1.js:1:5: 'SomeClass' was also declared here.
|
|
+ SomeClass.prop = 0
|
|
+ ~~~~
|
|
+!!! error TS2339: Property 'prop' does not exist on type '() => void'.
|
|
+
|