Skip to content

Fix docs for static property builder#2071

Merged
existentialism merged 1 commit intobabel:masterfrom
yuri-karadzhov:add-static-to-class-property-builder
Jul 25, 2019
Merged

Fix docs for static property builder#2071
existentialism merged 1 commit intobabel:masterfrom
yuri-karadzhov:add-static-to-class-property-builder

Conversation

@yuri-karadzhov
Copy link
Copy Markdown
Contributor

Fix docs for t.classProperty builder to accept static argument

t.classProperty(key, value, typeAnnotation, decorators, computed, static);

@netlify
Copy link
Copy Markdown

netlify bot commented Jul 22, 2019

Deploy preview for babel ready!

Built with commit e2b39ae

https://deploy-preview-2071--babel.netlify.com

Copy link
Copy Markdown
Member

@suchipi suchipi left a comment

Choose a reason for hiding this comment

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

This doesn't work in the latest version. Maybe this is in master but hasn't been published yet?

To test, I went here: https://npm.runkit.com/@babel/types
and used this code block:

const t = require("@babel/types")

t.classProperty(t.identifier("foo"), t.stringLiteral("bar"), null, [], false, true)

and it throws an error:

Error: ClassProperty: Too many arguments passed. Received 6 but can receive no more than 5

@yuri-karadzhov
Copy link
Copy Markdown
Contributor Author

@suchipi It was recently merged not published yet, check related PR.

@existentialism existentialism merged commit eab9ca6 into babel:master Jul 25, 2019
@microbouji microbouji mentioned this pull request Sep 12, 2019
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.

4 participants