Regenerate types - NRF.getSecurityStatus()

pull/2608/head
Rob Pilling 2023-03-06 11:44:27 +00:00
parent 3808b0bc3c
commit d9dc729abd
2 changed files with 23 additions and 5 deletions

View File

@ -48,8 +48,8 @@
g.drawImage(
atob("CxQBBgDgFgJgR4jZMawfAcA4D4NYybEYIwTAsBwDAA=="),
this.x + 2,
this.y + 2
this.x! + 2,
this.y! + 2
);
},
width: width(),

View File

@ -183,6 +183,23 @@ type NRFFilters = {
manufacturerData?: object;
};
type NRFSecurityStatus = {
advertising: boolean,
} & (
{
connected: true,
encrypted: boolean,
mitm_protected: boolean,
bonded: boolean,
connected_addr?: string,
} | {
connected: false,
encrypted: false,
mitm_protected: false,
bonded: false,
}
);
type ImageObject = {
width: number;
height: number;
@ -721,7 +738,7 @@ declare class NRF {
* @returns {any} An object
* @url http://www.espruino.com/Reference#l_NRF_getSecurityStatus
*/
static getSecurityStatus(): any;
static getSecurityStatus(): NRFSecurityStatus;
/**
* @returns {any} An object
@ -1898,6 +1915,7 @@ declare class NRF {
* encrypted // Communication on this link is encrypted.
* mitm_protected // The encrypted communication is also protected against man-in-the-middle attacks.
* bonded // The peer is bonded with us
* advertising // Are we currently advertising?
* connected_addr // If connected=true, the MAC address of the currently connected device
* }
* ```
@ -1906,7 +1924,7 @@ declare class NRF {
* @returns {any} An object
* @url http://www.espruino.com/Reference#l_NRF_getSecurityStatus
*/
static getSecurityStatus(): any;
static getSecurityStatus(): NRFSecurityStatus;
/**
*
@ -4553,7 +4571,7 @@ declare class BluetoothRemoteGATTServer {
* @returns {any} An object
* @url http://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_getSecurityStatus
*/
getSecurityStatus(): any;
getSecurityStatus(): NRFSecurityStatus;
/**
* See `NRF.connect` for usage examples.