Reputation: 2235
I want to set a field which is called __times
of a Function object. But I got an error in vs-code.
Please tell me what is the appropriate way to do that?
Upvotes: 1
Views: 55
Reputation: 275847
But I got an error in vs-code.
Simplest way I can think of removing the error, add & {__times?:number}
let getCountableWrapper = (func: Function & {__times?:number}) => {
return func.__times = 0;
}
Upvotes: 2