Skip to content

Commit

Permalink
Fix the type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
illright committed Jun 17, 2024
1 parent ed10d9b commit 0798d9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/steiger-plugin-fsd/src/_lib/prepare-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function joinFromRoot(...segments: Array<string>) {
return join('/', ...segments)
}

export function createFsMocks(mockedFiles: Record<string, string>, original: typeof import('fs')) {
export function createFsMocks(mockedFiles: Record<string, string>, original: typeof import('fs')): typeof import('fs') {
const normalizedMockedFiles = Object.fromEntries(
Object.entries(mockedFiles).map(([path, content]) => [path.replace(/\//g, sep), content]),
)
Expand All @@ -65,7 +65,7 @@ export function createFsMocks(mockedFiles: Record<string, string>, original: typ
(key) => key === normalizedPath || key.startsWith(normalizedPath + sep),
)
}) as typeof existsSync),
}
} as typeof import('fs')
}

if (import.meta.vitest) {
Expand Down

0 comments on commit 0798d9f

Please sign in to comment.