electron-connect
electron-connect copied to clipboard
Could not find a declaration file for module 'electron-connect'
Thank you very much for your very good implementation that works for me! I can reload my electron application, it works really very good! I have only one issue, maybe someone can help... When I strat my project with npm run webpack --config crv/config/webpack.dev.js --watch --progress --color --inline
I get following warnings and one error message:
from electron main process. I'm working with typescript, my implementation in electron main process looks fine to me and it works:
import { app, BrowserWindow, ipcMain } from 'electron';
import * as path from 'path';
import * as url from 'url';
import { client } from 'electron-connect';
let mainWindow: BrowserWindow | null;
const createWindow = async () => {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
});
// and load the index.html of the app.
mainWindow.loadURL(
url.format(
{
pathname: path.join(__dirname, './index.html'),
protocol: 'file:',
slashes: true
}
)
);
client.create(mainWindow);
};
app.on('ready', createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
There is only the issue with typescript declaration file for module electron-module
and warning messages. How can I get rid of those warning and error messages? There is no type definition for @types/electron-connect
. Adding electron-connect.d.ts declaration containing declare module 'electron-connect';
does not help. Please help.