mevento 1.8.0 → 1.9.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/esm2020/lib/mevento.mjs +127 -59
- package/fesm2015/mevento.mjs +134 -60
- package/fesm2015/mevento.mjs.map +1 -1
- package/fesm2020/mevento.mjs +127 -59
- package/fesm2020/mevento.mjs.map +1 -1
- package/lib/mevento.d.ts +19 -4
- package/package.json +1 -1
package/lib/mevento.d.ts
CHANGED
|
@@ -233,11 +233,22 @@ export declare abstract class NodeVisitor extends ANodeVisitor {
|
|
|
233
233
|
protected abstract visitForOfStatement(node: ForOfStatement): any;
|
|
234
234
|
protected abstract visitContinueAST(node: ContinueAST): any;
|
|
235
235
|
}
|
|
236
|
-
export declare
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
export declare class MEventScope {
|
|
237
|
+
name: string;
|
|
238
|
+
parent?: MEventScope;
|
|
239
|
+
memory: {
|
|
239
240
|
[k: string]: any;
|
|
240
241
|
};
|
|
242
|
+
constructor(name: string, memory: {
|
|
243
|
+
[k: string]: any;
|
|
244
|
+
}, parent?: MEventScope);
|
|
245
|
+
resolve(key: string): any;
|
|
246
|
+
change(key: string, value: any, declare?: boolean): boolean;
|
|
247
|
+
}
|
|
248
|
+
export declare type MEventoFBinding = (args: any[], vm: MEvento) => any;
|
|
249
|
+
export declare class MEvento extends NodeVisitor {
|
|
250
|
+
rootScope: MEventScope;
|
|
251
|
+
protected currentScrope?: MEventScope;
|
|
241
252
|
debug: boolean;
|
|
242
253
|
private static _globalFunctionsRegistry;
|
|
243
254
|
private static _cache;
|
|
@@ -245,6 +256,10 @@ export declare class MEvento extends NodeVisitor {
|
|
|
245
256
|
[k: string]: MEventoFBinding;
|
|
246
257
|
};
|
|
247
258
|
constructor();
|
|
259
|
+
protected resolve(name: string): any;
|
|
260
|
+
protected changeVariable(name: string, value: any): any;
|
|
261
|
+
protected pushScope(name: string): void;
|
|
262
|
+
protected popScope(): void;
|
|
248
263
|
protected log(message: any): void;
|
|
249
264
|
protected visitRootAST(node: RootAST): any;
|
|
250
265
|
protected visitBlockStatementAST(node: BlockStatementAST): any;
|
|
@@ -297,7 +312,7 @@ export declare class MEventoAsync extends MEvento {
|
|
|
297
312
|
protected visitObjectExpression(ast: AST): Promise<any>;
|
|
298
313
|
protected visitArrayExpression(ast: AST): Promise<any[]>;
|
|
299
314
|
protected visitWhileLoopStatement(node: WhileLoopStatement): Promise<any[] | undefined>;
|
|
300
|
-
protected visitForLoopStatement(node: ForLoopStatement): Promise<any[] |
|
|
315
|
+
protected visitForLoopStatement(node: ForLoopStatement): Promise<any[] | null>;
|
|
301
316
|
protected visitForOfStatement(node: ForOfStatement): Promise<any[] | undefined>;
|
|
302
317
|
resolveArgumentsAsync(args: AST[]): Promise<any[]>;
|
|
303
318
|
registerFunction(id: string, fn: MEventoFBinding): void;
|