/
githubmirror
/
trpc
Обзор
Документация
Войти
/
githubmirror
/
trpc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/client/src/links/internals/subscriptions.ts
23 строки
527 B
Alex / KATT
fix(client): `TRPCConnectionState` generic fixes (#6684)
08 апр 2025, 23:04
Не верифицирован
08 апр 2025, 23:04
d095305
Код
Авторство
О чём код?
interface ConnectionStateBase<TError> { type: 'state'; data?: never; error: TError | null; } interface ConnectionIdleState extends ConnectionStateBase<null> { state: 'idle'; } interface ConnectionConnectingState<TError> extends ConnectionStateBase<TError | null> { state: 'connecting'; } interface ConnectionPendingState extends ConnectionStateBase<null> { state: 'pending'; } export type TRPCConnectionState<TError> = | ConnectionIdleState | ConnectionConnectingState<TError> | ConnectionPendingState;