Error Property 'collection' does not exist on type 'Profile'

0

The following variable has been declared in the script:

private profile: Profile;

See that it is a variable of type Profile .

When trying to assign a value to the variable, it returns the following error:

  

Property 'collection' does not exist on 'Profile' type.

The value being assigned is as follows:

this.profile = response.collection;

However I have verified that the response.collection property is an instance of class Profile :

console.log(response.collection instanceof Profile);
//true

Why does not the variable profile accept the value of response.collection being an instance of the class Profile ?

    
asked by anonymous 09.02.2018 / 05:08

0 answers