(path: NodePath<N>)
| 69 | } |
| 70 | |
| 71 | function wrapInFlowComment< |
| 72 | N extends |
| 73 | | t.ClassProperty |
| 74 | | t.ExportNamedDeclaration |
| 75 | | t.Flow |
| 76 | | t.ImportDeclaration |
| 77 | | t.ExportDeclaration |
| 78 | | t.ImportSpecifier |
| 79 | | t.ImportDeclaration, |
| 80 | >(path: NodePath<N>) { |
| 81 | attachComment({ |
| 82 | ofPath: path, |
| 83 | // @ts-expect-error optional may not exist in path.parent |
| 84 | comments: generateComment(path, path.parent.optional), |
| 85 | }); |
| 86 | } |
| 87 | |
| 88 | function generateComment(path: NodePath, optional?: boolean | void) { |
| 89 | let comment = path |
no test coverage detected