Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript type alias declarations to scope #330

Merged
merged 4 commits into from
Apr 26, 2019

Conversation

devongovett
Copy link
Contributor

Flow type aliases were scope tracked correctly, but TypeScript type aliases were not. This should fix that.

I wasn't quite sure where to add a test for this. Let me know if/where I should add one.

@benjamn
Copy link
Owner

benjamn commented Apr 23, 2019

@devongovett Thanks for working on this, and for using ast-types for react-docgen!

Can you either rebase against master now that I've fixed the tests, or open your branch so I can force-push to it?

If you have time to write a test, I would put it in test/typescript.ts, since this functionality is mostly TypeScript-specific, but you can model it after similar Scope tests in test/ecmascript.ts (using scope.lookupType and scope.declaresType instead of scope.lookup and scope.declares).

@benjamn benjamn self-requested a review April 23, 2019 17:07
@devongovett
Copy link
Contributor Author

Merged master and added tests.

@benjamn benjamn merged commit c8252cf into benjamn:master Apr 26, 2019
@benjamn
Copy link
Owner

benjamn commented Apr 26, 2019

Now available in [email protected]. Thanks again!

@devongovett devongovett deleted the typescript-scope branch April 27, 2019 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants