diff --git a/src/babel/traversal/path/removal.js b/src/babel/traversal/path/removal.js index 35b3afcbf1..8521ca5246 100644 --- a/src/babel/traversal/path/removal.js +++ b/src/babel/traversal/path/removal.js @@ -58,6 +58,20 @@ export function _assertUnremoved() { } } +/** + * Description + */ + +export function addComment(type, content) { + var node = this.node; + var key = `${type}Comments`; + var comments = node[key] = node[key] || []; + comments.push({ + type: "CommentBlock", + value: content + }); +} + /** * Share comments amongst siblings. */