On the latest version of the Amplify library, when using Typescript, the project will fail to compile with the following:
~/Projects/react-starter/node_modules/aws-amplify/lib/Common/Facet.d.ts
(6,34): Could not find a declaration file for module 'amazon-cognito-auth-js'. '/Projects/react-starter/node_modules/amazon-cognito-auth-js/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/amazon-cognito-auth-js` if it exists or add a new declaration (.d.ts) file containing `declare module 'amazon-cognito-auth-js';`
A user should be able to successfully import the library without having to create a declaration file manually.
v0.3.0 does not have this issue.
@hassankhan the amazon-cognito-auth-js module currently doesn't support typescript. We will mark this as a feature request.
Not sure if it should be just a feature request, this actively breaks the library for any Typescript users updating.
@hassankhan could you try to turn off noImplicitAny to bypass this warning for now? https://github.com/Microsoft/TypeScript/issues/15031
"noImplicitAny: false" does the trick but I agree with @hassankhan, this should be treated like a bug.
Closing since the package doesn't seem to be a dependency of this project any more.
Most helpful comment
"noImplicitAny: false" does the trick but I agree with @hassankhan, this should be treated like a bug.