Chore: fix some more types (#76535)

* clean up some e2e/runtime types

* fix some stories

* some more fixes

* fix route props

* update unit tests

* update more unit tests

* don't throw here
This commit is contained in:
Ashley Harrison
2023-10-24 11:53:22 +01:00
committed by GitHub
parent 272a901e5e
commit ced065c7e9
24 changed files with 90 additions and 125 deletions

View File

@@ -1,5 +1,6 @@
import { createMemoryHistory } from 'history';
import { merge } from 'lodash';
import { match } from 'react-router-dom';
import { GrafanaRouteComponentProps } from '../types';
@@ -14,12 +15,12 @@ export function getRouteComponentProps<T extends {} = {}, Q extends Record<strin
state: {},
search: '',
},
match: { params: {} } as any,
match: { params: {} } as match<T>,
route: {
path: '',
component: () => null,
},
queryParams: {} as any,
queryParams: {} as Q,
};
return merge(overrides, defaults);