I am defining the following Typescript interface. clickCustomButton1 should return nothing but I am not sure how to specify that.
interface IButtonTemplate {
clickCustomButton1: (); // How can I say this should return nothing?
// more code here
}
I use this in my code like this:
clickCustomButton1: null
then later:
newTopicTests = () => {
}
clickCustomButton1 = this.newTopicTests();
It's giving me an error saying:
Error 2 Cannot convert 'void' to '() => boolean'
Can someone give me an idea what I am doing wrong? What I think I need to do is to specify that clickCustomButton1 and also the newTopicTests do not return anything. But how can I do that with Typescript?