Skip to content

fix: export FieldAccessArgs from payload#14755

Open
andershermansen wants to merge 5 commits intopayloadcms:mainfrom
andershermansen:export-fieldaccessargs
Open

fix: export FieldAccessArgs from payload#14755
andershermansen wants to merge 5 commits intopayloadcms:mainfrom
andershermansen:export-fieldaccessargs

Conversation

@andershermansen
Copy link
Contributor

What?

Export FieldAccessArgs from payload

Why?

Consumers can currently import FieldAccess from payload but not the args type it uses.
This also makes it consistent with Access which is exported alongside AccessArgs.

How?

Added FieldAccessArgs to the root exports.

@andershermansen
Copy link
Contributor Author

My current workaround:

import type { FieldAccess } from 'payload';
type FieldAccessArgs = Parameters<FieldAccess<any>>[0];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant