Skip to content

Commit

Permalink
After update PR scala-js/scala-js-dom#806
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Aug 20, 2023
1 parent 6b6dcb4 commit a753c1a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion webapp/src/main/scala/org/scalajs/dom/NDEFMessage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import scala.scalajs.js.annotation.JSGlobal
* or could be written to an NFC tag. An instance is acquired by calling the NDEFMessage() constructor or from the
* NDEFReadingEvent.message property, which is passed to the reading event.
*
* @param records\
* @param records
* The records property of NDEFMessage interface represents a list of NDEFRecords present in the NDEF message.
*/
@js.native
Expand Down
16 changes: 11 additions & 5 deletions webapp/src/main/scala/org/scalajs/dom/NDEFReader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.scalajs.dom

import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
import scala.scalajs.js.|

/** The [[NDEFReader]] interface of the Web NFC API (https://developer.mozilla.org/en-US/docs/Web/API/Web_NFC_API) is
* used to read from and write data to compatible NFC devices, e.g. NFC tags supporting NDEF, when these devices are
Expand Down Expand Up @@ -35,10 +34,17 @@ class NDEFReader() extends EventTarget {
* a Promise that either resolves when a message has been written to the tag or rejects if a hardware or permission
* error is encountered.
*/
def write(
message: String | js.typedarray.ArrayBuffer | /* js.typedarray.TypedArray[NDEFRecord, ???] */ js.typedarray.DataView |
js.Array[NDEFRecord], options: NDEFWriteOptions = js.native
): js.Promise[js.Any] = js.native
def write(message: String, options: NDEFWriteOptions): js.Promise[js.Any] = js.native
def write(message: js.typedarray.ArrayBuffer, options: NDEFWriteOptions): js.Promise[js.Any] = js.native
// def write(message:js.typedarray.TypedArray[NDEFRecord, ???] , options: NDEFWriteOptions = js.native): js.Promise[js.Any] = js.native
def write(message: js.typedarray.DataView, options: NDEFWriteOptions): js.Promise[js.Any] = js.native
def write(message: js.Array[NDEFRecord], options: NDEFWriteOptions): js.Promise[js.Any] = js.native

def write(message: String): js.Promise[js.Any] = js.native
def write(message: js.typedarray.ArrayBuffer): js.Promise[js.Any] = js.native
// def write(message:js.typedarray.TypedArray[NDEFRecord, ???]): js.Promise[js.Any] = js.native
def write(message: js.typedarray.DataView): js.Promise[js.Any] = js.native
def write(message: js.Array[NDEFRecord]): js.Promise[js.Any] = js.native

/** The reading event of the NDEFReader interface is fired whenever a new reading is available from compatible NFC
* devices (e.g. NFC tags supporting NDEF) when these devices are within the reader's magnetic induction field.
Expand Down

0 comments on commit a753c1a

Please sign in to comment.