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/README.md +10 -11
- package/lib/file.d.ts +1 -1
- package/lib/index.d.ts +8 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/versions/interpreter.d.ts +2 -2
- package/lib/versions/moc.d.ts +2 -2
- package/package.json +14 -2
- package/packages/latest/base.json +1 -1
- package/src/index.ts +8 -1
- package/versions/latest/didc.min.js +1 -1
- package/versions/latest/moc.min.js +1 -1
- package/versions/latest/moc_interpreter.min.js +1 -1
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:
|
167
|
+
): { stdout: string; stderr: string; result: Result } {
|
161
168
|
return invoke('run', false, [libPaths || [], path]);
|
162
169
|
},
|
163
170
|
candid(path: string): string {
|