mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
24 lines
407 B
TypeScript
24 lines
407 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noImplicitAny: true
|
|
// @strictNullChecks: true
|
|
// @Filename: inferringClassMembersFromAssignments7.js
|
|
class C {
|
|
constructor() {
|
|
var self = this
|
|
self.x = 1
|
|
self.m = function() {
|
|
console.log(self.x)
|
|
}
|
|
}
|
|
mreal() {
|
|
var self = this
|
|
self.y = 2
|
|
}
|
|
}
|
|
const c = new C()
|
|
c.x
|
|
c.y
|
|
c.m()
|