Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM error: A rest parameter must be of an array type. #342

Closed
stephcmartin opened this issue Jan 31, 2019 · 2 comments

Comments

@stephcmartin
Copy link

commented Jan 31, 2019

Haven't had any issues until last night. Wondering if anyone else is receiving the following error from my npm build:

/home/node/app/node_modules/react-ga/types/index.d.ts
(87,20): A rest parameter must be of an array type.

So I went to look at the the current types in index.d.ts (line87) is currently:
export function ga(...args: any): void;

So I changed it to be an array:
export function ga([...args]: any): void;

Managed to get the build running again without any errors.

Possible for you guys to update this bug?

@jsgervais

This comment has been minimized.

Copy link

commented Feb 1, 2019

I just had a similar problem, downgrading this package to 2.5.3 fixed my building issue.

edit
multiple arguments to ga() seems to have been intruduced since 2.5.6 with pr #326 and #327
rebuilding with 2.5.6 is fine too

@archiewald

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2019

#343 This fixes the issue

EpicEric added a commit to EpicEric/react-ga that referenced this issue Feb 20, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

@SimeonC SimeonC closed this in #343 Mar 22, 2019

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 22, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 22, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 22, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 24, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 27, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.

EpicEric added a commit to EpicEric/react-ga that referenced this issue Mar 27, 2019

Return callable from `ga()` without args
As documented on "Usage without arguments" in [ReactGA.ga()](https://github.com/react-ga/react-ga#reactgaga), based on react-ga#342.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.