diff --git a/src/index.d.ts b/src/index.d.ts index cdc519c..9321d87 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,4 +1 @@ -export * from "./nfc.android"; - -// Export any shared classes, constants, etc. export * from "./nfc.common"; \ No newline at end of file diff --git a/src/nfc.common.ts b/src/nfc.common.ts index 1a38fa4..51ea6c9 100644 --- a/src/nfc.common.ts +++ b/src/nfc.common.ts @@ -102,3 +102,30 @@ export interface NfcApi { */ setOnNdefDiscoveredListener(callback: (data: NfcNdefData) => void, options?: NdefListenerOptions): Promise; } + +// this was done to generate a nice API for our users +export class Nfc implements NfcApi { + available(): Promise { + return undefined; + } + + enabled(): Promise { + return undefined; + } + + eraseTag(): Promise { + return undefined; + } + + setOnNdefDiscoveredListener(callback: (data: NfcNdefData) => void, options?: NdefListenerOptions): Promise { + return undefined; + } + + setOnTagDiscoveredListener(callback: (data: NfcTagData) => void): Promise { + return undefined; + } + + writeTag(arg: WriteTagOptions): Promise { + return undefined; + } +} \ No newline at end of file diff --git a/src/nfc.ios.ts b/src/nfc.ios.ts index 8c32e71..ada2213 100644 --- a/src/nfc.ios.ts +++ b/src/nfc.ios.ts @@ -1,7 +1,4 @@ -import { - NdefListenerOptions, NfcApi, NfcNdefData, NfcNdefRecord, NfcTagData, NfcUriProtocols, - WriteTagOptions -} from "./nfc.common"; +import { NdefListenerOptions, NfcApi, NfcNdefData, NfcNdefRecord, NfcTagData, NfcUriProtocols, WriteTagOptions } from "./nfc.common"; export interface NfcSessionInvalidator { invalidateSession(): void; diff --git a/src/package.json b/src/package.json index 32ab29f..b33779c 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-nfc", - "version": "4.0.4", + "version": "4.1.0", "description": "NFC plugin for your NativeScript app", "main": "nfc", "typings": "index.d.ts",