2018-03-22 17:54:43 +01:00
|
|
|
// @allowJs: true
|
|
|
|
// @checkJs: true
|
|
|
|
// @noEmit: true
|
|
|
|
// @strictNullChecks: true
|
|
|
|
// @Filename: npm-install.js
|
|
|
|
function Installer () {
|
|
|
|
this.args = 0
|
|
|
|
}
|
|
|
|
Installer.prototype.loadArgMetadata = function (next) {
|
|
|
|
// ArrowFunction isn't treated as a this-container
|
|
|
|
(args) => {
|
|
|
|
this.args = 'hi'
|
|
|
|
this.newProperty = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var i = new Installer()
|
2018-03-26 22:42:34 +02:00
|
|
|
i.newProperty = i.args // ok, number ==> number | undefined
|