(id: Node, text: string)
| 1220 | const wholeOf = (unit: string) => `[${membersOf.get(unit)!.join(", ")}]` |
| 1221 | const s = new MagicString(code) |
| 1222 | const replace = (id: Node, text: string) => { |
| 1223 | const parent = id.parent |
| 1224 | const isShorthand = |
| 1225 | parent?.type === "Property" && parent.shorthand && parent.value === id |
| 1226 | s.overwrite( |
| 1227 | id.start, |
| 1228 | id.end, |
| 1229 | isShorthand ? `${(id as { name: string }).name}: ${text}` : text |
| 1230 | ) |
| 1231 | } |
| 1232 | const flattenFactory = (d: Factory) => { |
| 1233 | const body = d.fn.body as Block |
| 1234 | const renamed = new Map<Binding, string>() |
no outgoing calls
no test coverage detected