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
The typing for the load method is not ideal, it basically is typed as load: (some args) => MaybePromse<Error | Shape> where Shape a generic without any constraints. This means if load returns Promise<User | Error>Shape is inferred as being User. The better way to handle this would be to have load be defined as something like load: (some args) => MaybePromse<LoadResult> and then other places that use Shape would be updated to do something like ShapeFromLoadResult<LoadResult> instead of Shape. ShapeFromLoadResult would probably be something like type ShapeFromLoadResult<T> = T extends Error ? never : T
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: