Unverified Commit ce9c8008 authored by Jamiboy Mohammad's avatar Jamiboy Mohammad Committed by GitHub

Remove unnecessary `as any` casts (#100418)

## Summary

Deletes 69 `as any` casts from `packages/next/src` (466 → 397) where the
existing types already make the cast unnecessary.

Each change only removes ` as any`, plus any parentheses that become
redundant. Nothing else is added or changed: no new declarations,
fields, annotations, helpers, or replacement assertions. The emitted
JavaScript is identical, so there is no runtime change.

How the casts were found:

1. Delete every `as any` in `packages/next/src`, locating them through
the TypeScript AST rather than text search.
2. Run `tsc`, put back each cast whose removal caused an error, and
repeat until clean.
3. Retry the casts that were put back one at a time, so removals in the
same file can't mask each other.

Casts that need a type change, a declaration, or code changes to go away
are left to #100419.

## Verification

- Transpiled each changed file on `canary` and on this branch with
`ts.transpileModule` (the package's compiler options, comments stripped)
and compared the output, ignoring whitespace and semicolons: 44/44
identical.
- `tsc --noEmit` passes for `packages/next` and for the root project.
- Colocated jest suites for the touched files pass (9 suites).

<!-- NEXT_JS_LLM -->
parent 9ff8ba95
......@@ -111,7 +111,7 @@ class NextRootCommand extends Command {
// production mode merely because they were launched through this CLI.
if (commandName !== 'upgrade' || !event.getOptionValue('agent')) {
;(process.env as any).NODE_ENV = process.env.NODE_ENV || defaultEnv
;(process.env as any).NEXT_RUNTIME = 'nodejs'
process.env.NEXT_RUNTIME = 'nodejs'
}
if (
......
......@@ -361,7 +361,7 @@ export default function nextTransformSsg({
}
do {
;(path.scope as any).crawl()
path.scope.crawl()
count = 0
path.traverse({
......
......@@ -1080,7 +1080,7 @@ export function createAppPageEntrypoint({
cachedNavigations:
nextConfig.experimental.cachedNavigations ?? false,
clientTraceMetadata:
nextConfig.experimental.clientTraceMetadata || ([] as any),
nextConfig.experimental.clientTraceMetadata || [],
clientParamParsingOrigins:
nextConfig.experimental.clientParamParsingOrigins,
maxPostponedStateSizeBytes: parseMaxPostponedStateSize(
......
......@@ -337,7 +337,7 @@ async function handleRequest(
? await routeModule.handle(nextReq, context)
: await routeModule.prerender(nextReq, context)
;(req as any).fetchMetrics = (context.renderOpts as any).fetchMetrics
;(req as any).fetchMetrics = context.renderOpts.fetchMetrics
let pendingWaitUntil = context.renderOpts.pendingWaitUntil
// Attempt using provided waitUntil if available
......
......@@ -213,8 +213,7 @@ async function requestHandler(
nextConfig.experimental.durableUseCacheEntries
),
cachedNavigations: nextConfig.experimental.cachedNavigations ?? false,
clientTraceMetadata:
nextConfig.experimental.clientTraceMetadata || ([] as any),
clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [],
clientParamParsingOrigins:
nextConfig.experimental.clientParamParsingOrigins,
maxPostponedStateSizeBytes: parseMaxPostponedStateSize(
......@@ -273,7 +272,7 @@ async function requestHandler(
const headers = new Headers()
finalStatus = metadata.statusCode || baseRes.statusCode || 200
// Pull any fetch metrics from the render onto the request.
;(req as any).fetchMetrics = metadata.fetchMetrics
req.fetchMetrics = metadata.fetchMetrics
// Set content type
const contentType = result.contentType || 'text/html; charset=utf-8'
......
......@@ -804,7 +804,7 @@ export default async function getBaseWebpackConfig(
plugins: [
isNodeServer ? new OptionalPeerDependencyResolverPlugin() : undefined,
].filter(Boolean) as webpack.ResolvePluginInstance[],
...((isRspack && jsConfigPath
...(isRspack && jsConfigPath
? {
// Skip paths that are routed to a .d.ts file
restrictions: [/^(?!.*\.d\.ts$).*$/],
......@@ -812,7 +812,7 @@ export default async function getBaseWebpackConfig(
configFile: jsConfigPath,
},
}
: {}) as any),
: {}),
}
// Resolve server-relative imports (e.g. `/styles/foo`) from the app
......@@ -2733,7 +2733,7 @@ export default async function getBaseWebpackConfig(
}
webpackConfig.module.rules = [
...(topRules as any),
...topRules,
{
oneOf: [...innerRules, fileLoader],
},
......
......@@ -47,7 +47,7 @@ const createLazyPostCssPlugin = (
): import('postcss').AcceptedPlugin => {
let result: any = undefined
const plugin = (...args: any[]) => {
if (result === undefined) result = fn() as any
if (result === undefined) result = fn()
if (result.postcss === true) {
return result(...args)
} else if (result.postcss) {
......
......@@ -799,8 +799,7 @@ export class FlightClientEntryPlugin {
}
if (isCSSMod(mod)) {
const sideEffectFree =
mod.factoryMeta && (mod.factoryMeta as any).sideEffectFree
const sideEffectFree = mod.factoryMeta && mod.factoryMeta.sideEffectFree
if (sideEffectFree) {
const unused = !compilation.moduleGraph
......
......@@ -344,8 +344,10 @@ async function printVerboseInfo() {
}
}
const { header, javascriptHeap, sharedObjects } =
report as any as Record<string, any>
const { header, javascriptHeap, sharedObjects } = report as Record<
string,
any
>
// Delete some fields potentially containing sensitive information.
delete header?.cwd
delete header?.commandLine
......@@ -370,7 +372,7 @@ async function printVerboseInfo() {
title: 'next-swc installation',
scripts: {
default: async () => {
const output = [] as any
const output = []
// First, try to load next-swc via loadBindings.
try {
......
......@@ -336,7 +336,7 @@ export const publicAppRouterInstance: AppRouterInstance = {
// Conditionally add experimental_gesturePush when gestureTransition is enabled
if (process.env.__NEXT_GESTURE_TRANSITION) {
;(publicAppRouterInstance as any).experimental_gesturePush = gesturePush
publicAppRouterInstance.experimental_gesturePush = gesturePush
}
// Exists for debugging purposes. Don't use in application code.
......
......@@ -383,7 +383,7 @@ function renderError(renderErrorProps: RenderErrorProps): Promise<any> {
? import('../pages/_error')
.then((errorModule) => {
return import('../pages/_app').then((appModule) => {
App = appModule.default as any as AppComponent
App = appModule.default as AppComponent
renderErrorProps.App = App
return errorModule
})
......@@ -578,7 +578,7 @@ function renderReactElement(
// TODO: Remove shouldHydrate variable when React 18 is stable as it can depend on `reactRoot` existing
shouldHydrate = false
} else {
const startTransition = (React as any).startTransition
const startTransition = React.startTransition
startTransition(() => {
reactRoot.render(reactEl)
})
......
......@@ -8,7 +8,7 @@ import {
import { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'
// This is replaced by the bundler define plugin.
const configEnv = process.env.__NEXT_IMAGE_OPTS as any as
const configEnv = process.env.__NEXT_IMAGE_OPTS as
| ImageConfigForRendering
| undefined
......
......@@ -504,7 +504,7 @@ function processRoutes<T>(
config: NextConfig,
type: 'redirect' | 'rewrite' | 'header'
): T {
const _routes = routes as any as Array<{
const _routes = routes as Array<{
source: string
locale?: false
basePath?: false
......@@ -580,7 +580,7 @@ function processRoutes<T>(
}
newRoutes.push(r)
}
return newRoutes as any as T
return newRoutes as T
}
async function loadRedirects(config: NextConfig): Promise<{
......
function resolveArray<T>(value: T | T[]): T[] {
if (Array.isArray(value)) {
return value as any
return value
}
return [value] as any
return [value]
}
function resolveAsArrayOrUndefined<T>(
......
......@@ -182,7 +182,7 @@ export function getRequiredConfiguration(
nodenext: typescript.ModuleResolutionKind.NodeNext,
node12: (typescript.ModuleResolutionKind as any).Node12,
node:
(typescript.ModuleResolutionKind as any).Node10 ??
typescript.ModuleResolutionKind.Node10 ??
typescript.ModuleResolutionKind.NodeJs,
}
res[optionKey] = moduleResolutionMap[value.toLowerCase()] ?? value
......
......@@ -197,7 +197,7 @@ export async function verifyAndRunTypeScript({
if (err && typeof err === 'object' && 'command' in err) {
console.error(
`Failed to install required TypeScript dependencies, please install them manually to continue:\n` +
(err as any).command +
err.command +
'\n'
)
}
......
......@@ -125,7 +125,7 @@ export class Worker {
const createWorker = () => {
const workerEnv: NodeJS.ProcessEnv = {
...process.env,
...((farmOptions.forkOptions?.env || {}) as any),
...(farmOptions.forkOptions?.env || {}),
IS_NEXT_WORKER: 'true',
NODE_OPTIONS: formattedNodeOptions,
}
......
......@@ -32,7 +32,7 @@ export function tryGetPreviewData(
// Read cached preview data if present
// TODO: use request metadata instead of a symbol
if (SYMBOL_PREVIEW_DATA in req) {
return (req as any)[SYMBOL_PREVIEW_DATA] as any
return req[SYMBOL_PREVIEW_DATA] as any
}
const headers = HeadersAdapter.from(req.headers)
......
......@@ -1304,8 +1304,8 @@ export async function createCombinedPayloadAtDepth(
instantConfig === true ||
(typeof instantConfig === 'object' && instantConfig !== null)
) {
const rawFactory: unknown = (layoutOrPageMod as any)
.__debugCreateInstantConfigStack
const rawFactory: unknown =
layoutOrPageMod.__debugCreateInstantConfigStack
localCreateInstantStack =
typeof rawFactory === 'function' ? (rawFactory as () => Error) : null
}
......
......@@ -49,5 +49,5 @@ export function preconnect(
if (typeof nonce === 'string') {
opts.nonce = nonce
}
;(ReactDOM as any).preconnect(href, opts)
ReactDOM.preconnect(href, opts)
}
......@@ -2975,7 +2975,7 @@ export default abstract class Server<
},
set(target: any, prop, value) {
if (prop === 'fetchMetrics') {
;(req as any).fetchMetrics = value
req.fetchMetrics = value
}
target[prop] = value
return true
......
......@@ -429,7 +429,7 @@ async function handleDefaultConsole(
const withStackEntry = await withLocation(
{
original: consoleArgs,
stack: (entry as any).consoleMethodStack || null,
stack: entry.consoleMethodStack || null,
},
ctx,
distDir,
......
......@@ -1411,7 +1411,7 @@ export async function createHotReloaderTurbopack(
page: name,
bundlePath: `app${name}`,
filename: '',
} as any,
},
}
break
}
......
......@@ -561,7 +561,7 @@ export function onDemandEntryHandler({
let curInvalidator: Invalidator = getInvalidator(
multiCompiler.outputPath
) as any
const curEntries = getEntries(multiCompiler.outputPath) as any
const curEntries = getEntries(multiCompiler.outputPath)
if (!curInvalidator) {
curInvalidator = new Invalidator(multiCompiler)
......@@ -639,7 +639,7 @@ export function onDemandEntryHandler({
}
const startBuilding = (compilation: webpack.Compilation) => {
const compilationName = compilation.name as any as CompilerNameValues
const compilationName = compilation.name as CompilerNameValues
curInvalidator.startBuilding(compilationName)
// Reset deferred entries state for this compilation cycle
// This ensures onBeforeDeferredEntries will be called again during HMR
......
......@@ -777,7 +777,7 @@ export async function initialize(opts: {
// normalize non-allowed status codes
if (!validErrorStatus) {
;(err as any).statusCode = 400
err.statusCode = 400
}
if (typeof err.statusCode === 'number') {
......
......@@ -173,7 +173,7 @@ export function getResolveRoutes(
: 'http'
// When there are hostname and port we build an absolute URL
const initUrl = (config.experimental as any).trustHostHeader
const initUrl = config.experimental.trustHostHeader
? `https://${req.headers.host || 'localhost'}${req.url}`
: opts.port
? `${protocol}://${formatHostname(opts.hostname || 'localhost')}:${
......
......@@ -397,6 +397,6 @@ export function getMaxOldSpaceSize() {
// does this for terminals.
export function blockOnOutputWrites() {
for (const stream of [process.stdout, process.stderr]) {
;(stream as any)._handle?.setBlocking?.(true)
stream._handle?.setBlocking?.(true)
}
}
......@@ -8,7 +8,7 @@ if (typeof (globalThis as any).AsyncLocalStorage !== 'function') {
;(globalThis as any).AsyncLocalStorage = AsyncLocalStorage
}
if (typeof (globalThis as any).WebSocket !== 'function') {
if (typeof globalThis.WebSocket !== 'function') {
Object.defineProperty(globalThis, 'WebSocket', {
configurable: true,
get() {
......
......@@ -283,11 +283,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
`Removing 'unhandledRejection' listener with name \`${listener.name}\`.`
)
// We remove the listener on a dummy event in case it throws. We don't catch it intentionally
originalProcessRemoveListener.call(
process,
MACGUFFIN_EVENT as any,
listener
)
originalProcessRemoveListener.call(process, MACGUFFIN_EVENT, listener)
const index = underlyingListeners.lastIndexOf(listener)
if (index > -1) {
debug?.(`listener found index ${index} and removed.`)
......@@ -317,7 +313,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
)
// We add the listener to a dummy event in case it throws. We don't catch it intentionally
try {
originalProcessOn.call(process, MACGUFFIN_EVENT as any, listener)
originalProcessOn.call(process, MACGUFFIN_EVENT, listener)
} finally {
// We clean up the added event
originalProcessRemoveAllListeners.call(process, MACGUFFIN_EVENT)
......@@ -358,7 +354,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
`Removing 'unhandledRejection' listener with name \`${listener.name}\`.`
)
// We remove the listener on a dummy event in case it throws. We don't catch it intentionally
originalProcessOff.call(process, MACGUFFIN_EVENT as any, listener)
originalProcessOff.call(process, MACGUFFIN_EVENT, listener)
const index = underlyingListeners.lastIndexOf(listener)
if (index > -1) {
debug?.(`listener found index ${index} and removed.`)
......@@ -421,7 +417,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
)
// We add the listener to a dummy event in case it throws. We don't catch it intentionally
try {
originalProcessOnce.call(process, MACGUFFIN_EVENT as any, listener)
originalProcessOnce.call(process, MACGUFFIN_EVENT, listener)
} finally {
// We clean up the added event
originalProcessRemoveAllListeners.call(process, MACGUFFIN_EVENT)
......
......@@ -465,7 +465,7 @@ export async function renderToHTMLImpl(
renderContext: PagesRenderContext
): Promise<RenderResult> {
// Adds support for reading `cookies` in `getServerSideProps` when SSR.
setLazyProp({ req: req as any }, 'cookies', getCookieParser(req.headers))
setLazyProp({ req: req }, 'cookies', getCookieParser(req.headers))
// cssCacheBuster is a workaround for a Safari bug
// (https://bugs.webkit.org/show_bug.cgi?id=187726) where preloaded CSS
......@@ -1401,7 +1401,7 @@ export async function renderToHTMLImpl(
}
// @ts-ignore: documentInitialPropsRes is set
const { docProps } = (documentInitialPropsRes as any) || {}
const { docProps } = documentInitialPropsRes || {}
const documentElement = (htmlProps: any) => {
if (process.env.NEXT_RUNTIME === 'edge') {
return (Document as any)()
......
......@@ -630,7 +630,7 @@ export class AppRouteRouteModule extends RouteModule<
) {
// The handler returned a Thenable. We'll listen for rejections to determine
// if the route is erroring for dynamic reasons.
;(prospectiveResult as any as Promise<unknown>).then(
;(prospectiveResult as Promise<unknown>).then(
() => {},
(err) => {
if (prospectiveController.signal.aborted) {
......
......@@ -361,7 +361,7 @@ export const getHandler = ({
nextConfig.assetPrefix
),
previewProps,
images: nextConfig.images as any,
images: nextConfig.images,
nextConfigOutput: nextConfig.output,
optimizeCss: Boolean(nextConfig.experimental.optimizeCss),
nextScriptWorkers: Boolean(
......@@ -381,8 +381,7 @@ export const getHandler = ({
experimental: {
clientTraceMetadata:
nextConfig.experimental.clientTraceMetadata ||
([] as any),
nextConfig.experimental.clientTraceMetadata || [],
},
locale,
......
......@@ -626,7 +626,7 @@ export abstract class RouteModule<
)
}
let serverFilesManifest = self.__SERVER_FILES_MANIFEST as any as
let serverFilesManifest = self.__SERVER_FILES_MANIFEST as
| RequiredServerFilesManifest
| undefined
const routerServerContext = this.getRouterServerContext(req)
......
......@@ -260,7 +260,7 @@ export async function adapter(
// leverage the shared instance if not we need
// to create a fresh cache instance each time
!(globalThis as any).__incrementalCacheShared &&
(params as any).IncrementalCache
params.IncrementalCache
) {
;(globalThis as any).__incrementalCache = new (
params as {
......
......@@ -237,16 +237,16 @@ describe('HeadersAdapter', () => {
expect(sealed.get('x-custom-header')).toBe('custom')
// These methods are not available on the sealed instance
expect(() =>
(sealed as any).append('x-custom-header', 'custom2')
).toThrow(ReadonlyHeadersError)
expect(() =>
(sealed as any).append('x-custom-header', 'custom2')
).toThrow(ReadonlyHeadersError)
expect(() => (sealed as any).delete('x-custom-header')).toThrow(
expect(() => sealed.append('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
expect(() => (sealed as any).set('x-custom-header', 'custom2')).toThrow(
expect(() => sealed.append('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
expect(() => sealed.delete('x-custom-header')).toThrow(
ReadonlyHeadersError
)
expect(() => sealed.set('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
......@@ -264,13 +264,13 @@ describe('HeadersAdapter', () => {
expect(sealed).toBeInstanceOf(Headers)
// These methods are not available on the sealed instance
expect(() =>
(sealed as any).append('x-custom-header', 'custom2')
).toThrow(ReadonlyHeadersError)
expect(() => (sealed as any).delete('x-custom-header')).toThrow(
expect(() => sealed.append('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
expect(() => (sealed as any).set('x-custom-header', 'custom2')).toThrow(
expect(() => sealed.delete('x-custom-header')).toThrow(
ReadonlyHeadersError
)
expect(() => sealed.set('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
......@@ -291,13 +291,13 @@ describe('HeadersAdapter', () => {
expect(sealed).toBeInstanceOf(Headers)
// These methods are not available on the sealed instance
expect(() =>
(sealed as any).append('x-custom-header', 'custom2')
).toThrow(ReadonlyHeadersError)
expect(() => (sealed as any).delete('x-custom-header')).toThrow(
expect(() => sealed.append('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
expect(() => sealed.delete('x-custom-header')).toThrow(
ReadonlyHeadersError
)
expect(() => (sealed as any).set('x-custom-header', 'custom2')).toThrow(
expect(() => sealed.set('x-custom-header', 'custom2')).toThrow(
ReadonlyHeadersError
)
......@@ -427,9 +427,7 @@ describe('HeadersAdapter', () => {
expect(headers.get('rsc')).toBe('1')
expect(headers.get('x-nextjs-request-id')).toBe('req-1')
expect(() => (sealed as any).delete('rsc')).toThrow(
ReadonlyHeadersError
)
expect(() => sealed.delete('rsc')).toThrow(ReadonlyHeadersError)
expect(headers.get('rsc')).toBe('1')
})
......
......@@ -18,12 +18,8 @@ describe('RequestCookiesAdapter', () => {
expect(sealed.get('bar')).toEqual({ name: 'bar', value: 'foo' })
// These methods are not available on the sealed instance
expect(() => (sealed as any).set('foo', 'bar2')).toThrow(
ReadonlyRequestCookiesError
)
expect(() => (sealed as any).delete('foo')).toThrow(
ReadonlyRequestCookiesError
)
expect(() => sealed.set('foo', 'bar2')).toThrow(ReadonlyRequestCookiesError)
expect(() => sealed.delete('foo')).toThrow(ReadonlyRequestCookiesError)
expect(() => (sealed as any).clear()).toThrow(ReadonlyRequestCookiesError)
// Ensure nothing was actually changed.
......@@ -41,12 +37,8 @@ describe('RequestCookiesAdapter', () => {
expect(sealed.get('bar')).toEqual(undefined)
// These methods are not available on the sealed instance
expect(() => (sealed as any).set('foo', 'bar2')).toThrow(
ReadonlyRequestCookiesError
)
expect(() => (sealed as any).delete('foo')).toThrow(
ReadonlyRequestCookiesError
)
expect(() => sealed.set('foo', 'bar2')).toThrow(ReadonlyRequestCookiesError)
expect(() => sealed.delete('foo')).toThrow(ReadonlyRequestCookiesError)
expect(() => (sealed as any).clear()).toThrow(ReadonlyRequestCookiesError)
// Ensure nothing was actually changed.
......
......@@ -109,7 +109,7 @@ export const GlobalLayoutRouterContext = React.createContext<{
previousNextUrl: string | null
}>(null as any)
export const TemplateContext = React.createContext<React.ReactNode>(null as any)
export const TemplateContext = React.createContext<React.ReactNode>(null)
if (process.env.NODE_ENV !== 'production') {
AppRouterContext.displayName = 'AppRouterContext'
......
......@@ -15,7 +15,7 @@ const defaultLoader = Reflect.get(defaultLoaderModule, 'default')
// The bundler replaces this with fixed options. Public getImageProps has no
// context, so prepare those options once when the module is loaded.
const imageConfig = prepareImageConfig(
process.env.__NEXT_IMAGE_OPTS as any as ImageConfigForRendering | undefined
process.env.__NEXT_IMAGE_OPTS as ImageConfigForRendering | undefined
)
/**
......
......@@ -94,7 +94,7 @@ function createLoadableComponent(loadFn: any, options: any) {
if (!initialized && typeof window !== 'undefined') {
// require.resolveWeak check is needed for environments that don't have it available like Jest
const moduleIds =
opts.webpack && typeof (require as any).resolveWeak === 'function'
opts.webpack && typeof require.resolveWeak === 'function'
? opts.webpack()
: opts.modules
if (moduleIds) {
......
......@@ -1138,7 +1138,7 @@ export default class Router implements BaseRouter {
;({
__routerFilterStatic: staticFilterData,
__routerFilterDynamic: dynamicFilterData,
} = (await getClientBuildManifest()) as any as {
} = (await getClientBuildManifest()) as {
__routerFilterStatic?: Filter
__routerFilterDynamic?: Filter
})
......
......@@ -121,7 +121,7 @@ export function safeRegexpToFunction<
// Clean parameters before returning
return {
...result,
params: stripParameterSeparators(result.params as any) as T,
params: stripParameterSeparators(result.params) as T,
}
}
}
......
......@@ -11,7 +11,7 @@ export type ServerInsertedHTMLHook = (callbacks: () => React.ReactNode) => void
//
// More info: https://github.com/vercel/next.js/pull/40686
export const ServerInsertedHTMLContext =
React.createContext<ServerInsertedHTMLHook | null>(null as any)
React.createContext<ServerInsertedHTMLHook | null>(null)
export function useServerInsertedHTML(callback: () => React.ReactNode): void {
const addInsertedServerHTMLCallback = useContext(ServerInsertedHTMLContext)
......
......@@ -36,7 +36,7 @@ export function backgroundLogCompilationEvents(
// Close the iterator as soon as the signal fires so the for-await loop
// exits without waiting for the next compilation event.
signal?.addEventListener('abort', () => iterator.return?.(undefined as any), {
signal?.addEventListener('abort', () => iterator.return?.(undefined), {
once: true,
})
......
......@@ -450,7 +450,7 @@ export class TurbopackManifestLoader {
sortedPageKeys: string[]
): ClientBuildManifest {
const manifest = {
__rewrites: rewrites as any,
__rewrites: rewrites,
sortedPages: sortedPageKeys,
}
for (const m of manifests) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment