Improve CollectionConfig
typings
#4437
iway1
started this conversation in
Feature Requests & Ideas
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.
Uh oh!
There was an error while loading. Please reload this page.
-
The current
CollectionConfig
type offers very little type safety.It could easily be changed to take a type parameter which should be passed the generated type for the collection and apply it to all access control at least, maybe hooks, etc in the config which would improve developer experienc while reducing potential for bugs created by passing incorrect types.
Also, it is not clear what the types represent, because they have single letter names. There is no reason a type parameter should not have a descriptive name so that they can be read by humans
Beta Was this translation helpful? Give feedback.
All reactions