@remix-run/router 0.0.0-experimental-e7e9ce6e → 0.0.0-experimental-5f6f59a6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/router.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { History, Location, Path, To } from "./history";
2
2
  import { Action as HistoryAction } from "./history";
3
- import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, FormEncType, FormMethod, RouteData, AgnosticRouteObject, AgnosticRouteMatch } from "./utils";
3
+ import type { AgnosticDataRouteMatch, AgnosticDataRouteObject, FormEncType, FormMethod, DetectErrorBoundaryFunction, RouteData, AgnosticRouteObject, AgnosticRouteMatch } from "./utils";
4
4
  import { DeferredData } from "./utils";
5
5
  /**
6
6
  * A Router instance manages all navigation and data loading/mutations
@@ -244,6 +244,7 @@ export interface RouterInit {
244
244
  routes: AgnosticRouteObject[];
245
245
  history: History;
246
246
  hydrationData?: HydrationState;
247
+ detectErrorBoundary?: DetectErrorBoundaryFunction;
247
248
  }
248
249
  /**
249
250
  * State returned from a server-side query() call
@@ -369,7 +370,6 @@ declare type FetcherStates<TData = any> = {
369
370
  formEncType: undefined;
370
371
  formData: undefined;
371
372
  data: TData | undefined;
372
- " _hasFetcherDoneAnything "?: boolean;
373
373
  };
374
374
  Loading: {
375
375
  state: "loading";
@@ -378,7 +378,6 @@ declare type FetcherStates<TData = any> = {
378
378
  formEncType: FormEncType | undefined;
379
379
  formData: FormData | undefined;
380
380
  data: TData | undefined;
381
- " _hasFetcherDoneAnything "?: boolean;
382
381
  };
383
382
  Submitting: {
384
383
  state: "submitting";
@@ -387,7 +386,6 @@ declare type FetcherStates<TData = any> = {
387
386
  formEncType: FormEncType;
388
387
  formData: FormData;
389
388
  data: TData | undefined;
390
- " _hasFetcherDoneAnything "?: boolean;
391
389
  };
392
390
  };
393
391
  export declare type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
@@ -423,9 +421,11 @@ export declare const IDLE_BLOCKER: BlockerUnblocked;
423
421
  */
424
422
  export declare function createRouter(init: RouterInit): Router;
425
423
  export declare const UNSAFE_DEFERRED_SYMBOL: unique symbol;
426
- export declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: {
424
+ export interface CreateStaticHandlerOptions {
427
425
  basename?: string;
428
- }): StaticHandler;
426
+ detectErrorBoundary?: DetectErrorBoundaryFunction;
427
+ }
428
+ export declare function createStaticHandler(routes: AgnosticRouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
429
429
  /**
430
430
  * Given an existing StaticHandlerContext and an error thrown at render time,
431
431
  * provide an updated StaticHandlerContext suitable for a second SSR render