MCPcopy Index your code
hub / github.com/callstack/agent-device / withSuccessText

Function withSuccessText

src/utils/success-text.ts:5–10  ·  view source on GitHub ↗
(
  data: T,
  message?: string,
)

Source from the content-addressed store, hash-verified

3}
4
5export 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
12export function readCommandMessage(data: Record<string, unknown> | undefined): string | null {
13 return typeof data?.message === 'string' && data.message.length > 0 ? data.message : null;

Callers 10

serializeDeployResultFunction · 0.90
serializeOpenResultFunction · 0.90
runDirectPressSeriesFunction · 0.90
runSwipeCoordinatesFunction · 0.90
handleScrollCommandFunction · 0.90
handleSettingsCommandFunction · 0.90
handleAppDeployCommandFunction · 0.90
handleCloseCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected