I originally wanted to try it, but I didn’t download electron for a long time. But fortunately @types it was downloaded.
Looking at the definitions of electron and nodejs in @types, there are indeed many duplicate classes, but these classes are all defined in different namespaces, so theoretically it is not clear that there are duplicate definitions.
In addition, I tried tsc to compile your code (but my file name is index.ts), and there was no pressure. I don’t know if it’s a problem with electron, but the message looks like it’s a problem during compilation
I originally wanted to try it, but I didn’t download electron for a long time. But fortunately
@types
it was downloaded.Looking at the definitions of electron and nodejs in
@types
, there are indeed many duplicate classes, but these classes are all defined in different namespaces, so theoretically it is not clear that there are duplicate definitions.In addition, I tried tsc to compile your code (but my file name is index.ts), and there was no pressure. I don’t know if it’s a problem with electron, but the message looks like it’s a problem during compilation