I have a function call like this:
var myVar = myFunction({
property: 'prop',
functionProperty() {
console.log(this.property);
},
functionProperty2() {
this.functionProperty();
}
});
Is there any way to add typings to the object you are passing to the function without declaring it first?
And another question, is there a way to make this.functionProperty() know that this refers to the object? Working with VSCode when hovering it doesn't recognize the keyword this as the object.