Merge pull request #2155 from spotify/freben/bumpz

chore: prepare us for typescript 4
This commit is contained in:
Fredrik Adelöw
2020-08-31 11:09:14 +02:00
committed by GitHub
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;
},
};
}
+5 -2
View File
@@ -86,8 +86,11 @@ function checkTypes(pkg) {
'utf8',
);
const deps = (typeDecl.match(/from '.*'/g) || [])
.map(match => match.replace(/from '(.*)'/, '$1'))
.filter(n => !n.startsWith('.'));
.map(match => match.replace(/^.*from '(.*)'.*$/, '$1'))
.filter(
n =>
!(n.startsWith('.') || n === pkg.name || n.startsWith(`${pkg.name}/`)),
);
const errors = [];
const typeDeps = [];