Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Adds missing 'listDevices' function to CognitoUser class for TypeScript type safety #687

Closed
wants to merge 1 commit into from

Conversation

mrowles
Copy link

@mrowles mrowles commented Feb 13, 2018

This function is missing from the CognitoUser class in index.d.ts which causes issues trying to use it in TS projects.

I've also done this in the Amplify repository.

@itrestian
Copy link
Contributor

Can you make the above changes here: https://github.com/aws/aws-amplify/tree/master/packages/amazon-cognito-identity-js

Note the notice on the front of this repo that we have changed where this repository is hosted.

@itrestian itrestian closed this Feb 14, 2018
@mrowles
Copy link
Author

mrowles commented Feb 14, 2018

Thanks @itrestian. As stated in the comments, I have already made this PR successfully there, so all good on that front :)

However, I did raise it because from what I can see, it is quite a different implementation in the new repository (unless I'm missing something?). It seems to only allow usage with the Auth class rather than maintain the original code i.e., import {CognitoUser} from 'amazon-cognito-identity-js'. I understand that this may be better going forward, but I want to use this repository until I can spend the time migrating it to the new code, thus the very small change I made to continue this support.

Also, the new repository's auth package README still refers to this repository.

Let me know what you think. Thanks again!

@itrestian
Copy link
Contributor

No, that should still work if you install via npm with the version of 2.0.0! We update npm from that repository as well so you should be fine.

@mrowles
Copy link
Author

mrowles commented Feb 14, 2018

@itrestian Ah, you legend, I completely missed that point. So v2 references the Amplify repo package as opposed to this one, that makes sense. Thanks for the heads up, apologies for the PR time waster!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants