Skip to content

Commit f14478b

Browse files
Match the style used for the other process edge case
1 parent 078073e commit f14478b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/module-declaration.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ const generateModuleDeclaration = (module, index, API) => {
117117
let returnType = returnsThis(moduleMethod) ? 'this' : 'void'
118118

119119
if (moduleMethod.returns) {
120-
// Account for methods on the process module that return a custom type/structure
120+
returnType = moduleMethod.returns
121+
// Account for methods on the process module that return a custom type/structure, we need to reference the Electron namespace to use these types
121122
if (module.name === 'process' && moduleMethod.returns.type !== 'Object') {
122123
returnType = `Electron.${moduleMethod.returns.type}`
123-
} else {
124-
returnType = moduleMethod.returns
125124
}
126125
}
127126

0 commit comments

Comments
 (0)