feat: 类型规范

This commit is contained in:
手瓜一十雪
2025-02-02 20:16:11 +08:00
parent dec9b477e0
commit d626f872e6
16 changed files with 119 additions and 173 deletions

View File

@@ -190,7 +190,7 @@ export async function uriToLocalFile(dir: string, uri: string, filename: string
}
case FileUriType.Remote: {
const buffer = await httpDownload({ url: HandledUri, headers: headers });
const buffer = await httpDownload({ url: HandledUri, headers: headers ?? {} });
fs.writeFileSync(filePath, buffer);
return { success: true, errMsg: '', fileName: filename, path: filePath };
}