diff --git a/api/@ohos.nfc.tag.d.ts b/api/@ohos.nfc.tag.d.ts index c8e8d22ee19cc1e8ea54cb57ef09aa8e4f68f57c..1543c240c68a18bd16c405eceecb04212a9d185a 100644 --- a/api/@ohos.nfc.tag.d.ts +++ b/api/@ohos.nfc.tag.d.ts @@ -122,18 +122,18 @@ declare namespace tag { } /** - * RTD types definitions, see NFC Record Type Definition (RTD) Specification. + * RTD type TEXT, see NFC Record Type Definition (RTD) Specification. * * @since 9 - * @syscap SystemCapability.Communication.NFC.Core */ - enum RtdType { - /** RTD type text */ - RTD_TEXT = 'T', + const RTD_TEXT: number[]; - /** RTD type URI */ - RTD_URI = 'U', - } + /** + * RTD type URI, see NFC Record Type Definition (RTD) Specification. + * + * @since 9 + */ + const RTD_URI: number[]; /** * MifareClassic Type definition @@ -143,16 +143,16 @@ declare namespace tag { */ enum MifareClassicType { /** Mifare Type unknown */ - TYPE_UNKNOWN = -1, + TYPE_UNKNOWN = 0, /** Mifare Classic */ - TYPE_CLASSIC = 0, + TYPE_CLASSIC = 1, /** Mifare Plus */ - TYPE_PLUS = 1, + TYPE_PLUS = 2, /** Mifare Pro */ - TYPE_PRO = 2, + TYPE_PRO = 3, } /** @@ -183,7 +183,7 @@ declare namespace tag { */ enum MifareUltralightType { /** Mifare Type unknown */ - TYPE_UNKOWN = -1, + TYPE_UNKNOWN = 0, /** Mifare Ultralight */ TYPE_ULTRALIGHT = 1, diff --git a/api/tag/nfctech.d.ts b/api/tag/nfctech.d.ts index 4a4b56a3195da46add2b57bf7a2178a89f4adc8b..72c7aa22cc59ff62ae6234d41cd17a18cb81a934 100644 --- a/api/tag/nfctech.d.ts +++ b/api/tag/nfctech.d.ts @@ -307,8 +307,7 @@ export interface NdefTag extends TagSession { * @since 9 * @permission ohos.permission.NFC_TAG */ - canSetReadOnly(): Promise; - canSetReadOnly(callback: AsyncCallback): void; + canSetReadOnly(): boolean; /** * Set ndef tag read-only