Skip to content

Commit e8c190a

Browse files
ascorbicTiffany Le-Nguyen
andauthored
chore: apply suggestions from code review
Co-authored-by: Tiffany Le-Nguyen <[email protected]>
1 parent 7969598 commit e8c190a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers/files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const TEST_ROUTE = /(|\/)\[[^/]+?](\/|\.html|$)/
3333

3434
export const isDynamicRoute = (route) => TEST_ROUTE.test(route)
3535

36-
export const stripLocale = (rawPath, locales = []) => {
36+
export const stripLocale = (rawPath: string, locales: Array<string> = []) => {
3737
const [locale, ...segments] = rawPath.split('/')
3838
if (locales.includes(locale)) {
3939
return segments.join('/')
@@ -48,7 +48,7 @@ export const matchMiddleware = (middleware: Array<string>, filePath: string): st
4848
filePath === middlewarePath || filePath === `${middlewarePath}.html` || filePath.startsWith(`${middlewarePath}/`),
4949
)
5050

51-
export const matchesRedirect = (file, redirects: Rewrites): boolean => {
51+
export const matchesRedirect = (file: string, redirects: Rewrites): boolean => {
5252
if (!Array.isArray(redirects)) {
5353
return false
5454
}

0 commit comments

Comments
 (0)