Is it possible to define a variable in TypeScript like a string or as a Function, but with specific parameters?
I am aware of how to define a string actionGetData: string;
and a function
actionLoaded?(event: any, ui: any): void;
, but when I try to define a variable like a string or a Function with particular parameters, I encounter an error.
actionToDoubleClick?: 'Details' | 'Edit' | 'Create' | (event: any, ui: any);
I can define the variable like
actionToDoubleClick?: 'Details' | 'Edit' | 'Create' | Function;
, but this allows any function and I specifically need a function with two params.
Any suggestions would be appreciated. Thank you.