Skip to content

add assertShape to validate templateElement#10198

Merged
nicolo-ribaudo merged 3 commits into
babel:masterfrom
tanhauhau:tanhauhau/validate-template-element
Jul 14, 2019
Merged

add assertShape to validate templateElement#10198
nicolo-ribaudo merged 3 commits into
babel:masterfrom
tanhauhau:tanhauhau/validate-template-element

Conversation

@tanhauhau

@tanhauhau tanhauhau commented Jul 11, 2019

Copy link
Copy Markdown
Member

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

babel-bot commented Jul 11, 2019

Copy link
Copy Markdown
Collaborator

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

@nicolo-ribaudo

Copy link
Copy Markdown
Member

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

@tanhauhau

tanhauhau commented Jul 11, 2019

Copy link
Copy Markdown
Member Author

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;

Comment thread packages/babel-types/src/definitions/utils.js Outdated
Comment thread packages/babel-types/src/definitions/es2015.js Outdated
@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 <[email protected]>

* 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