Skip to content

Commit

Permalink
fix: treat createMatchPath args as opaque
Browse files Browse the repository at this point in the history
  • Loading branch information
gcangussu committed Sep 1, 2020
1 parent 54eb91b commit b99425e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,8 @@ function getMappedPath(source: string, file: string) {
* Like `createMatchPath` from `tsconfig-paths` package, but considers
* that the module id could have a .js or .jsx extension.
*/
const createExtendedMatchPath: typeof createMatchPath = (
absoluteBaseUrl,
paths,
...rest
) => {
const matchPath = createMatchPath(absoluteBaseUrl, paths, ...rest)
const createExtendedMatchPath: typeof createMatchPath = (...createArgs) => {
const matchPath = createMatchPath(...createArgs)

return (id, ...otherArgs) => {
const match = matchPath(id, ...otherArgs)
Expand Down

0 comments on commit b99425e

Please sign in to comment.