Exposing Types
#13163
Replies: 1 comment 1 reply
-
Why do you need the server type? It's not a public api and can change at any time. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hello,
There's a lot of types that Next does export pretty clearly. It looks like the pattern for this is typically an index file in the root that does an
export * from 'dist/something/index'
. Not all the files, particularly those underdist/next/server
are exposed. If I want to getServer
then I have to doimport Server from 'next/dist/next-server/server/next-server';
Is that how most folks are doing it?You can also leverage ReturnType, but it'd be nice if there was a consistent way of importing types.
Beta Was this translation helpful? Give feedback.
All reactions