[lgtv2] Make payload optional for SpecializedSocket.send (#45251)

* [lgtv2] Make payload optional for SpecializedSocket.send

* Adjust test for pointer socket

Co-authored-by: Ovidiu Pruteanu <ovidiu@wmtek.com>
This commit is contained in:
Ovidiu Pruteanu 2020-07-07 21:25:47 +03:00 committed by GitHub
parent c4d306c658
commit 7dc8fd8266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import { EventEmitter } from 'events';
declare namespace LGTV {
interface SpecializedSocket {
send(type: string, payload: any): void;
send(type: string, payload?: any): void;
close(): void;
}

View File

@ -35,6 +35,7 @@ lgtv.on('connect', () => {
if (!error) {
pointerSocket = socket;
pointerSocket.send('button', { name: 'HOME' });
pointerSocket.send('click');
}
});
});