(node: T)
| 190 | } |
| 191 | |
| 192 | cloneIdentifier<T extends Identifier | Placeholder>(node: T): T { |
| 193 | // We don't need to clone `typeAnnotations` and `optional`: because |
| 194 | // cloneIdentifier is only used in object shorthand and named import/export. |
| 195 | // Neither of them allow type annotations after the identifier or optional identifier |
| 196 | const { type, start, end, loc, range, name } = node; |
| 197 | const cloned = Object.create(NodePrototype); |
| 198 | cloned.type = type; |
| 199 | cloned.start = start; |
| 200 | cloned.end = end; |
| 201 | cloned.loc = loc; |
| 202 | cloned.range = range; |
| 203 | cloned.name = name; |
| 204 | if (node.extra) cloned.extra = node.extra; |
| 205 | return cloned; |
| 206 | } |
| 207 | |
| 208 | cloneStringLiteral<T extends StringLiteral | EstreeLiteral | Placeholder>( |
| 209 | node: T, |
nothing calls this directly
no outgoing calls
no test coverage detected