j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

cant build #1471

Closed bahadir1981 closed 7 months ago

bahadir1981 commented 8 months ago

Observed behavior

type RawReceiptArgs = [ base64: string, bundleIdentifier: string, bundleShortVersion: string, bundleNumericVersion: number, bundleSignature: string ];

gives error Include logs with store.verbosity = store.DEBUG

ERROR in node_modules/cordova-plugin-purchase/www/store.d.ts:2485:23 - error TS1005: ',' expected.

2485 base64: string, ~ node_modules/cordova-plugin-purchase/www/store.d.ts:2486:33 - error TS1005: ',' expected.

2486 bundleIdentifier: string, ~ node_modules/cordova-plugin-purchase/www/store.d.ts:2487:35 - error TS1005: ',' expected.

2487 bundleShortVersion: string, ~ node_modules/cordova-plugin-purchase/www/store.d.ts:2488:37 - error TS1005: ',' expected.

2488 bundleNumericVersion: number, ~ node_modules/cordova-plugin-purchase/www/store.d.ts:2489:32 - error TS1005: ',' expected.

2489 bundleSignature: string ~

[ERROR] An error occurred while running subprocess ng.

Expected behavior

build succesfuly

System Info

ionic 7.1.1 android 12.0.0

Output of cordova info. 12.0.0 (cordova-lib@12.0.1)

j3k0 commented 7 months ago

This is a typescript construct since version 4.0 (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements)

You should be able to fix by upgrading you app to a more recent version of typescript (4.0 is 3 years old, doesn't classify as bleeding edge I think).