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

[Docs] Annotate signature of function props #2841

Merged
merged 1 commit into from
Jan 9, 2016

Conversation

alitaheri
Copy link
Member

This gives the ability to easily annotate parameters that are passed into callback functions.

Addressing #2417

@oliviertassinari @newoga Take a look at dialog to see how it turned out. Also I had to add some dependencies to get the doctrine working.

@alitaheri alitaheri added docs Improvements or additions to the documentation PR: Needs Review labels Jan 8, 2016
"eslint": "^1.10.3",
"eslint-plugin-react": "^3.13.0",
"esutils": "^1.1.6",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solve Uncaught TypeError: esutils.code.isIdentifierStart is not a function. That's weird 🙈.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's webpack's fault. esutils had updated their API with v2.0.2 yet doctrine uses the older 1.1.6 version. In a normal day everything works fine since semver is respected. but after digging around for 2 hours I found out that webpack was not respecting semver for this particular package. it would only bundle the 2.0.2 version and discard 1.1.6. Therefore, what doctrine was requiring was actually the 2.0.2 version not the 1.1.6 it was expecting! Doing this somehow forces webpack to contain both. I don't understand why webpack is doing something so stupid here. But this solves it.

oliviertassinari added a commit that referenced this pull request Jan 9, 2016
[Docs] Annotate signature of function props
@oliviertassinari oliviertassinari merged commit 90b27e9 into mui:master Jan 9, 2016
@oliviertassinari
Copy link
Member

@alitaheri really nice 👍.

@alitaheri alitaheri deleted the annotate-function-prop branch January 9, 2016 10:03
@alitaheri
Copy link
Member Author

Thanks ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants