You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.get() returns object array instead of type array #29
I am facing the same issue. For a workaround I am doing as unknown as Observable <T> In my code that uses the get() function. Would adding this same code to the model class fix the issue? If it will I can do a PR. If not please let me know what would fix the issue and I can work on it. I imported the file directly into my project so if I get it working there will push it back up for a PR. Cheers!
In my testing the model does not like to work directly with TypeScript / ES classes but does function as expected when using Interface. Only real JS primitives work using Type Of, as Arrays technically are Objects. To test if and object is in-fact an array ES5 introduced the Array.isArray() function. I tested this and Array.isArray returns true with the data returned from get() so this can be closed! Cheers! https://stackoverflow.com/questions/12996871/why-does-typeof-array-with-objects-return-object-and-not-array
Activity
JoshuaMichaelHanson commentedon Mar 30, 2022
I am facing the same issue. For a workaround I am doing
as unknown as Observable <T>In my code that uses the get() function. Would adding this same code to the model class fix the issue? If it will I can do a PR. If not please let me know what would fix the issue and I can work on it. I imported the file directly into my project so if I get it working there will push it back up for a PR. Cheers!JoshuaMichaelHanson commentedon Mar 31, 2022
Hi All,
In my testing the model does not like to work directly with TypeScript / ES classes but does function as expected when using Interface. Only real JS primitives work using Type Of, as Arrays technically are Objects. To test if and object is in-fact an array ES5 introduced the Array.isArray() function. I tested this and Array.isArray returns true with the data returned from get() so this can be closed! Cheers!
https://stackoverflow.com/questions/12996871/why-does-typeof-array-with-objects-return-object-and-not-array