Skip to content

Commit

Permalink
refactor: remove promisify
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu2001 committed Aug 29, 2024
1 parent 4307cb7 commit 6af199c
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as fs from 'node:fs'
import { promisify } from 'node:util'

import * as overrides from './overrides'

Expand All @@ -17,11 +16,7 @@ function createFSProxy(overrides: OverrideMethods<typeof fs> = {}): typeof fs {
return overrides[prop]
}

const fsMethod = fs[prop]
if (typeof fsMethod === 'function' && prop !== 'promises') {
return promisify(fsMethod)
}
return fsMethod
return fs[prop]
},
})
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6af199c

Please sign in to comment.