Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

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

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

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

stephcmartin opened this issue Jan 31, 2019 · 2 comments

Comments

@stephcmartin
Copy link

stephcmartin 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
Copy link

jsgervais 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
Copy link
Contributor

#343 This fixes the issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants