mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
22 lines
396 B
TypeScript
22 lines
396 B
TypeScript
|
// @noEmit: true
|
||
|
// @allowJs: true
|
||
|
// @checkJs: true
|
||
|
// @noImplicitAny: true
|
||
|
// @strictNullChecks: true
|
||
|
// @Filename: inferringClassMembersFromAssignments6.js
|
||
|
function Foonly() {
|
||
|
var self = this
|
||
|
self.x = 1
|
||
|
self.m = function() {
|
||
|
console.log(self.x)
|
||
|
}
|
||
|
}
|
||
|
Foonly.prototype.mreal = function() {
|
||
|
var self = this
|
||
|
self.y = 2
|
||
|
}
|
||
|
const foo = new Foonly()
|
||
|
foo.x
|
||
|
foo.y
|
||
|
foo.m()
|