chore: duplicate type expression (#34993)

This commit is contained in:
Simon Knott 2025-03-03 14:10:17 +01:00 committed by GitHub
parent 02e65d1825
commit 7026e5dd70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ export function resolveReporterOutputPath(defaultValue: string, configDir: strin
return path.resolve(basePath, defaultValue);
}
export async function normalizeAndSaveAttachment(outputPath: string, name: string, options: { path?: string, body?: string | Buffer, contentType?: string } = {}): Promise<{ name: string; path?: string | undefined; body?: Buffer | undefined; contentType: string; }> {
export async function normalizeAndSaveAttachment(outputPath: string, name: string, options: { path?: string, body?: string | Buffer, contentType?: string } = {}): Promise<{ name: string; path?: string; body?: Buffer; contentType: string; }> {
if (options.path === undefined && options.body === undefined)
return { name, contentType: 'text/plain' };
if ((options.path !== undefined ? 1 : 0) + (options.body !== undefined ? 1 : 0) !== 1)