Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types Migration #154

Open
antoniomuso opened this issue Mar 16, 2022 · 1 comment
Open

Types Migration #154

antoniomuso opened this issue Mar 16, 2022 · 1 comment
Labels

Comments

@antoniomuso
Copy link
Contributor

antoniomuso commented Mar 16, 2022

The current types do the overloading of Fastify default types, this creates the problem that we found the plugin types also in data type not reached from the plugin.

fastify.get<ReqReplyMetrics, MetricsConfig>(
        '/',
        { config: { metrics: { metricId: '' } } },
        (request, reply) => {}
    );

For this reason, we can evaluate the migration to generics typing, in this way, it is the user's responsibility to type his data.

@dnlup
Copy link
Contributor

dnlup commented Jan 10, 2023

I've looked into this lately, and I agree with you, the downside of this approach is that we have to use the generics in every point we need it 🤔 , that could be cumbersome in my opinion.

/cc @mdoria12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants