import type { ComponentType } from 'react' ; import { createToken } from '@tinkoff/dippy' ; import type { Action } from '@tramvai/core' ; export interface RegistryComponentExtend { redirects ? : any ; actions ? : Action [ ] ; } export type Component = ComponentType & RegistryComponentExtend ; description export const COMPONENT_REGISTRY_TOKEN = createToken < ComponentRegistry > ( 'componentRegistry' ) ; export interface ComponentRegistry { components : Record < string , Component > ; add ( name , component , group ? ) : void ; get ( name , group ? ) : Component ; getComponentParam < T > ( param , defaultValue , component , group ? ) : T ; }