Skip to content

Commit

Permalink
Update TypeScript definitions because NDEFReader/NDEFWriter merge
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
  • Loading branch information
zolkis committed Sep 24, 2020
1 parent 12764f2 commit 726725f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions web-nfc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,18 @@ declare interface NDEFRecordInit {

declare type NDEFMessageSource = string | BufferSource | NDEFMessageInit

interface Window {
NDEFWriter: NDEFWriter
}
declare class NDEFWriter {
constructor()
write: (
message: NDEFMessageSource,
options?: NDEFWriteOptions
) => Promise<void>
}

interface Window {
NDEFReader: NDEFReader
}
declare class NDEFReader extends EventTarget {
constructor()
onerror: (error: any) => void
onreading: (event: NDEFReadingEvent) => void
onreadingerror: (error: any) => void
scan: (options?: NDEFScanOptions) => Promise<void>
write: (
message: NDEFMessageSource,
options?: NDEFWriteOptions
) => Promise<void>
}

interface Window {
Expand Down

1 comment on commit 726725f

@beaufortfrancois
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we remove ignoreRead?: boolean as well in NDEFWriteOptions?
And clean NDEFScanOptions.

Please sign in to comment.