@tanstack/react-router 1.58.16 → 1.58.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.58.16",
3
+ "version": "1.58.18",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/index.tsx CHANGED
@@ -74,6 +74,7 @@ export type {
74
74
  LinkProps,
75
75
  LinkComponent,
76
76
  CreateLinkProps,
77
+ MakeOptionalPathParams,
77
78
  } from './link'
78
79
 
79
80
  export type { ParsedLocation } from './location'
package/src/link.tsx CHANGED
@@ -356,7 +356,7 @@ type ResolveRelativeToParams<
356
356
  TToParams
357
357
  >
358
358
 
359
- interface MakeOptionalSearchParams<
359
+ export interface MakeOptionalSearchParams<
360
360
  in out TRouter extends AnyRouter,
361
361
  in out TFrom,
362
362
  in out TTo,
@@ -364,7 +364,7 @@ interface MakeOptionalSearchParams<
364
364
  search?: true | (ParamsReducer<TRouter, 'SEARCH', TFrom, TTo> & {})
365
365
  }
366
366
 
367
- interface MakeOptionalPathParams<
367
+ export interface MakeOptionalPathParams<
368
368
  in out TRouter extends AnyRouter,
369
369
  in out TFrom,
370
370
  in out TTo,
package/src/router.ts CHANGED
@@ -581,12 +581,14 @@ export function createRouter<
581
581
  TDehydrated extends Record<string, any> = Record<string, any>,
582
582
  TSerializedError extends Record<string, any> = Record<string, any>,
583
583
  >(
584
- options: RouterConstructorOptions<
585
- TRouteTree,
586
- TTrailingSlashOption,
587
- TDehydrated,
588
- TSerializedError
589
- >,
584
+ options: undefined extends number
585
+ ? 'strictNullChecks must be enabled in tsconfig.json'
586
+ : RouterConstructorOptions<
587
+ TRouteTree,
588
+ TTrailingSlashOption,
589
+ TDehydrated,
590
+ TSerializedError
591
+ >,
590
592
  ) {
591
593
  return new Router<
592
594
  TRouteTree,