Closed
Description
TypeScript Version: 3.9.7
Search Terms:
this, alias
Code
// @filename: a.js
var libObjects = {}
libObjects.dataService = function (url) {
var scope = this;
/**
* updates some data
*/
scope.updateData = function () {
//...
}
/**
* stop all processing
*/
scope.disable = function () {
//...
}
}
// @filename: b.js
var service = new libObjects.dataService("");
service
// ^?
Expected behavior:
service: dataService
and should offer updateData
and disable
in completion.
Actual behavior:
service: any
Playground Link: Workbench Repro
Related Issues:
#36618