Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Dec 10, 2023
1 parent 6c1b741 commit 5ede827
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/fsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function readDirCacheSync(file: string): undefined | DirentsMap {
}

function direntsToDirentMap(fsDirents: fs.Dirent[]): DirentsMap {
const dirents = new Map<string, DirentCache>()
const dirents: DirentsMap = new Map()
for (const dirent of fsDirents) {
// We ignore non directory, file, and symlink entries
const type = dirent.isDirectory()
Expand Down Expand Up @@ -145,7 +145,7 @@ function pathUntilPart(root: string, parts: string[], i: number): string {
export function createCachedFsUtils(config: ResolvedConfig): FsUtils {
const root = withoutTrailingSlash(config.root)
const rootDirPath = `${root}/`
const rootCache = { type: 'directory' as DirentCacheType } // dirents will be computed lazily
const rootCache: DirentCache = { type: 'directory' } // dirents will be computed lazily

const getDirentCacheSync = (parts: string[]): DirentCache | undefined => {
let direntCache: DirentCache = rootCache
Expand Down

0 comments on commit 5ede827

Please sign in to comment.