(path: NodePath)
| 15 | * Prints the given path without leading or trailing comments. |
| 16 | */ |
| 17 | export default function printValue(path: NodePath): string { |
| 18 | let source = path.getSource(); |
| 19 | |
| 20 | // variable declarations and interface/type/class members might end with one of these |
| 21 | if (source.endsWith(',') || source.endsWith(';')) { |
| 22 | source = source.slice(0, -1); |
| 23 | } |
| 24 | |
| 25 | return deindent(source); |
| 26 | } |
no test coverage detected
searching dependent graphs…