Property 'length' does not exist on type '{}'

I have an variable define as array, but how can I verify if the array size is not empty? I tried the code below, but the code has error and the error message is Property 'length' does not exist on type '{}'

public dailyUseItems:{};

this.hasDailyUseItems = this.dailyUseItems.length > 0;

Are you absolutely sure it’s really an array?

The value as below

Sorry, my mistake there. I didn’t see enclosing brackets, so I assumed you had an object.

But how can I verify if this array/object is empty?

To declare an array variable, declare it this way


To check the length of array

Sir i use this but i got error ‘any’ only refers to a type, but is being used as a value here.

Would you be so kind to put your code here? Thanks.