mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-28 17:11:14 +00:00
Update TypeScript 4.3.5 -> 4.6.3, replace typings to native socket.io
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Socket } from "socket.io";
|
||||
|
||||
export class Connector {
|
||||
constructor(private socket: SocketIO.Socket,
|
||||
// @ts-ignore
|
||||
constructor(private socket: Socket,
|
||||
public app: Electron.App) { }
|
||||
|
||||
on(key: string, javaScriptCode: Function): void {
|
||||
on(key: string, javaScriptCode: (...args) => void): void {
|
||||
this.socket.on(key, (...args: any[]) => {
|
||||
const id: string = args.pop();
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// @ts-ignore
|
||||
import * as Electron from "electron";
|
||||
import { Socket } from "socket.io";
|
||||
import { Connector } from "./connector";
|
||||
|
||||
export class HookService extends Connector {
|
||||
constructor(socket: SocketIO.Socket, public app: Electron.App) {
|
||||
constructor(socket: Socket, public app: Electron.App) {
|
||||
super(socket, app);
|
||||
}
|
||||
|
||||
onHostReady(): void {
|
||||
onHostReady() {
|
||||
// execute your own JavaScript Host logic here
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"author": "Gregor Biswanger",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/socket.io": "^2.1.12",
|
||||
"typescript": "^4.3.5"
|
||||
"socket.io": "^4.4.1",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user