mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 10:45:51 +03:00
fix typescript types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
7113fe7e31
commit
b3780445d3
2 changed files with 6 additions and 3 deletions
7
src/@types/global.d.ts
vendored
7
src/@types/global.d.ts
vendored
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {ReactNode} from "react";
|
||||
import "modernizr";
|
||||
import {Renderer} from "react-dom";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
@ -25,7 +25,10 @@ declare global {
|
|||
};
|
||||
|
||||
mxSendRageshake: (text: string, withLogs?: boolean) => void;
|
||||
matrixChat: ReactNode;
|
||||
matrixChat: ReturnType<Renderer>;
|
||||
|
||||
// electron-only
|
||||
ipcRenderer: any;
|
||||
}
|
||||
|
||||
// workaround for https://github.com/microsoft/TypeScript/issues/30933
|
||||
|
|
|
@ -36,7 +36,7 @@ import { initRageshake } from "./rageshakesetup";
|
|||
export const rageshakePromise = initRageshake();
|
||||
|
||||
export function preparePlatform() {
|
||||
if ((<any>window).ipcRenderer) {
|
||||
if (window.ipcRenderer) {
|
||||
console.log("Using Electron platform");
|
||||
const plaf = new ElectronPlatform();
|
||||
PlatformPeg.set(plaf);
|
Loading…
Reference in a new issue