I am currently working with a javascript object that looks like this:
venue = {
id: 0,
name: '',
venueimage_set: [
{
imageurl: '',
},
]...
At a later point in my code, I need to modify the object as follows:
this.venue.venueimage_set[+image] = this.venue.venueimage_set[+image].imageurl;
In order for an image viewer to function properly, I require only the URL of the image and not the key associated with it. Therefore, I extract the value stored within the key from the array position specified by the key, which contains the image URL.
However, when performing this operation, I encounter the following error message:
ERROR in mainroot/venuepage/venuepage.component.ts(171,25): error TS2322: Type 'string' is not assignable to type '{ imageurl: string; }'.
mainroot/venuepage/venuepage.component.ts(175,127): error TS2339: Property 'imageurl' does not exist on type 'string'.
Instead of dealing with typing issues, I simply want TypeScript to ignore them and allow me to proceed. How can I achieve this?