motoko 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -28,6 +28,13 @@ export type Diagnostic = {
28
28
 
29
29
  export type WasmMode = 'ic' | 'wasi';
30
30
 
31
+ export type Result = {
32
+ value?: any;
33
+ error: {
34
+ message?: string;
35
+ } | null;
36
+ };
37
+
31
38
  export default function wrapMotoko(compiler: Compiler) {
32
39
  const version = compiler.version || '(unknown)';
33
40
  const debug = require('debug')(`motoko:${version}`);
@@ -157,7 +164,7 @@ export default function wrapMotoko(compiler: Compiler) {
157
164
  run(
158
165
  path: string,
159
166
  libPaths?: string[] | undefined,
160
- ): { stdout: string; stderr: string; result: number | string } {
167
+ ): { stdout: string; stderr: string; result: Result } {
161
168
  return invoke('run', false, [libPaths || [], path]);
162
169
  },
163
170
  candid(path: string): string {