Skip to content

Commit

Permalink
Little cleaner types
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Dec 31, 2023
1 parent 6164870 commit e0dcb8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utilities/createRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ export function createRouter<T extends Routes>(routes: T): Router<T> {
throw 'not implemented'
}

const replace: Router<T>['replace'] = (url) => {
const replace: RouterReplace = (url) => {
return push(url, { replace: true })
}

const forward: Router<T>['forward'] = (number = 1) => {
const forward: RouterNavigation = (number = 1) => {
return go(number)
}

const back: Router<T>['forward'] = (number = -1) => {
const back: RouterNavigation = (number = -1) => {
return go(number)
}

const go: Router<T>['go'] = (_number) => {
const go: RouterNavigation = (_number) => {
throw 'not implemented'
}

Expand Down

0 comments on commit e0dcb8c

Please sign in to comment.