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 assertShape to validate templateElement #10198

Merged

Conversation

tanhauhau
Copy link
Member

@tanhauhau tanhauhau commented Jul 11, 2019

Should we update the templateElement's validator and update the docs as well?

@sebmck need your advice, because i saw you left a TODO there.

Q                       A
Fixed Issues? Fixes #10195
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@tanhauhau tanhauhau force-pushed the tanhauhau/validate-template-element branch from 0342134 to 5dc839d Compare July 11, 2019 15:10
@babel-bot
Copy link
Collaborator

babel-bot commented Jul 11, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11119/

@nicolo-ribaudo
Copy link
Member

If you run make build does it updates the generated flow/typescript types?

@tanhauhau
Copy link
Member Author

tanhauhau commented Jul 11, 2019

yup

// index.js.flow
declare function templateElement(value: {raw:string, cooked:string}, tail?: boolean): BabelNodeTemplateElement;

// index.d.ts
export function templateElement(value: {raw:string, cooked:string}, tail?: boolean): TemplateElement;

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
@existentialism existentialism added pkg: types PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jul 13, 2019
@nicolo-ribaudo nicolo-ribaudo merged commit ee68d6d into babel:master Jul 14, 2019
AdamRamberg pushed a commit to AdamRamberg/babel that referenced this pull request Jul 17, 2019
* add assertShape to validate templateElement

* Update packages/babel-types/src/definitions/utils.js

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* templateElement optional cooked
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: types PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Value property of templateElement type missing documentation
5 participants