Skip to content

Commit e5a232b

Browse files
committed
make typescript happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent d486782 commit e5a232b

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎src/@types/global.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ limitations under the License.
1515
*/
1616

1717
import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first
18-
import type MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat";
18+
import type {Renderer} from "react-dom";
1919

2020
declare global {
2121
interface Window {
2222
mxSendRageshake: (text: string, withLogs?: boolean) => void;
23-
matrixChat: MatrixChat;
23+
matrixChat: ReturnType<Renderer>;
2424

2525
// electron-only
2626
ipcRenderer: any;

‎src/vector/app.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {_td, newTranslatableError} from 'matrix-react-sdk/src/languageHandler';
3030
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
3131
import {AutoDiscovery} from "matrix-js-sdk/src/autodiscovery";
3232
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
33+
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
3334

3435
import url from 'url';
3536

@@ -59,7 +60,7 @@ function routeUrl(location: Location) {
5960

6061
console.log("Routing URL ", location.href);
6162
const s = getScreenFromLocation(location);
62-
window.matrixChat.showScreen(s.screen, s.params);
63+
(window.matrixChat as MatrixChatType).showScreen(s.screen, s.params);
6364
}
6465

6566
function onHashChange(ev: HashChangeEvent) {

0 commit comments

Comments
 (0)