I am using @amazonpay/amazon-pay-alexa-utils in an Alexa skill built with TypeScript and receiving the error above for several d.ts files, when attempting to compile.
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/AbstractDirectiveBuilder.d.ts:8:18 - error TS1086: An accessor cannot be declared in an ambient context.
8 abstract get Token(): string;
~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/AbstractDirectiveBuilder.d.ts:9:18 - error TS1086: An accessor cannot be declared in an ambient context.
9 abstract get Payload(): V;
~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/AbstractDirectiveBuilder.d.ts:10:18 - error TS1086: An accessor cannot be declared in an ambient context.
10 abstract get PayloadBuilder(): T;
~~~~~~~~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/charge/ChargeDirectiveBuilder.d.ts:9:9 - error TS1086: An accessor cannot be declared in an ambient context.
9 get Token(): string;
~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/charge/ChargeDirectiveBuilder.d.ts:10:9 - error TS1086: An accessor cannot be declared in an ambient context.
10 get Payload(): ChargeAmazonPayRequest;
~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/charge/ChargeDirectiveBuilder.d.ts:11:9 - error TS1086: An accessor cannot be declared in an ambient context.
11 get PayloadBuilder(): ChargePayloadBuilder;
~~~~~~~~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/setup/SetupDirectiveBuilder.d.ts:9:9 - error TS1086: An accessor cannot be declared in an ambient context.
9 get Token(): string;
~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/setup/SetupDirectiveBuilder.d.ts:10:9 - error TS1086: An accessor cannot be declared in an ambient context.
10 get Payload(): SetupAmazonPayRequest;
~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/checkout/setup/SetupDirectiveBuilder.d.ts:11:9 - error TS1086: An accessor cannot be declared in an ambient context.
11 get PayloadBuilder(): SetupPayloadBuilder;
~~~~~~~~~~~~~~
node_modules/@amazonpay/amazon-pay-alexa-utils/lib/model/SandboxSetting.d.ts:4:9 - error TS1086: An accessor cannot be declared in an ambient context.
4 get eMail(): string;
I am using @amazonpay/amazon-pay-alexa-utils in an Alexa skill built with TypeScript and receiving the error above for several d.ts files, when attempting to compile.
Adding the following to the tsconfig.json allows the compilation to succeed (see https://stackoverflow.com/questions/60092642/ts1086-an-accessor-cannot-be-declared-in-ambient-context):
I can use the flag for now, but it would be great to have this issue resolved. Please let me know if more info is required.