typescript error : doesn't the property on the options type -
i have object like:
var options = {title: "", buttons: undefined}
but want add function, this:
options.open(){...}
typescript reported error info: doesn't property on options type,
how can add function options?
var options = { title: "", buttons: undefined, open: function() { console.log("you ran open() function"); } }; options.open()
Comments
Post a Comment