import * as schema from '@stencila/schema'; import { Capabilities, Claims, Executor, Method, Params } from './Executor'; /** * An `Executor` class that has some basic capabilities able to be * implemented easily in Javascript without heavy dependencies * (e.g.in the browser): * * - `decode` from, and `encode` to, JSON * - `select` from a node using JSON Pointer syntax * - `execute` a JavaScript `CodeExpression` not within a session * - `pipe` method calls */ export declare class Worker extends Executor { /** * @override Override of {@link Executor.capabilities} to * declare specific capabilities of this executor class. */ capabilities(): Promise; /** * @override Override of {@link Executor.decode} that * provides decoding of JSON. */ decode(source: string, format?: string): Promise; /** * @override Override of {@link Executor.encode} that * provides encoding to JSON. */ encode(node: schema.Node, dest?: string, format?: string): Promise; /** * @override Override of {@link Executor.query} to provide * implementations for JSON Pointer and JMESPath. */ query(node: schema.Node, query: string, lang?: string): Promise; private evaluate; /** * @override Override of {@link Executor.execute} that * provides for execution of Javascript expressions. * * Will not attempt to execute an expression that has been * requested to be executed withing a session. ie. will * only work with "pure" expressions. */ execute(node: Type, session?: schema.SoftwareSession, claims?: Claims): Promise; /** * @override Override of {@link Executor.pipe} that * provides a simple implementation of piping. */ pipe(node: schema.Node, calls: (Method | [Method, Params])[]): Promise; }