Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
How to reference a builtin type definition in Node?

I am wrapping a built-in node function and I would like to refer to the original node type definition. Obviously JavaScript is an untyped language but I was wondering if there was a comment syntax I could use to forward type signature inspection to a TypeScript definition.

const { spawn, spawnSync } = require('child_process')

let shell = undefined

if (process.platform === 'win32' && process.platform === 'x64') {
  shell = 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' // x64
}

if (process.platform === 'win32' && process.platform === 'x32') {
  shell = 'C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe' // x32
}

// can I send people straight to child_process.spawn?
exports.spawn = (command, args, options) => {
  return spawn(command, args, { shell, ...options })
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!