(
node: NodeType,
type: T,
)
| 182 | } |
| 183 | |
| 184 | castNodeTo<T extends NodeType["type"]>( |
| 185 | node: NodeType, |
| 186 | type: T, |
| 187 | ): Extract<NodeType, { type: T }> { |
| 188 | node.type = type; |
| 189 | return node as Extract<NodeType, { type: T }>; |
| 190 | } |
| 191 | |
| 192 | cloneIdentifier<T extends Identifier | Placeholder>(node: T): T { |
| 193 | // We don't need to clone `typeAnnotations` and `optional`: because |
nothing calls this directly
no outgoing calls
no test coverage detected