@assistant-ui/react
Version:
React components for AI chat.
16 lines (12 loc) • 368 B
text/typescript
import { Unsubscribe } from "../../types";
export type Subscribable = {
subscribe: (callback: () => void) => Unsubscribe;
};
export type SubscribableWithState<TState, TPath> = Subscribable & {
path: TPath;
getState: () => TState;
};
export type NestedSubscribable<
TState extends Subscribable | undefined,
TPath,
> = SubscribableWithState<TState, TPath>;