@uppy/utils: fix type mismatch on getSafeFileId (#6034)

with `exactOptionalPropertyTypes`
fixes #6033
This commit is contained in:
Mikael Finstad 2025-10-27 16:36:17 +08:00 committed by GitHub
parent 5edcb2e885
commit 08b64f93c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@uppy/utils": patch
---
fix ts issue with generateFileID and `exactOptionalPropertyTypes`

View file

@ -83,7 +83,7 @@ export function getSafeFileId<M extends Meta, B extends Body>(
(
| Pick<RemoteUppyFile<M, B>, 'isRemote' | 'remote'>
| Pick<LocalUppyFile<M, B>, 'isRemote'>
) & { meta?: { relativePath?: unknown } },
) & { meta?: { relativePath?: unknown } | undefined },
instanceId: string,
): string {
if (hasFileStableId(file)) return file.id!