-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Investigation on TypeScript structure #4081
Copy link
Copy link
Closed
Labels
discussionIssues or PRs with this label will never staleIssues or PRs with this label will never stalefeature requestNew feature to be addedNew feature to be addedhelp wantedHelp the community by contributing to this issueHelp the community by contributing to this issuesemver-majorIssue or PR that should land as semver majorIssue or PR that should land as semver majorsemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minortypescriptTypeScript relatedTypeScript related
Metadata
Metadata
Assignees
Labels
discussionIssues or PRs with this label will never staleIssues or PRs with this label will never stalefeature requestNew feature to be addedNew feature to be addedhelp wantedHelp the community by contributing to this issueHelp the community by contributing to this issuesemver-majorIssue or PR that should land as semver majorIssue or PR that should land as semver majorsemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minortypescriptTypeScript relatedTypeScript related
Prerequisites
🚀 Feature Proposal
Currently, the typing system of
fastifyis just good to use.However, it restricted the usage on certain way and may not be good enough.
I open a new issue here for investigating how can we improve the typing system before
fastify@5lands (around 1 year later).We have plenty idea of this area but do not have enough effort to push thing forward.
I hope community can put their effort together with us and improve this area.
We add a lot of Generic in the typings system, it is easy to use without modify the Generic.
However, when we override one of them. It will collide with the others types.
Unify of using object Generic can prevent this problem.
#3642 is the first attempt of refactoring.
fastifytypesThis approach is similar to
ExpressandKoawhich is optimal solution for stacking up decorated instance.fastify/fastify-type-provider-typebox#5 (comment)
Motivation
No response
Example
No response