https://github.com/agility/agility-next/blob/796142a1b0dbe9a4e85e1d88996f13b3442e51ac/src/types.ts#L209C1-L216C2
The type definition for ImageField has all non-nullable properties; however, if I inspect the data returned from the API, I get:
"myImageField": {
"label": null,
"url": "url here",
"target": null,
"filesize": 396122,
"pixelHeight": "304",
"pixelWidth": "650",
"height": 304,
"width": 650
},
A more compliant type would look like this:
export interface ImageField {
label: string | null;
url: string;
target: string | null;
filesize: number;
pixelHeight: string;
pixelWidth: string;
height: number;
width: number;
}
This change should be backwards-compatible with AgilityPic
https://github.com/agility/agility-next/blob/796142a1b0dbe9a4e85e1d88996f13b3442e51ac/src/types.ts#L209C1-L216C2
The type definition for ImageField has all non-nullable properties; however, if I inspect the data returned from the API, I get:
A more compliant type would look like this:
This change should be backwards-compatible with
AgilityPic