declare module 'cross-spawn' {
  import type {
    ChildProcess,
    SpawnOptions,
    SpawnSyncOptions,
    SpawnSyncReturns,
  } from 'node:child_process'

  function spawn(
    command: string,
    args?: ReadonlyArray<string>,
    options?: SpawnOptions,
  ): ChildProcess

  namespace spawn {
    function sync(
      command: string,
      args?: ReadonlyArray<string>,
      options?: SpawnSyncOptions,
    ): SpawnSyncReturns<Buffer>
  }

  export = spawn
}
