Michael McAndrew
Is `inferSubscriptionOutput` missing in 10.x?
I'm working on a vue 3 app with reactive state and need to infer the output of a subscription.
It looks like 9.x had
inferSubscriptionOutput
but that appears to be deprecated / not applicable in 10.x and I am not sure what the best alternative is.
There is a inferObservableValue
but I am not sure how that works / if it is what I am looking for.
Here is some todo app code to help explain the problem:
I need to infer the type (Type
) of onData
's data
before the subscription is called so I can type the reactive ref that will receive the todos.
I have created the following inferSubscriptionObservable
type that extracts the observable from the client:
It's working for me but I suspect there is a better way of doing this using the AppRouter
type. Something similar to inferSubscriptionOutput
from 9.x? so I could do
Do you agree that this is missing from 10.x?
I am not sure that I have enough familiarity with typescript and trpc to work this out myself but happy to file a feature request and help out, etc.3 replies