export config types for Rewrite
/ Redirect
/ Header
#82715
stefanprobst
started this conversation in
Ideas
Replies: 0 comments
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.
-
Goals
being able to import types for
Rewrite
/Redirect
/Header
innext.config.ts
, instead of getting them viaAwaited<ReturnType<NonNullable<Config["headers"]>>>
Awaited<ReturnType<NonNullable<Config["redirects"]>>>
Awaited<ReturnType<NonNullable<Config["rewrites"]>>>
or importing from
import { Header, Redirect, Rewrite } from "next/dist/lib/load-custom-routes";
Non-Goals
No response
Background
i find that in
next.config.ts
i often write something like this:Proposal
export
Rewrite
/Redirect
/Header
types as part of public apiBeta Was this translation helpful? Give feedback.
All reactions