I have an interface like this:
export interface IDefaultAction extends Object {
type: string
(dispatch: Dispatch<IStateObject>, getState: () => IStateObject, extraArgument: any): any;
}
is there any way I can make the second line in the interface optional?
(dispatch: Dispatch<IStateObject>, getState: () => IStateObject, extraArgument: any): any;
and if so, how?
and also if possible please explain or point me to the right documentation which explains what does this interface mean:
interface IA {
():any;
}
I just can't figure out this syntax
():something;
Thanks!
edit:
I am trying to extend this:
export type ThunkAction<R, S, E> = (dispatch: Dispatch<S>, getState: () => S,
extraArgument: E) => R;
in my own interface:
export interface IDefaultAction {
type: string;
}
but optionally, so the only thing I could think of, is to modify the original(ThunkAction) and make all inside it optional, but I don't see how.