I am trying to utilize the AppUpdater feature in electron-builder for my Electron Application.
Upon importing the updater in my main.ts file:
import { autoUpdater } from "electron-updater"
An error is triggered when running the application:
node_modules/builder-util-runtime/out/httpExecutor.d.ts(54,69): error TS2304: Cannot find name 'Set'.
node_modules/builder-util-runtime/out/rfc2253Parser.d.ts(1,47): error TS2304: Cannot find name 'Map'.
After some investigation, it appears that I need to instruct the Typescript transpiler on how to handle these specific typings. Despite experimenting with various target/libraries configurations in my ts.config file, I have yet to find a solution.
How can I resolve this issue and make the typescript definition file work correctly?
Below is a snippet of my configuration file:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowJs": false,
"target": "es5",
"paths": {
"environments": [
"./environments"
]
},
"types": [
"node",
"jasmine"
],
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
}
}