Skip to content

Commit a41a550

Browse files
authored
Merge pull request #2357 from bobrippling/ts-storage-hid-tweaks
typescript: `Storage` and HID tweaks
2 parents d244795 + efed554 commit a41a550

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

libs/bluetooth/jswrap_bluetooth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2703,7 +2703,8 @@ void jswrap_nfc_send(JsVar *payload) {
27032703
"params" : [
27042704
["data","JsVar","Input report data as an array"],
27052705
["callback","JsVar","A callback function to be called when the data is sent"]
2706-
]
2706+
],
2707+
"typescript" : "sendHIDReport(data: number[], callback?: () => void): void"
27072708
}
27082709
Send a USB HID report. HID must first be enabled with `NRF.setServices({}, {hid:
27092710
hid_report})`

src/jswrap_storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ JsVar *jswrap_storage_read(JsVar *name, int offset, int length) {
142142
["noExceptions","bool","If true and the JSON is not valid, just return `undefined` - otherwise an `Exception` is thrown"]
143143
],
144144
"return" : ["JsVar","An object containing parsed JSON from the file, or undefined"],
145-
"typescript" : "readJSON(name: string, noExceptions: boolean): any;"
145+
"typescript" : "readJSON(name: string, noExceptions: ShortBoolean): any;"
146146
}
147147
Read a file from the flash storage area that has been written with
148148
`require("Storage").write(...)`, and parse JSON in it into a JavaScript object.

0 commit comments

Comments
 (0)