Fix exactOptionalPropertyTypes for edgeClutter and rollAngle (BIT-32879).
Unblocks API build so the main deploy can land the crop/learning changes.
This commit is contained in:
1 parent
72bc65cf6e
commit
c9dc67b1eb
2 files changed
+4
-3
No files matched your search
@@ -211,7 +211,7 @@ export class AutopilotService {
|
||||
cropBias: style?.cropBias ?? null,
|
||||
sport: photo.event?.sport ?? null,
|
||||
lens: lensHintFromExif(photo.exif, photo.focalLength, photo.lens),
|
||||
edgeClutter,
|
||||
...(edgeClutter ? { edgeClutter } : {}),
|
||||
settings,
|
||||
});
|
||||
const ops = planned.ops;
|
||||
|
||||
@@ -188,7 +188,8 @@ function extraOf(tags: Record<string, unknown>): CameraExtra {
|
||||
const lat = num(tags.latitude);
|
||||
const lon = num(tags.longitude);
|
||||
const alt = num(tags.GPSAltitude);
|
||||
const extra: CameraExtra = {
|
||||
// Build then drop undefined keys — exactOptionalPropertyTypes forbids `rollAngle?: number | undefined`.
|
||||
const draft = {
|
||||
exposureCompensation: num(tags.ExposureCompensation) ?? num(tags.ExposureBiasValue),
|
||||
flashFired: flash === undefined ? undefined : (flash & 1) === 1,
|
||||
meteringMode: metering === undefined ? undefined : (METERING[metering] ?? (metering === 255 ? "Other" : undefined)),
|
||||
@@ -211,7 +212,7 @@ function extraOf(tags: Record<string, unknown>): CameraExtra {
|
||||
longitude: lon,
|
||||
altitude: alt === undefined ? undefined : num(tags.GPSAltitudeRef) === 1 ? -alt : alt,
|
||||
};
|
||||
return Object.fromEntries(Object.entries(extra).filter(([, v]) => v !== undefined)) as CameraExtra;
|
||||
return Object.fromEntries(Object.entries(draft).filter(([, v]) => v !== undefined)) as CameraExtra;
|
||||
}
|
||||
|
||||
/** The focus point in a file (the original, which still has the camera's EXIF). Null when the body wrote none. */
|
||||
|
||||
Reference in new issue
Block a user