-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix typescript errors in next-core (#47415)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation or adding/fixing Examples - The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
- Loading branch information
1 parent
69610fc
commit b95d678
Showing
17 changed files
with
81 additions
and
33 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
packages/next-swc/crates/next-core/js/src/entry/app/hydrate.tsx
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
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
2 changes: 0 additions & 2 deletions
2
packages/next-swc/crates/next-core/js/src/entry/app/server-to-client-ssr.tsx
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
1 change: 0 additions & 1 deletion
1
packages/next-swc/crates/next-core/js/src/entry/app/server-to-client.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy"; | ||
|
||
// @ts-expect-error CLIENT_CHUNKS is provided by rust | ||
import client_id, { chunks, chunkListPath } from "CLIENT_CHUNKS"; | ||
|
||
export default createProxy(JSON.stringify([client_id, chunks, chunkListPath])); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
// TODO(alexkirsz) export * would be preferrable here once supported. | ||
export { | ||
default, | ||
getStaticProps, | ||
__N_SSG, | ||
__N_SSP, | ||
} from "@vercel/turbopack-next/internal/_error"; | ||
export { default } from "@vercel/turbopack-next/internal/_error"; |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// modules provided by rust | ||
|
||
declare module 'PAGE' { | ||
import { | ||
NextPage, | ||
GetStaticPaths, | ||
GetServerSideProps, | ||
GetStaticProps, | ||
} from 'next' | ||
|
||
const Component: NextPage | ||
export default Component | ||
|
||
export const getStaticProps: GetStaticProps | undefined | ||
export const getStaticPaths: GetStaticPaths | undefined | ||
export const getServerSideProps: GetServerSideProps | undefined | ||
} | ||
|
||
declare module 'INNER' { | ||
export * from 'PAGE' | ||
} | ||
|
||
declare module 'CHUNK_GROUP' { | ||
const chunkGroup: import('types/next').ChunkGroup | ||
export default chunkGroup | ||
} | ||
|
||
declare module 'MIDDLEWARE_CHUNK_GROUP' { | ||
export { default } from 'CHUNK_GROUP' | ||
} | ||
|
||
declare module 'INNER_CLIENT_CHUNK_GROUP' { | ||
export { default } from 'CHUNK_GROUP' | ||
} | ||
|
||
declare module 'INNER_EDGE_CHUNK_GROUP' { | ||
export { default } from 'CHUNK_GROUP' | ||
} | ||
|
||
declare module 'ROUTE_CHUNK_GROUP' { | ||
export { default } from 'CHUNK_GROUP' | ||
} | ||
|
||
declare module 'MIDDLEWARE_CONFIG' { | ||
const matcher: string[] | ||
export default { | ||
matcher, | ||
} | ||
} | ||
|
||
declare module 'ENTRY' { | ||
import type { AppRouteModule } from 'next/dist/server/future/route-handlers/app-route-route-handler' | ||
|
||
const handlers: AppRouteModule['handlers'] | ||
export = handlers | ||
} | ||
|
||
declare module 'CLIENT_MODULE' { | ||
export const __turbopack_module_id__: string | ||
} | ||
|
||
declare module 'CLIENT_CHUNKS' { | ||
const moduleId: string | ||
export default moduleId | ||
|
||
export const chunks: any[] | ||
export const chunkListPath: string | ||
} |