Nativescript: error TS2339: Property 'type' does not exist on type 'Object'.

Created on 28 Mar 2017  路  2Comments  路  Source: NativeScript/NativeScript

serviceArray: Array<Object> = [];
var offerValue = {
                "id": this.offerData.id,
                "type": true
}
this.serviceArray.push(offerValue);

this.serviceArray[index].type

I dont know what its means. My app is running but getting errors while running time. Any idea??

question

Most helpful comment

You should either create your offerValue TS class or use the JavaScript syntax to access your object property e.g.

this.serviceArray[index]["type"]

More details on this TypeScript related issue can be found here

All 2 comments

You should either create your offerValue TS class or use the JavaScript syntax to access your object property e.g.

this.serviceArray[index]["type"]

More details on this TypeScript related issue can be found here

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NickIliev picture NickIliev  路  3Comments

Leo-lay picture Leo-lay  路  3Comments

OscarLopezArnaiz picture OscarLopezArnaiz  路  3Comments

vtisnado picture vtisnado  路  3Comments

valentinstoychev picture valentinstoychev  路  3Comments