Skip to content

Commit

Permalink
add soft todo about improving error message (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Oct 27, 2024
1 parent 87d5c46 commit 9cde06a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion vike/shared/hooks/getHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ import pc from '@brillout/picocolors'
const globalObject = getGlobalObject<{ isPrerendering?: true }>('getHook.ts', {})

type Hook = HookLoc & { hookFn: HookFn; hookTimeout: HookTimeout }
type HookLoc = { hookName: HookName; hookFilePath: string }
type HookLoc = {
hookName: HookName
/* Once we remove the old design, we'll be able to use the full path information.
* Le'ts then do this:
* ```diff
* - Following error was thrown by the onRenderHtml() hook defined at vike-react/__internal/integration/onRenderHtml
* + Following error was thrown by the onRenderHtml() hook defined by vike-react
* ```
import type {FilePath} from '../page-configs/FilePath.js'
hookFilePath: FilePath
*/
hookFilePath: string
}
type HookFn = (arg: unknown) => unknown
type HookTimeout = {
error: number | false
Expand Down

0 comments on commit 9cde06a

Please sign in to comment.