Cleanup: Remove low value StreamingContextType interface. (#585)

This commit is contained in:
Jacob Richman
2025-05-28 19:46:08 +00:00
committed by GitHub
parent 05a49702d8
commit 00805cb2cd
6 changed files with 15 additions and 41 deletions

View File

@@ -7,15 +7,11 @@
import React, { createContext } from 'react';
import { StreamingState } from '../types.js';
export interface StreamingContextType {
streamingState: StreamingState;
}
export const StreamingContext = createContext<StreamingContextType | undefined>(
export const StreamingContext = createContext<StreamingState | undefined>(
undefined,
);
export const useStreamingContext = (): StreamingContextType => {
export const useStreamingContext = (): StreamingState => {
const context = React.useContext(StreamingContext);
if (context === undefined) {
throw new Error(