Redux reducer type error

Why does this give me an error, its mostlikely because of how I did the typing.
Type 'ImageCreatorElement[]' is not assignable to type '(WritableDraft<{ type: ImageCreatorElementType; id: string; layer: string; x: number; y: number; isDragging: boolean; isSelected: boolean; metadata?: Record<string, string> | undefined; } & ImageCreatorImageElement> | WritableDraft<...>)[]'.
Type 'ImageCreatorElement[]' is not assignable to type '(WritableDraft<{ type: ImageCreatorElementType; id: string; layer: string; x: number; y: number; isDragging: boolean; isSelected: boolean; metadata?: Record<string, string> | undefined; } & ImageCreatorImageElement> | WritableDraft<...>)[]'.
1 Reply
Typedef
TypedefOP17mo ago
Edit: solved, its because of the HTMLImageElement type on one of the fields
Want results from more Discord servers?
Add your server