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:tanhauhau/validate-template-element branch from 0342134 to 5dc839d Jul 11, 2019
@babel-bot
Copy link
Collaborator

@babel-bot 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

@nicolo-ribaudo nicolo-ribaudo commented Jul 11, 2019

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

@tanhauhau
Copy link
Member Author

@tanhauhau 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>
@nicolo-ribaudo nicolo-ribaudo merged commit ee68d6d into babel:master Jul 14, 2019
4 checks passed
4 checks passed
@babel-bot
babel/repl REPL preview is available
Details
ci/circleci Your tests passed on CircleCI!
Details
@codecov
codecov/project 87.58% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
AdamRamberg added 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 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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants