Skip to content

Commit cc79baf

Browse files
committed
chore: update types
1 parent 0b2b20a commit cc79baf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/zip-it-and-ship-it/src/bin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { zipFunctions } from './main.js'
1111
const packJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
1212

1313
declare global {
14-
// eslint-disable-next-line no-var
1514
var ZISI_CLI: boolean
1615
}
1716

packages/zip-it-and-ship-it/src/utils/fs.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { promises as fs, Stats } from 'fs'
1+
import { promises as fs, PathLike, Stats } from 'fs'
22
import { dirname, format, join, parse, resolve } from 'path'
33

44
import { FileCache, LstatCache, ReaddirCache } from './cache.js'
@@ -114,12 +114,13 @@ export const resolveFunctionsDirectories = (input: string | string[]) => {
114114
return absoluteDirectories
115115
}
116116

117-
export const mkdirAndWriteFile: typeof fs.writeFile = async (path, ...params) => {
117+
export const mkdirAndWriteFile: typeof fs.writeFile = async (path: PathLike | fs.FileHandle, ...params) => {
118118
if (typeof path === 'string') {
119119
const directory = dirname(path)
120120

121121
await fs.mkdir(directory, { recursive: true })
122122
}
123123

124+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
124125
return fs.writeFile(path, ...params)
125126
}

0 commit comments

Comments
 (0)