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

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -