orkestral / venom

Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
https://orkestral.io
Apache License 2.0
6.08k stars 1.19k forks source link

declaration file for module 'spinnies' #381

Closed antirek closed 3 years ago

antirek commented 3 years ago

Install venom-bot 2.1.1

on build project receive error

tsc


node_modules/venom-bot/dist/api/layers/host.layer.d.ts:5:27 - error TS7016: Could not find a declaration file for module 'spinnies'. 'node_modules/spinnies/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/spinnies` if it exists or add a new declaration (.d.ts) file containing `declare module 'spinnies';`

5 import * as Spinnies from 'spinnies';



Found 1 error.

```
antirek commented 3 years ago

with venom-bot 2.0.27 build project ok

joaosouz4dev commented 3 years ago

remove nodemodules and try npm install, here work.

antirek commented 3 years ago

No, it's not work. venom-bot 2.1.2 also.

antirek commented 3 years ago

append to {my_project}/types/spinnies.d.ts and build with venom-bot 2.1.2 ok

declare class spinnies {

    constructor(...args: any[]);

    add(...args: any[]): void;

    bindSigint(...args: any[]): void;

    checkIfActiveSpinners(...args: any[]): void;

    fail(...args: any[]): void;

    hasActiveSpinners(...args: any[]): void;

    loopStream(...args: any[]): void;

    pick(...args: any[]): void;

    remove(...args: any[]): void;

    setRawStreamOutput(...args: any[]): void;

    setSpinnerProperties(...args: any[]): void;

    setStreamOutput(...args: any[]): void;

    stopAll(...args: any[]): void;

    succeed(...args: any[]): void;

    update(...args: any[]): void;

    updateSpinnerState(...args: any[]): void;

    static dashes: {
        frames: string[];
        interval: number;
    };

    static dots: {
        frames: string[];
        interval: number;
    };
}

declare namespace spinnies {
    export enum SpinnerStatus {
        Succeed = 'succeed',
        Fail = 'fail',
        Spinning = 'spinning',
        NonSpinnable = 'non-spinnable',
        Stopped = 'stopped',
    }
}
export = spinnies
joaosouz4dev commented 3 years ago

spinners will be removed in the next versions, wait a little longer for that. for now i'm closing this issue.

antirek commented 3 years ago

Ok, I use venom-bot in docker, I don't need them ))

mohamadaminjavadi commented 3 years ago

Ok, I use venom-bot in docker, I don't need them ))

what image did you use to put venom bot inside it?