-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ts): match
MiddlewareConfig
with documentation (#61718)
### What? Fix the user-facing `MiddlewareConfig` interface. ~While in the codebase, I also made the incoming config object type a bit more strict by converting from `any` to `unknown`.~ Reverted, as we do a config assertion already in a [different place](https://github.com/vercel/next.js/blob/canary/packages/next-swc/crates/next-custom-transforms/src/transforms/page_config.rs/#L171-L180). ### Why? The interface we previously exposed was the one we used internally, _after_ we did some parsing on the config object, which is different from what the user is expected to pass. ### How? I separated the internal type to its own `MiddlewareConfigParsed` interface. Closes NEXT-2375 Fixes #61705 Ref: #61576
- Loading branch information
1 parent
d04cfb6
commit 53fd5ac
Showing
3 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters