Skip to content

Commit a1ab264

Browse files
six-standardyook-gijun
andauthored
fix: unexported ShouldBlockFnLocation interface causes TS4023 (#7037)
Co-authored-by: yook-gijun <gijun@dreamend.com>
1 parent e1b019c commit a1ab264

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

docs/router/api/router/useBlockerHook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The `useBlocker` hook accepts a single _required_ argument, an option object:
2020
- Think of this function as telling the router if it should block the navigation, so returning `true` mean that it should block the navigation and `false` meaning that it should be allowed
2121

2222
```ts
23-
interface ShouldBlockFnLocation<...> {
23+
type ShouldBlockFnLocation<...> = {
2424
routeId: TRouteId
2525
fullPath: TFullPath
2626
pathname: string

packages/react-router/src/useBlocker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import type {
1212
RegisteredRouter,
1313
} from '@tanstack/router-core'
1414

15-
interface ShouldBlockFnLocation<
15+
type ShouldBlockFnLocation<
1616
out TRouteId,
1717
out TFullPath,
1818
out TAllParams,
1919
out TFullSearchSchema,
20-
> {
20+
> = {
2121
routeId: TRouteId
2222
fullPath: TFullPath
2323
pathname: string

packages/solid-router/src/useBlocker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import type {
1313
RegisteredRouter,
1414
} from '@tanstack/router-core'
1515

16-
interface ShouldBlockFnLocation<
16+
type ShouldBlockFnLocation<
1717
out TRouteId,
1818
out TFullPath,
1919
out TAllParams,
2020
out TFullSearchSchema,
21-
> {
21+
> = {
2222
routeId: TRouteId
2323
fullPath: TFullPath
2424
pathname: string

packages/vue-router/src/useBlocker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import type {
1212
RegisteredRouter,
1313
} from '@tanstack/router-core'
1414

15-
interface ShouldBlockFnLocation<
15+
type ShouldBlockFnLocation<
1616
out TRouteId,
1717
out TFullPath,
1818
out TAllParams,
1919
out TFullSearchSchema,
20-
> {
20+
> = {
2121
routeId: TRouteId
2222
fullPath: TFullPath
2323
pathname: string

0 commit comments

Comments
 (0)