( data: T, message?: string, )
| 3 | } |
| 4 | |
| 5 | export function withSuccessText<T extends Record<string, unknown>>( |
| 6 | data: T, |
| 7 | message?: string, |
| 8 | ): T & { message?: string } { |
| 9 | return message ? { ...data, message } : data; |
| 10 | } |
| 11 | |
| 12 | export function readCommandMessage(data: Record<string, unknown> | undefined): string | null { |
| 13 | return typeof data?.message === 'string' && data.message.length > 0 ? data.message : null; |
no outgoing calls
no test coverage detected