How to use the lean-client-js-node.Server function in lean-client-js-node

To help you get started, we’ve selected a few lean-client-js-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leanprover / vscode-lean / src / server.ts View on Github external
});
    }
    msgs = msgs.map((msg) => ({
        ...msg,
        text: msg.text.length <= MAX_MESSAGE_SIZE ? msg.text :
            msg.text.slice(0, MAX_MESSAGE_SIZE) +
                `\n(message too long, truncated at ${MAX_MESSAGE_SIZE} characters)`,
    }));
    return msgs;
}

// A global channel for storing the contents of stderr.
let stderrOutput: OutputChannel;

// A class for interacting with the Lean server protocol.
export class Server extends leanclient.Server {
    transport: ProcessTransport;
    executablePath: string;
    hasLean: boolean = false;        // have we found a usable copy of Lean yet?
    workingDirectory: string;
    options: string[];

    statusChanged: LowPassFilter;
    restarted: Event;

    messages: Message[];

    constructor() {
        super(null); // TODO(gabriel): add support to lean-client-js
        this.statusChanged = new LowPassFilter(300);
        this.restarted = new Event();
        this.messages = [];

lean-client-js-node

Interface to the Lean server

Apache-2.0
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis

Similar packages