-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace match with definition for ensure, added dev handler…
… interface + typings
- Loading branch information
Showing
7 changed files
with
108 additions
and
83 deletions.
There are no files selected for viewing
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,27 @@ | ||
import type { IncomingMessage } from 'http' | ||
import type { NextJsHotReloaderInterface } from '../dev/hot-reloader-types' | ||
|
||
/** | ||
* The interface for the dev handlers global. | ||
*/ | ||
export interface DevHandlers { | ||
ensurePage( | ||
dir: string, | ||
...args: Parameters<NextJsHotReloaderInterface['ensurePage']> | ||
): Promise<void> | ||
logErrorWithOriginalStack( | ||
dir: string, | ||
err: unknown, | ||
type?: 'unhandledRejection' | 'uncaughtException' | 'warning' | 'app-dir' | ||
): Promise<void> | ||
getFallbackErrorComponents(dir: string): Promise<void> | ||
getCompilationError(dir: string, page: string): Promise<any> | ||
revalidate( | ||
dir: string, | ||
opts: { | ||
urlPath: string | ||
revalidateHeaders: IncomingMessage['headers'] | ||
opts: any | ||
} | ||
): Promise<{}> | ||
} |
Oops, something went wrong.