Skip to content

Commit

Permalink
fix typescript errors in next-core (#47607)
Browse files Browse the repository at this point in the history
Fixes WEB-809
  • Loading branch information
ForsakenHarmony committed Mar 29, 2023
1 parent 9d9bd8b commit 46151dd
Show file tree
Hide file tree
Showing 23 changed files with 104 additions and 39 deletions.
4 changes: 3 additions & 1 deletion packages/next-swc/crates/next-core/js/package.json
Expand Up @@ -5,8 +5,10 @@
"license": "UNLICENSED",
"private": true,
"scripts": {
"build": "pnpm build:compiled && pnpm check",
"build:compiled": "node build.mjs",
"check": "tsc --noEmit",
"build:compiled": "node build.mjs"
"dev": "pnpm build"
},
"dependencies": {
"@vercel/turbopack-dev-runtime": "https://gitpkg.now.sh/vercel/turbo/crates/turbopack-dev/js?turbopack-230321.3",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,7 +1,6 @@
import ReactDOMClient from "react-dom/client";
import React, { use } from "react";
import type { ReactElement } from "react";
// @ts-expect-error
import { version } from "next/package.json";
import { createFromReadableStream } from "next/dist/compiled/react-server-dom-webpack/client";
import { callServer } from 'next/dist/client/app-call-server';
Expand Down
Expand Up @@ -8,6 +8,5 @@ import * as serverHooks from "next/dist/client/components/hooks-server-context.j
export { serverHooks };
export { renderToReadableStream } from "next/dist/compiled/react-server-dom-webpack/server.edge";

// @ts-expect-error PAGE is provided by rust
import * as module from "PAGE";
export { module };
Expand Up @@ -11,7 +11,6 @@ import { requestAsyncStorage } from "next/dist/client/components/request-async-s

enhanceGlobals();

// @ts-expect-error ENTRY is set from rust code
import * as handlers from "ENTRY";
const mod = {
handlers,
Expand All @@ -25,6 +24,7 @@ const mod = {
const handler = getHandle({
mod,
page: `/${PAGE}`,
nextConfigOutput: undefined
});

// @ts-ignore
Expand Down
Expand Up @@ -17,7 +17,7 @@ import {
startHandler(async ({ request, response, query, params, path }) => {
const edgeInfo = {
name: "edge",
paths: chunkGroup.map((chunk: string) =>
paths: chunkGroup.map((chunk) =>
join(process.cwd(), ".next/server/app", chunk)
),
wasm: [],
Expand Down

0 comments on commit 46151dd

Please sign in to comment.