(entry: T, property: string)
| 140 | } |
| 141 | |
| 142 | function formatPropertyValue(entry: T, property: string): string { |
| 143 | // handle mentionable properties |
| 144 | if ("isRole" in entry) { |
| 145 | const isRole = (entry as any).isRole; |
| 146 | const subjectId = (entry as any).subjectId; |
| 147 | return isRole ? roleMention(subjectId) : userMention(subjectId); |
| 148 | } |
| 149 | |
| 150 | const value = (entry as any)[property]; |
| 151 | const valueFormatter = propertyFormatters[property]; |
| 152 | return valueFormatter ? valueFormatter(value) : inlineCode(String(value)); |
| 153 | } |
| 154 | |
| 155 | function formatDescriptionProperty(entry: T, property: string): string { |
| 156 | const value = (entry as any)[property]; |
no outgoing calls
no test coverage detected