Download next.js/packages/next/src/client/components/is-next-router-error.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/components/is-next-router-error.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/client/components/is-next-router-error.ts
-
curl -L -o is-next-router-error.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/client/components/is-next-router-error.ts
546 Bytes
| import { | |
| isHTTPAccessFallbackError, | |
| type HTTPAccessFallbackError, | |
| } from './http-access-fallback/http-access-fallback' | |
| import { isRedirectError, type RedirectError } from './redirect-error' | |
| /** | |
| * Returns true if the error is a navigation signal error. These errors are | |
| * thrown by user code to perform navigation operations and interrupt the React | |
| * render. | |
| */ | |
| export function isNextRouterError( | |
| error: unknown | |
| ): error is RedirectError | HTTPAccessFallbackError { | |
| return isRedirectError(error) || isHTTPAccessFallbackError(error) | |
| } | |