Improve context types (#10510)
This commit is contained in:
committed by
GitHub
parent
974dc35c41
commit
b77b2df29b
@@ -38,7 +38,10 @@ import {
|
||||
VoiceBroadcastRecordingsStore,
|
||||
} from "../voice-broadcast";
|
||||
|
||||
export const SDKContext = createContext<SdkContextClass | undefined>(undefined);
|
||||
// This context is available to components under MatrixChat,
|
||||
// the context must not be used by components outside a SdkContextClass tree.
|
||||
// This assertion allows us to make the type not nullable.
|
||||
export const SDKContext = createContext<SdkContextClass>(null as any);
|
||||
SDKContext.displayName = "SDKContext";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user