feat: Export the types from the events
and titles
modules
#7009
Labels
area:fast-router
Pertains to fast-router
community:request
Issues specifically reported by a member of the community.
improvement
A non-feature-adding improvement
status:planned
Work is planned
🙋 Feature Request
It's pretty common in my projects to customize/override the
createEventSink()
andcreateTitleBuilder()
methods from theRouterConfiguration
class. But the related types (i.e.RoutingEventSink
,TitleBuilder
, etc.) are not exported by the package.So, I would like to be able to consume these types in my code.
🤔 Expected Behavior
Be able to import types from the
events
andtitles
modules:😯 Current Behavior
A TypeScript error (i.e.
TS2459
) is raised:💁 Possible Solution
Export the
events.ts
andtitles.ts
modules in theindex.ts
file:🔦 Context
I need in some projects to provide custom
RoutingEventSink
andTitleBuilder
in order to customize the router behavior.But the interfaces and classes from the
events
andtitles
modules are not exported, so I can't create types that:RoutingEventSink
andTitleBuilder
interfacesDefaultRoutingEventSink
orDefaultTitleBuilder
classes💻 Examples
Currently, I use the following
RoutingEventSink
implementation to dispatch events. This implementation could be shorter if I could reuse theDefaultRoutingEventSink
class.The text was updated successfully, but these errors were encountered: