forked from grbsk/ng2-idle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interruptsource): support ssr with the default interrupt sources
enable lazy initialization of the event target and skip the initialization when rendering on a server platform to avoid unsafe references to window or document fix grbsk#77, grbsk#115
- Loading branch information
1 parent
e2af040
commit 01cff2e
Showing
18 changed files
with
172 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,4 @@ | |
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export interface NodeStyleEventEmitter { | ||
addListener: (eventName: string | symbol, handler: NodeEventHandler) => this; | ||
removeListener: (eventName: string | symbol, handler: NodeEventHandler) => this; | ||
} | ||
export declare type NodeEventHandler = (...args: any[]) => void; | ||
export interface NodeCompatibleEventEmitter { | ||
addListener: (eventName: string, handler: NodeEventHandler) => void | {}; | ||
removeListener: (eventName: string, handler: NodeEventHandler) => void | {}; | ||
} | ||
export interface JQueryStyleEventEmitter { | ||
on: (eventName: string, handler: () => void) => void; | ||
off: (eventName: string, handler: () => void) => void; | ||
} | ||
export interface HasEventTargetAddRemove<E> { | ||
addEventListener(type: string, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void; | ||
removeEventListener(type: string, listener?: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void; | ||
} | ||
export declare type EventTargetLike<T> = | ||
HasEventTargetAddRemove<T> | | ||
NodeStyleEventEmitter | | ||
NodeCompatibleEventEmitter | | ||
JQueryStyleEventEmitter; | ||
export declare type EventTarget<T> = EventTargetLike<T> | ArrayLike<EventTargetLike<T>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface InterruptOptions { | ||
platformId: object; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.