UNPKG

1.55 kBTypeScriptView Raw
1import { AgPromise } from "../utils";
2export interface IFrameworkOverrides {
3 /** Because Angular uses Zones, you should not use setTimeout or setInterval (as it'll keep angular constantly doing dirty checks etc
4 * So to get around this, we allow the framework to specify how to execute setTimeout. The default is to just call the browser setTimeout().
5 */
6 setTimeout(action: any, timeout?: any): void;
7 setInterval(action: any, interval?: any): AgPromise<number>;
8 /** Again because Angular uses Zones, we allow adding some events outside of Zone JS so that we do not kick off
9 * the Angular change detection. We do this for some events ONLY, and not all events, just events that get fired
10 * a lot (eg mouse move), but we need to make sure in AG Grid that we do NOT call any grid callbacks while processing
11 * these events, as we will be outside of ZoneJS and hence Angular2 Change Detection won't work. However it's fine
12 * for our code to result in AG Grid events (and Angular application action on these) as these go through
13 * Event Emitter's.
14 *
15 * This was done by Niall and Sean. The problematic events are mouseover, mouseout, mouseenter and mouseleave.
16 */
17 addEventListener(element: HTMLElement, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
18 dispatchEvent(eventType: string, listener: () => {}, global: boolean): void;
19 frameworkComponent(name: string): any;
20 isFrameworkComponent(comp: any): boolean;
21}