How can I create an interface which holds functions. I have tried this:
interface ILeonardo {
addState(state: ILeonardoState),
addStates(arr: Array<ILeonardoState>)
}
interface ILeonardoState {
name: string,
url: string,
verb: string,
options: Array<{name: string, status: number, data?: any, delay?: number}>
}
but then I can't add the return type of addState and addStates.