Expose more types #2090
MoSattler
started this conversation in
Feature Requests & Ideas
Replies: 2 comments
-
Another scenario is when defining access methods inline. {
access: {
read: ({ req: { user }, data }: AccessArgs<MyCollection, User>) => {
/* code */
},
},
} without |
Beta Was this translation helpful? Give feedback.
0 replies
-
Should also add more generic collection types, see related conversation here. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
#2061 was already super helpful, thank you for that!
However, I think that if more types were exported, it would be even more useful.
To give you an example, typing access:
is not great, since it does a lot of guessing. E.g.
user
isany
.What I would love to be able to do, is this:
here I profit from the generic typing for
data
and have already a clearly defineduser
.The type
AccessArgs
already exists, and only needs to be exported to the consumer.Beta Was this translation helpful? Give feedback.
All reactions