import { ValuesType } from 'utility-types' ; import { TypeOf , PathsOf , useParams } from '@kbn/typed-react-router-config' ; import { ApmRoutes } from '../components/routing/apm_route_config' ; export function useMaybeApmParams < TPath extends PathsOf < ApmRoutes > > ( path , optional ) { return useParams ( path , optional ) ; } export function useApmParams < TPath extends PathsOf < ApmRoutes > > ( path ) { return useParams ( path ) ! ; } export function useAnyOfApmParams < TPaths extends Array < PathsOf < ApmRoutes > > > ( ... paths ) { return useParams ( ... paths ) ! ; }