Appearance
Function: isFeedback()
ts
function isFeedback(message: string): message is POSITIVE | NEGATIVE;Defined in: src/notice/showSuccessNotice.tsx:32
Check whether a message string represents user feedback (thumbs up or thumbs down).
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message string to evaluate. |
Returns
message is POSITIVE | NEGATIVE
true if the message is a positive or negative feedback value.
Example
ts
const result = await showSuccessNotice(ctx, { title: 'Done!' });
if (isFeedback(result.button)) {
console.log('User left feedback:', result.button);
}