sindresorhus / p-queue

Promise queue with concurrency control
MIT License
3.39k stars 182 forks source link

can not run on react-native project #180

Closed lovetingyuan closed 1 year ago

lovetingyuan commented 1 year ago

this lib can not be used in react native project,

ERROR TypeError: undefined is not a function, js engine: hermes

lovetingyuan commented 1 year ago

transform of the private class field has something wrong

    #onInterval(): void {
        if (this.#intervalCount === 0 && this.#pending === 0 && this.#intervalId) {
            clearInterval(this.#intervalId);
            this.#intervalId = undefined;
        }

        this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0;
        this.#processQueue();
    }

this.#processQueue(); is not a function, hermes engine can not handle the transplied code

sindresorhus commented 1 year ago

You need to open an issue on Hermes instead. This package uses normal JS syntax.