Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/switchbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class SwitchBot {
* An array will be passed to the `resolve()`, which includes
* `SwitchbotDevice` objects representing the found devices.
* ---------------------------------------------------------------- */
async discover(params: params = {}) {
discover(params: params = {}) {
const promise = new Promise((resolve, reject) => {
// Check the parameters
const valid = ParameterChecker.check(
Expand Down Expand Up @@ -399,7 +399,7 @@ export class SwitchBot {
* - Promise object
* Nothing will be passed to the `resolve()`.
* ---------------------------------------------------------------- */
async startScan(params?: params) {
startScan(params?: params) {
const promise = new Promise<void>((resolve, reject) => {
// Check the parameters
const valid = ParameterChecker.check(
Expand Down Expand Up @@ -491,7 +491,7 @@ export class SwitchBot {
* [Return value]
* - none
* ---------------------------------------------------------------- */
async stopScan() {
stopScan() {
this.noble.removeAllListeners('discover');
this.noble.stopScanning();
}
Expand All @@ -507,7 +507,7 @@ export class SwitchBot {
* - Promise object
* Nothing will be passed to the `resolve()`.
* ---------------------------------------------------------------- */
async wait(msec: number) {
wait(msec: number) {
return new Promise((resolve, reject) => {
// Check the parameters
const valid = ParameterChecker.check(
Expand Down