Skip to content

Commit

Permalink
fix: update TS definitions for purchase methods (#2509)
Browse files Browse the repository at this point in the history
This PR fixed TS definitions for requestPurchase and requestSubscription
functions.
Ensured that the return values align with the expected types.

- Referece #2426
- Closes #2426


Co-authored-by: ksugawara61 <ksugawara61@users.noreply.github.com>
  • Loading branch information
ksugawara61 and ksugawara61 committed Aug 6, 2023
1 parent 6b5eb41 commit 8bbcaba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ const App = () => {

export const requestPurchase = (
request: RequestPurchase,
): Promise<ProductPurchase | void> =>
): Promise<ProductPurchase | ProductPurchase[] | void> =>
(
Platform.select({
ios: async () => {
Expand Down Expand Up @@ -732,7 +732,7 @@ const App = () => {
*/
export const requestSubscription = (
request: RequestSubscription,
): Promise<SubscriptionPurchase | null | void> =>
): Promise<SubscriptionPurchase | SubscriptionPurchase[] | null | void> =>
(
Platform.select({
ios: async () => {
Expand Down

0 comments on commit 8bbcaba

Please sign in to comment.