Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Type in callback #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ declare module "browserstack-local" {
[key: string]: string | boolean;
}

type LocalOptions = Partial<Options>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see any another use of LocalOptions.

Why it should be moved to declared type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When other frameworks are integrating the options for passing as arguments, they need to have an interface to declare. This is why I have pulled out this.


class Local {
start(options: Partial<Options>, callback: (error?: Error) => void): void;
start(options: LocalOptions, callback: (error?: Error) => void): void;
isRunning(): boolean;
stop(callback: () => void): void;
stop(callback: (error?: Error) => void): void;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browserstack-local",
"version": "1.4.5",
"version": "1.4.6",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version bump for publishing in new package.

"description": "Nodejs bindings for BrowserStack Local",
"engine": "^0.10.44",
"main": "index.js",
Expand Down