From 25e717a0ae23537d2534df654abd04079f0b5827 Mon Sep 17 00:00:00 2001 From: Jenna Antilla <46546946+jennantilla@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:58:26 -0700 Subject: [PATCH] Update method deprecation warnings to include method names --- src/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3979bd05..1f0536f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -220,14 +220,14 @@ export namespace OneSignal { } /** - * @deprecated This method is deprecated. It has been replaced by {@link getIdAsync}. + * @deprecated getPushSubscriptionId is deprecated. It has been replaced by {@link getIdAsync}. */ export function getPushSubscriptionId(): string { if (!isNativeModuleLoaded(RNOneSignal)) { return ''; } console.warn( - 'OneSignal: This method has been deprecated. Use getIdAsync instead for getting push subscription id.', + 'OneSignal: The method getPushSubscriptionId has been deprecated. Use getIdAsync instead for getting push subscription id.', ); return pushSub.id ? pushSub.id : ''; @@ -244,14 +244,14 @@ export namespace OneSignal { } /** - * @deprecated This method is deprecated. It has been replaced by {@link getTokenAsync}. + * @deprecated getPushSubscriptionToken is deprecated. It has been replaced by {@link getTokenAsync}. */ export function getPushSubscriptionToken(): string { if (!isNativeModuleLoaded(RNOneSignal)) { return ''; } console.warn( - 'OneSignal: This method has been deprecated. Use getTokenAsync instead for getting push subscription token.', + 'OneSignal: The method getPushSubscriptionToken has been deprecated. Use getTokenAsync instead for getting push subscription token.', ); return pushSub.token ? pushSub.token : ''; @@ -269,14 +269,14 @@ export namespace OneSignal { } /** - * @deprecated This method is deprecated. It has been replaced by {@link getOptedInAsync}. + * @deprecated getOptedIn is deprecated. It has been replaced by {@link getOptedInAsync}. */ export function getOptedIn(): boolean { if (!isNativeModuleLoaded(RNOneSignal)) { return false; } console.warn( - 'OneSignal: This method has been deprecated. Use getOptedInAsync instead for getting push subscription opted in status.', + 'OneSignal: The method getOptedIn has been deprecated. Use getOptedInAsync instead for getting push subscription opted in status.', ); return pushSub.optedIn;