-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mask-directive): replaced native KeyboardEvent with type alias (#424
) in order to avoid server errors we have to patch the global object with fake implementation of the KeyboardEvent and add a type alias so that the global object path is executed right before the event reference in the code fixes #399 close #399
- Loading branch information
1 parent
adedb10
commit 7f972ca
Showing
2 changed files
with
14 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// tslint:disable: no-any typedef | ||
declare var global: any; | ||
|
||
(function() { | ||
if (!global.KeyboardEvent) { | ||
global.KeyboardEvent = function(_eventType: any, _init: any) {}; | ||
} | ||
})(); | ||
|
||
export type CustomKeyboardEvent = KeyboardEvent; |
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