reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

DocumentResource data, on relationship, will be accept a resource, null or undefined #209

Closed pablorsk closed 4 years ago

pablorsk commented 5 years ago
    // @todo 
    // <R>new Resource(); cannot be a Resource or null, for example a book without an author (books.relationships.authors.data), or data missing
    // public data: R | null | undefined;

    public data: R = <R>new Resource();
pablorsk commented 4 years ago

Solved on #224, #233 and #221