Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Ionic serve errors that go away when file is re-saved

$
0
0

@fantata wrote:

When I first run ionic serve, I get a page or errors along the lines of:

Property ‘user’ does not exist on type ‘Object’

If I re-save any file, ionic reloads and all the errors disappear. Is this normal, or do I have something wrong?

This is always on a response variable which is returned from an http call via rxjs .toPromise().
The res variable is just declared like:

.toPromise()
.then(res => {
    console.log(res.user);
});

So I haven’t declared a type for res as it’s just created when the call comes back.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>