Defining TypeScript callback type

interface myCallbackType { (myArgument: string): void }

and use it like this:

public myCallback : myCallbackType;

Or

export type ScreenSizeChangeCallback = (prop: ScreenProperties) => void;

References
https://stackoverflow.com/questions/13137350/defining-typescript-callback-type

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.