1.3.6 • Published 6 months ago

@types/node-uci v1.3.6

Weekly downloads
44
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/node-uci

Summary

This package contains type definitions for node-uci (https://github.com/ebemunk/node-uci).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-uci.

index.d.ts

// Type definitions for node-uci 1.3
// Project: https://github.com/ebemunk/node-uci
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// Minimum TypeScript Version: 3.0
/// <reference types="node" />

import { EventEmitter } from 'events';

export interface SearchOptions {
    searchmoves?: ReadonlyArray<string> | undefined;
    ponder?: boolean | undefined;
    wtime?: number | undefined;
    btime?: number | undefined;
    winc?: number | undefined;
    binc?: number | undefined;
    movestogo?: number | undefined;
    depth?: number | undefined;
    nodes?: number | undefined;
    mate?: number | undefined;
    movetime?: number | undefined;
}

export interface SearchResult {
    bestmove: string;
    info: ReadonlyArray<string>;
}

export class Engine {
    constructor(enginePath: string);
    getBufferUntil(fn: (str: string) => boolean): Promise<ReadonlyArray<string>>;
    write(cmd: string): void;
    chain(): EngineChain;
    init(): Promise<Engine>;
    quit(): Promise<Engine>;
    isready(): Promise<Engine>;
    sendCmd(cmd: string): Promise<Engine>;
    setoption(name: string, value?: string): Promise<Engine>;
    ucinewgame(): Promise<Engine>;
    ponderhit(): Promise<Engine>;
    position(fen: string, moves?: ReadonlyArray<string>): Promise<Engine>;
    go(sp: SearchOptions): Promise<SearchResult>;
    goInfinite(sp: SearchOptions): EventEmitter;
    stop(): Promise<SearchResult>;
}

export class EngineChain {
    constructor(engine: Engine);
    init(): EngineChain;
    setoption(name: string, value?: string): EngineChain;
    isready(): EngineChain;
    ucinewgame(): EngineChain;
    quit(): EngineChain;
    position(fen: string, moves?: ReadonlyArray<string>): EngineChain;
    go(sp: SearchOptions): Promise<SearchResult>;
    exec(): unknown;
}

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:35:12 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by DefinitelyTyped.

1.3.6

6 months ago

1.3.5

6 months ago

1.3.4

7 months ago

1.3.3

8 months ago

1.3.2

2 years ago

1.3.1

3 years ago

1.3.0

4 years ago