@poolse/react-native 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1132,18 +1132,27 @@ declare function CallScreen({ userId, labelFor, calls: external, webrtc }: CallS
1132
1132
  * onAnswer: (call) => { ... },
1133
1133
  * });
1134
1134
  */
1135
- /** The slice of `react-native-voip-push-notification` used here. */
1135
+ /**
1136
+ * The slice of `react-native-voip-push-notification` used here.
1137
+ *
1138
+ * Loose on purpose. The real module types `addEventListener` as a
1139
+ * generic whose handler payload varies per event, and pinning exact
1140
+ * signatures here makes `voipPush={VoipPushNotification}` fail to
1141
+ * compile — the prop becomes unusable, which is the whole point of it.
1142
+ * Method syntax (not property arrow syntax) keeps the check bivariant.
1143
+ */
1136
1144
  interface VoipPushModule {
1137
- addEventListener(event: 'register' | 'notification' | 'didLoadWithEvents', handler: (payload: never) => void): void;
1145
+ addEventListener(event: string, handler: (payload: unknown) => void): void;
1138
1146
  removeEventListener(event: string): void;
1139
1147
  registerVoipToken(): void;
1140
1148
  }
1141
- /** The slice of `react-native-callkeep` used here. */
1149
+ /** The slice of `react-native-callkeep` used here. Loose for the same
1150
+ * reason — `setup` resolves to a boolean in the real module. */
1142
1151
  interface CallKeepModule {
1143
- setup(options: unknown): Promise<void>;
1144
- displayIncomingCall(uuid: string, handle: string, localizedCallerName?: string, handleType?: string, hasVideo?: boolean): void;
1145
- endCall(uuid: string): void;
1146
- addEventListener(event: string, handler: (payload: never) => void): void;
1152
+ setup(options: unknown): Promise<unknown>;
1153
+ displayIncomingCall(uuid: string, handle: string, localizedCallerName?: string, handleType?: string, hasVideo?: boolean): unknown;
1154
+ endCall(uuid: string): unknown;
1155
+ addEventListener(event: string, handler: (payload: unknown) => void): void;
1147
1156
  removeEventListener(event: string): void;
1148
1157
  }
1149
1158
  /** An inbound call, as it arrives inside a VoIP push payload. */
package/dist/index.d.ts CHANGED
@@ -1132,18 +1132,27 @@ declare function CallScreen({ userId, labelFor, calls: external, webrtc }: CallS
1132
1132
  * onAnswer: (call) => { ... },
1133
1133
  * });
1134
1134
  */
1135
- /** The slice of `react-native-voip-push-notification` used here. */
1135
+ /**
1136
+ * The slice of `react-native-voip-push-notification` used here.
1137
+ *
1138
+ * Loose on purpose. The real module types `addEventListener` as a
1139
+ * generic whose handler payload varies per event, and pinning exact
1140
+ * signatures here makes `voipPush={VoipPushNotification}` fail to
1141
+ * compile — the prop becomes unusable, which is the whole point of it.
1142
+ * Method syntax (not property arrow syntax) keeps the check bivariant.
1143
+ */
1136
1144
  interface VoipPushModule {
1137
- addEventListener(event: 'register' | 'notification' | 'didLoadWithEvents', handler: (payload: never) => void): void;
1145
+ addEventListener(event: string, handler: (payload: unknown) => void): void;
1138
1146
  removeEventListener(event: string): void;
1139
1147
  registerVoipToken(): void;
1140
1148
  }
1141
- /** The slice of `react-native-callkeep` used here. */
1149
+ /** The slice of `react-native-callkeep` used here. Loose for the same
1150
+ * reason — `setup` resolves to a boolean in the real module. */
1142
1151
  interface CallKeepModule {
1143
- setup(options: unknown): Promise<void>;
1144
- displayIncomingCall(uuid: string, handle: string, localizedCallerName?: string, handleType?: string, hasVideo?: boolean): void;
1145
- endCall(uuid: string): void;
1146
- addEventListener(event: string, handler: (payload: never) => void): void;
1152
+ setup(options: unknown): Promise<unknown>;
1153
+ displayIncomingCall(uuid: string, handle: string, localizedCallerName?: string, handleType?: string, hasVideo?: boolean): unknown;
1154
+ endCall(uuid: string): unknown;
1155
+ addEventListener(event: string, handler: (payload: unknown) => void): void;
1147
1156
  removeEventListener(event: string): void;
1148
1157
  }
1149
1158
  /** An inbound call, as it arrives inside a VoIP push payload. */