Closed
Description
var Validator = function Validator(parser) {
this.flags = "gim"
};
Validator.prototype.num = 12
/**
* @param {Validator} state
*/
var validateRegExpFlags = function(state) {
return state.flags
};
Expected behavior:
state.flags: string
Actual behavior:
Property 'flags' does not exist on type 'Validator'
Note that if you use a value like new Validator().flags
, the property is resolved just fine. If you remove the prototype property assignment, the property also resolves.
Seems like an interaction of the contructor-functions-as-classes + stricter-jsdoc-type-references PR.