Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ionic Pro build: customised AWS-SDK module required

$
0
0

@Tobin wrote:

Using the JS AWS-SDK in typescript.

AWS.config.credentials has type defined as Credentials | CredentialsOptions | null in AWS’s docs, however on compilation we get:

Property ‘refresh’ does not exist on type ‘Credentials | CredentialsOptions’. Property ‘refresh’ does not
exist on type ‘CredentialsOptions’.

Normally I “fix” this by removing CredentialsOptions|null from the type definition after the first NPM install so it just defines against Credentials, (refresh() is really the most useful method in it). However, with the Ionic Pro Build, one cannot do this so builds error.

Is there a way to use our own node_modules (similar to in AWS Lambda) or should I stick with redefining AWS.config.credentials as any ?

const AWSCredentials: any = AWS.config.credentials
AWSCredentials.refresh()

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>