Skip to content

Commit b378044

Browse files
committed
fix typescript types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 7113fe7 commit b378044

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/@types/global.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import {ReactNode} from "react";
1817
import "modernizr";
18+
import {Renderer} from "react-dom";
1919

2020
declare global {
2121
interface Window {
@@ -25,7 +25,10 @@ declare global {
2525
};
2626

2727
mxSendRageshake: (text: string, withLogs?: boolean) => void;
28-
matrixChat: ReactNode;
28+
matrixChat: ReturnType<Renderer>;
29+
30+
// electron-only
31+
ipcRenderer: any;
2932
}
3033

3134
// workaround for https://github.com/microsoft/TypeScript/issues/30933
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { initRageshake } from "./rageshakesetup";
3636
export const rageshakePromise = initRageshake();
3737

3838
export function preparePlatform() {
39-
if ((<any>window).ipcRenderer) {
39+
if (window.ipcRenderer) {
4040
console.log("Using Electron platform");
4141
const plaf = new ElectronPlatform();
4242
PlatformPeg.set(plaf);

0 commit comments

Comments
 (0)