chore(deps): prepare us to typescript 4

This commit is contained in:
Fredrik Adelöw
2020-08-28 13:45:11 +02:00
parent 6d752757c2
commit 82ba3169fe
2 changed files with 8 additions and 3 deletions
@@ -54,6 +54,8 @@ export default function mockBreakpoint(initialBreakpoint: Breakpoint = 'xl') {
let currentBreakpoint = initialBreakpoint;
const queries = Array<Query>();
const previousMatchMedia: any = (window as any).matchMedia;
(window as any).matchMedia = (query: string): QueryList => {
const listeners = new Set<Listener>();
@@ -85,7 +87,7 @@ export default function mockBreakpoint(initialBreakpoint: Breakpoint = 'xl') {
});
},
remove() {
delete window.matchMedia;
(window as any).matchMedia = previousMatchMedia;
},
};
}