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
This naturally causes issues with typescript and intellisense that must be fixed by casting foundDevice to unknown and then casting it again to find.IDevice to achieve the actual type.
It would be ideal if this function would propertly type the return type, or type it as the following: IDevice | IDevice[].
This union type would allow type narrowing the return value to the proper type.
Thank you!
The text was updated successfully, but these errors were encountered:
In the following snippet,
foundDevice
is typed asfind.IDevice[]
when it is rather simply afind.IDevice
This naturally causes issues with typescript and intellisense that must be fixed by casting
foundDevice
tounknown
and then casting it again tofind.IDevice
to achieve the actual type.It would be ideal if this function would propertly type the return type, or type it as the following:
IDevice | IDevice[]
.This union type would allow type narrowing the return value to the proper type.
Thank you!
The text was updated successfully, but these errors were encountered: