Apply strictNullChecks to src/contexts/* (#10490)
This commit is contained in:
committed by
GitHub
parent
17b456c7ee
commit
212977c4ac
@@ -25,7 +25,7 @@ import React, {
|
||||
} from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
|
||||
const MatrixClientContext = createContext<MatrixClient>(undefined);
|
||||
const MatrixClientContext = createContext<MatrixClient | undefined>(undefined);
|
||||
MatrixClientContext.displayName = "MatrixClientContext";
|
||||
export default MatrixClientContext;
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface MatrixClientProps {
|
||||
mxClient: MatrixClient;
|
||||
}
|
||||
|
||||
export function useMatrixClientContext(): MatrixClient {
|
||||
export function useMatrixClientContext(): MatrixClient | undefined {
|
||||
return useContext(MatrixClientContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
VoiceBroadcastRecordingsStore,
|
||||
} from "../voice-broadcast";
|
||||
|
||||
export const SDKContext = createContext<SdkContextClass>(undefined);
|
||||
export const SDKContext = createContext<SdkContextClass | undefined>(undefined);
|
||||
SDKContext.displayName = "SDKContext";
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user