Socket
Socket
Sign inDemoInstall

@types/w3c-web-nfc

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/w3c-web-nfc

TypeScript definitions for w3c-web-nfc


Version published
Maintainers
1
Weekly downloads
431
decreased by-6.91%

Weekly downloads

Readme

Source

Installation

npm install --save @types/w3c-web-nfc

Summary

This package contains type definitions for w3c-web-nfc (https://github.com/w3c/web-nfc).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/w3c-web-nfc.

index.d.ts

/// <reference lib="dom" />

interface Window {
    NDEFMessage: NDEFMessage;
}
declare class NDEFMessage {
    constructor(messageInit: NDEFMessageInit);
    records: readonly NDEFRecord[];
}
interface NDEFMessageInit {
    records: NDEFRecordInit[];
}

type NDEFRecordDataSource = string | BufferSource | NDEFMessageInit;

interface Window {
    NDEFRecord: NDEFRecord;
}
declare class NDEFRecord {
    constructor(recordInit: NDEFRecordInit);
    readonly recordType: string;
    readonly mediaType?: string;
    readonly id?: string;
    readonly data?: DataView;
    readonly encoding?: string;
    readonly lang?: string;
    toRecords?: () => NDEFRecord[];
}
interface NDEFRecordInit {
    recordType: string;
    mediaType?: string;
    id?: string;
    encoding?: string;
    lang?: string;
    data?: NDEFRecordDataSource;
}

type NDEFMessageSource = string | BufferSource | NDEFMessageInit;

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

interface Window {
    NDEFReadingEvent: NDEFReadingEvent;
}
declare class NDEFReadingEvent extends Event {
    constructor(type: string, readingEventInitDict: NDEFReadingEventInit);
    serialNumber: string;
    message: NDEFMessage;
}
interface NDEFReadingEventInit extends EventInit {
    serialNumber?: string;
    message: NDEFMessageInit;
}

interface NDEFWriteOptions {
    overwrite?: boolean;
    signal?: AbortSignal;
}
interface NDEFMakeReadOnlyOptions {
    signal?: AbortSignal;
}
interface NDEFScanOptions {
    signal: AbortSignal;
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Takefumi Yoshii, and Francois Beaufort.

FAQs

Last updated on 21 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc