In the below code, onResizeWindowHandles has type any, but must be the array of functions:
export default class PageLayoutManager {
private $Window: JQuery<Window>;
private onResizeWindowHandlers: any;
constructor () {
this.$Window = $(window);
this.handleWindowResize();
this.onResizeWindowHandlers = new Array();
}
public addWindowOnResizeHandler(newHandler: any): void {
this.onResizeWindowHandlers.push(newHandler);
}
private handleWindowResize(): void {
this.$Window.on('resize', () => {
this.onResizeWindowHandlers.forEach(handlerFunction => {
handlerFunction();
})
});
}
}
How I can correctly set the type for onResizeWindowHandles?
