(ast: TypeLiteral)
| 1551 | const formatIndexSignatures = (iss: ReadonlyArray<IndexSignature>): string => iss.map(String).join("; ") |
| 1552 | |
| 1553 | const formatTypeLiteral = (ast: TypeLiteral): string => { |
| 1554 | if (ast.propertySignatures.length > 0) { |
| 1555 | const pss = ast.propertySignatures.map(String).join("; ") |
| 1556 | if (ast.indexSignatures.length > 0) { |
| 1557 | return `{ ${pss}; ${formatIndexSignatures(ast.indexSignatures)} }` |
| 1558 | } else { |
| 1559 | return `{ ${pss} }` |
| 1560 | } |
| 1561 | } else { |
| 1562 | if (ast.indexSignatures.length > 0) { |
| 1563 | return `{ ${formatIndexSignatures(ast.indexSignatures)} }` |
| 1564 | } else { |
| 1565 | return "{}" |
| 1566 | } |
| 1567 | } |
| 1568 | } |
| 1569 | |
| 1570 | /** |
| 1571 | * @category guards |
no test coverage detected