MCPcopy Create free account
hub / github.com/babel/babel / commentFromString

Function commentFromString

packages/babel-plugin-transform-flow-comments/src/index.ts:9–13  ·  view source on GitHub ↗
(comment: string | t.Comment)

Source from the content-addressed store, hash-verified

7 api.assertVersion(REQUIRED_VERSION("^7.0.0-0 || ^8.0.0"));
8
9 function commentFromString(comment: string | t.Comment): t.Comment {
10 return typeof comment === "string"
11 ? { type: "CommentBlock", value: comment }
12 : comment;
13 }
14
15 function attachComment({
16 ofPath,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected