Typescript/Angular/Ionic Property 'data' does not exist on type 'any[]'. Help

Hello, I am new to typescript and have an ionic app im working on. My question is that in my typescript file I declare the property

public clockInData = [];

And later I add a property to that variable like so

this.clockInData.data = this.transformGetData(val);

The code functions fine but typescript is giving an error of
Property ‘data’ does not exist on type ‘any’.

Not sure what im missing, any help would be awesome. Thank you

You can’t extend builtins like that, it’s not going to typecheck if you add random properties to arrays. Arrays do not have the property data, the message is correct.

Ok, should I add data as a part of the array containing the array of data?

There is almost no situation where what you’re doing is a good idea. It’s very confusing, as it is extremely unexpected behaviour. Why are you trying to attach data that doesn’t live in the array to the array?