However, because the ReadableResult's error interface is named Error, its error state (accidentally?) defines its provided error in TypeScript as either an ApolloError or its own error state (recursively).
I believe the simplest solution to this is to rename the error state's interface - I've proposed ReadableError here, but I defer to your judgement on what name is best.
When ReadableResult is in its error state, the error it provides at runtime can be either an
ApolloError
(from @apollo/client) or anError
(the fundamental type).However, because the ReadableResult's error interface is named
Error
, its error state (accidentally?) defines its provided error in TypeScript as either anApolloError
or its own error state (recursively).I believe the simplest solution to this is to rename the error state's interface - I've proposed
ReadableError
here, but I defer to your judgement on what name is best.Thank you!