Skip to content

Commit

Permalink
Add return type for resolve rewrites
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jan 21, 2021
1 parent 0c8f509 commit e6846b8
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -16,7 +16,12 @@ export default function resolveRewrites(
query: ParsedUrlQuery,
resolveHref: (path: string) => string,
locales?: string[]
) {
): {
matchedPage: boolean
parsedAs: ReturnType<typeof parseRelativeUrl>
asPath: string
resolvedHref?: string
} {
let matchedPage = false
let parsedAs = parseRelativeUrl(asPath)
let fsPathname = removePathTrailingSlash(
Expand Down Expand Up @@ -69,7 +74,6 @@ export default function resolveRewrites(
return {
asPath,
parsedAs,
fsPathname,
matchedPage,
resolvedHref,
}
Expand Down

0 comments on commit e6846b8

Please sign in to comment.