@@ -112,7 +112,7 @@ export class SwitchBot {
112112 * An array will be passed to the `resolve()`, which includes
113113 * `SwitchbotDevice` objects representing the found devices.
114114 * ---------------------------------------------------------------- */
115- discover ( params : params = { } ) {
115+ async discover ( params : params = { } ) {
116116 const promise = new Promise ( ( resolve , reject ) => {
117117 // Check the parameters
118118 const valid = ParameterChecker . check (
@@ -398,7 +398,7 @@ export class SwitchBot {
398398 * - Promise object
399399 * Nothing will be passed to the `resolve()`.
400400 * ---------------------------------------------------------------- */
401- startScan ( params ?: params ) {
401+ async startScan ( params ?: params ) {
402402 const promise = new Promise < void > ( ( resolve , reject ) => {
403403 // Check the parameters
404404 const valid = ParameterChecker . check (
@@ -490,7 +490,7 @@ export class SwitchBot {
490490 * [Return value]
491491 * - none
492492 * ---------------------------------------------------------------- */
493- stopScan ( ) {
493+ async stopScan ( ) {
494494 this . noble . removeAllListeners ( 'discover' ) ;
495495 this . noble . stopScanning ( ) ;
496496 }
@@ -506,7 +506,7 @@ export class SwitchBot {
506506 * - Promise object
507507 * Nothing will be passed to the `resolve()`.
508508 * ---------------------------------------------------------------- */
509- wait ( msec : number ) {
509+ async wait ( msec : number ) {
510510 return new Promise ( ( resolve , reject ) => {
511511 // Check the parameters
512512 const valid = ParameterChecker . check (
0 commit comments