Skip to content

types: remove middleware option from ValidateSyncOptions#16346

Closed
gourabsingha1 wants to merge 1 commit into
Automattic:masterfrom
gourabsingha1:fix/gh-16291-validate-sync-deprecation
Closed

types: remove middleware option from ValidateSyncOptions#16346
gourabsingha1 wants to merge 1 commit into
Automattic:masterfrom
gourabsingha1:fix/gh-16291-validate-sync-deprecation

Conversation

@gourabsingha1

Copy link
Copy Markdown

What does this PR do?

Closes #16291

Removes the middleware property from ValidateSyncOptions in TypeScript definitions.

Why?

As discussed in #16291, validateSync() does not execute middleware at all in practice, making the option misleading or redundant. Removing the middleware property aligns the TypeScript typings with the runtime implementation of validateSync().

Strips the ignored and deprecated `middleware` property from `ValidateSyncOptions`
type declarations to ensure consistency with runtime behavior and resolve issue Automattic#16291.
@AbdelrahmanHafez

Copy link
Copy Markdown
Collaborator

It's intentionally left as middleware: never;

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validateSync middleware cycle

2 participants