(result: Result<T>)
| 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) { |