MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / resultToString

Method resultToString

src/common/result.ts:81–87  ·  view source on GitHub ↗
(result: Result<T>)

Source from the content-addressed store, hash-verified

79 }
80
81 static resultToString<T>(result: Result<T>): string {
82 if (result.ok) {
83 return `Ok(${JSON.stringify(result.value)})`;
84 } else {
85 return `Err(${result.error?.toString() || 'Unknown error'})`;
86 }
87 }
88
89 static resultToJSON<T>(result: Result<T>): string {
90 if (result.ok) {

Callers 1

toStringMethod · 0.80

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected