Hi, I am trying define typescript for access in CollectionConfig
const User = CollectionConfig={
...
access: {
read: ({ req: { user } }) => { // How to define ts for user var here ?
return true;
},
},
...
}
Hi @IRediTOTO - this blog post should get you on track!
After running payload generate:types you should be able to import user from your generated types file and use this in your code above.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.