Skip to content

Commit 8eb892f

Browse files
fix: allow primitives in NodeJS.Process modifications (#107)
1 parent b970d51 commit 8eb892f

File tree

3 files changed

+1847
-905
lines changed

3 files changed

+1847
-905
lines changed

lib/module-declaration.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ const generateModuleDeclaration = (module, index, API) => {
125125
if (moduleMethod.returns) {
126126
returnType = moduleMethod.returns
127127
// Account for methods on the process module that return a custom type/structure, we need to reference the Electron namespace to use these types
128-
if (module.name === 'process' && moduleMethod.returns.type !== 'Object') {
128+
if (module.name === 'process' && moduleMethod.returns.type !== 'Object' &&
129+
typeof moduleMethod.returns.type === 'string') {
129130
returnType = `Electron.${moduleMethod.returns.type}`
130131
}
131132
}

0 commit comments

Comments
 (0)