mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
--- old.inferringClassMembersFromAssignments6.errors.txt
|
|
+++ new.inferringClassMembersFromAssignments6.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
-<no content>
|
|
+inferringClassMembersFromAssignments6.js(2,16): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+inferringClassMembersFromAssignments6.js(12,13): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+
|
|
+
|
|
+==== inferringClassMembersFromAssignments6.js (2 errors) ====
|
|
+ function Foonly() {
|
|
+ var self = this
|
|
+ ~~~~
|
|
+!!! error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
+ self.x = 1
|
|
+ self.m = function() {
|
|
+ console.log(self.x)
|
|
+ }
|
|
+ }
|
|
+ Foonly.prototype.mreal = function() {
|
|
+ var self = this
|
|
+ self.y = 2
|
|
+ }
|
|
+ const foo = new Foonly()
|
|
+ ~~~~~~~~~~~~
|
|
+!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
|
|
+ foo.x
|
|
+ foo.y
|
|
+ foo.m()
|
|
+
|