MCPcopy
hub / github.com/coder/mux / Ok

Function Ok

src/common/types/result.ts:4–6  ·  view source on GitHub ↗
(data: T)

Source from the content-addressed store, hash-verified

2export type Result<T, E = string> = { success: true; data: T } | { success: false; error: E };
3
4export function Ok<T>(data: T): Result<T, never> {
5 return { success: true, data };
6}
7
8export function Err<E>(error: E): Result<never, E> {
9 return { success: false, error };

Callers 15

tools.test.tsFile · 0.90
startLoopbackServerFunction · 0.90
writeMethod · 0.90
deleteMethod · 0.90
stageWorkspaceAttachmentFunction · 0.90
createServiceHarnessFunction · 0.90

Calls

no outgoing calls

Tested by 15

createServiceHarnessFunction · 0.72
setGoalFunction · 0.72
archiveSuccessFunction · 0.72
createAiServiceFunction · 0.72
createAiServiceFunction · 0.72
createMockDepsFunction · 0.72
createAIServiceMocksFunction · 0.72
setupReportedTaskChainFunction · 0.72