How do I use the types of a plugin without adding that as a subroute. #1421
Unanswered
touhidurrr
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Lets say a plugin is intended to add the route
/test
to root. But it also modifies context so you need its types in some other plugin that is intended to add the route/someplugin
to root.Now using
.use(test)
do let you use the context types of/test
but it also adds the following route/someplugin/test
. If I only want to use the types then how can I do it?Note: I did try naming plugin
test
(new Elysia({ name: 'test' })
) and do.as('global')
to make sure the plugin is only used once. And I also made sure that root uses this plugin first. But this does not work and2
routes are added anyways instead of the intended1
.Beta Was this translation helpful? Give feedback.
All reactions