Skip to content

Commit

Permalink
fix: allow primitives in NodeJS.Process modifications (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Aug 10, 2018
1 parent b970d51 commit 8eb892f
Show file tree
Hide file tree
Showing 3 changed files with 1,847 additions and 905 deletions.
3 changes: 2 additions & 1 deletion lib/module-declaration.js
Expand Up @@ -125,7 +125,8 @@ const generateModuleDeclaration = (module, index, API) => {
if (moduleMethod.returns) {
returnType = moduleMethod.returns
// Account for methods on the process module that return a custom type/structure, we need to reference the Electron namespace to use these types
if (module.name === 'process' && moduleMethod.returns.type !== 'Object') {
if (module.name === 'process' && moduleMethod.returns.type !== 'Object' &&
typeof moduleMethod.returns.type === 'string') {
returnType = `Electron.${moduleMethod.returns.type}`
}
}
Expand Down

0 comments on commit 8eb892f

Please sign in to comment.