browserstack / browserstack-local-nodejs

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

Add TypeScript definition file #39

Closed jlfwong closed 5 years ago

jlfwong commented 7 years ago

Fixes #37

patrick91 commented 6 years ago

@jlfwong thanks for this, I copied it to my project and did some changes, if you need them:

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: (error: Error) => void): void;
    isRunning(): boolean;
    stop(callback?: () => void): void;
  }
}

I've just made the stop callback optional and added the error param to the start callback

Simsteve7 commented 5 years ago

Why is the TypeScript definition file still not merged in?

thasmo commented 5 years ago

Please!

pulkitsharma07 commented 5 years ago

Thanks @jlfwong