File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const TEST_ROUTE = /(|\/)\[[^/]+?](\/|\.html|$)/
33
33
34
34
export const isDynamicRoute = ( route ) => TEST_ROUTE . test ( route )
35
35
36
- export const stripLocale = ( rawPath , locales = [ ] ) => {
36
+ export const stripLocale = ( rawPath : string , locales : Array < string > = [ ] ) => {
37
37
const [ locale , ...segments ] = rawPath . split ( '/' )
38
38
if ( locales . includes ( locale ) ) {
39
39
return segments . join ( '/' )
@@ -48,7 +48,7 @@ export const matchMiddleware = (middleware: Array<string>, filePath: string): st
48
48
filePath === middlewarePath || filePath === `${ middlewarePath } .html` || filePath . startsWith ( `${ middlewarePath } /` ) ,
49
49
)
50
50
51
- export const matchesRedirect = ( file , redirects : Rewrites ) : boolean => {
51
+ export const matchesRedirect = ( file : string , redirects : Rewrites ) : boolean => {
52
52
if ( ! Array . isArray ( redirects ) ) {
53
53
return false
54
54
}
You can’t perform that action at this time.
0 commit comments