// From
const link: TRPCLink<CLIRouterType> = () => {
return ({ prev, next, op }) => {
next(op, (result) => {
if (is401Error(result)) {
synchronousFunction(result)
}
prev(result)
})
}
}
// to
const link: TRPCLink<CLIRouterType> = () => {
return ({ prev, next, op }) => {
next(op, async (result) => {
if (is401Error(result)) {
await asynchronousFunction(result)
}
prev(result)
})
}
}
// From
const link: TRPCLink<CLIRouterType> = () => {
return ({ prev, next, op }) => {
next(op, (result) => {
if (is401Error(result)) {
synchronousFunction(result)
}
prev(result)
})
}
}
// to
const link: TRPCLink<CLIRouterType> = () => {
return ({ prev, next, op }) => {
next(op, async (result) => {
if (is401Error(result)) {
await asynchronousFunction(result)
}
prev(result)
})
}
}