browserstack / browserstack-local-nodejs

NodeJS bindings for BrowserStack Local
https://www.browserstack.com
MIT License
71 stars 56 forks source link

TypeScript definition file #37

Closed jlfwong closed 5 years ago

jlfwong commented 7 years ago

Hi there!

Would you accept a PR for a TypeScript definition file?

If you're not interested in this being part of this repository, I'm happy to contribute it to https://github.com/DefinitelyTyped/DefinitelyTyped instead.

The definition file I have locally looks like this:

declare module 'browserstack-local' {
  interface Options {
    key: string
    verbose: boolean
    force: boolean
    only: string
    onlyAutomate: boolean
    forceLocal: boolean
    localIdentifier: string
    folder: string
    proxyHost: string
    proxyPort: string
    proxyUser: string
    proxyPass: string
    forceProxy: boolean
    logFile: string
    parallelRuns: string
    binarypath: string
    [key: string]: string | boolean
  }

  class Local {
    start(options: Partial<Options>, callback: () => void): void
    isRunning(): boolean
    stop(callback: () => void): void
  }
}
nakula commented 7 years ago

@jlfwong yep we would. thanks!