question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add typings support for aws-amplify-react-native

See original GitHub issue

Is your feature request related to a problem? Please describe.

When developing a React Native app with aws-amplify-react-native, adding the following line:

import { withAuthenticator } from 'aws-amplify-react-native';

results in the following warning:

{
	"resource": "/Users/adrianha/GitHub/restaurant-reviews/mobile-app/src/screens/UserScreen.tsx",
	"owner": "typescript",
	"code": "7016",
	"severity": 8,
	"message": "Could not find a declaration file for module 'aws-amplify-react-native'. '/Users/adrianha/GitHub/restaurant-reviews/mobile-app/node_modules/aws-amplify-react-native/dist/index.js' implicitly has an 'any' type.\n  Try `npm install @types/aws-amplify-react-native` if it exists or add a new declaration (.d.ts) file containing `declare module 'aws-amplify-react-native';`",
	"source": "ts",
	"startLineNumber": 1,
	"startColumn": 35,
	"endLineNumber": 1,
	"endColumn": 61
}

Describe the solution you’d like

Generate and publish typings information that is distributed with aws-amplify-react-native.

Describe alternatives you’ve considered

I have added a custom typings file to my project that provides this information.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:30
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
camello222commented, Sep 27, 2021

WHy hasn’t this been solved yet? It’s been almost three years.

6reactions
dantasfilescommented, Feb 13, 2020

will you share your types?

I’m using these: https://github.com/dantasfiles/AmplifyReactNativeTypes

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use AWS Amplify in React Native with Typescript ...
I'm trying to add Amplify Authentication in ...
Read more >
aws-amplify-react-native - npm
AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications.. Latest version: 7.0.2, ...
Read more >
Using the API.ts Typescript types generated by AWS Amplify
We explore using Typescript with AWS Amplify API in React Native, with a particular focus on the types that AWS Amplify generates into...
Read more >
AWS Amplify + React Native / Authentication FULL SETUP
First of all, you can create and configure Amazon Cognito services directly from the AWS Amplify command-line interface. By creating an authentication service...
Read more >
AWS Amplify adds support for push notifications in React ...
Configuring the backend with Mobile Hub · Configuring your React Native app · Testing and tracking notifications · Authorization improvements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found