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

Specifying TypesScript Version: 2.3 causes "error TS2370: A rest parameter must be of an array type." #270

Open
kygoh opened this issue Feb 14, 2020 · 2 comments

Comments

@kygoh
Copy link

kygoh commented Feb 14, 2020

After following the steps in Add types for a library (not on DefinitelyTyped), I get the following error:

> dtslint types

Error: Errors in [email protected] for external dependencies:
../node_modules/@types/parsimmon/index.d.ts(394,32): error TS2370: A rest parameter must be of an array type.

The index.d.ts file has

// TypeScript Version: 2.3

The problem is resolved when I changed the version to 3.0 in index.d.ts.

// TypeScript Version: 3.0

What can I do to make dtslint work with // Typescript Version: 2.3?

@kygoh kygoh changed the title Errors in [email protected] for external dependencies: Specifying TypesScript Version: 2.3 causes "error TS2370: A rest parameter must be of an array type." Feb 14, 2020
@kygoh
Copy link
Author

kygoh commented Feb 14, 2020

Initially, I thought the problem was with @types/[email protected] and raised issue #42368 in DefinitelyTyped.

Upon further testing, I found that the problem can be resolved without any modification to @types/[email protected]. As described above, by changing to // Typescript Version: 3.0 in index.d.ts.

@EmandM
Copy link

EmandM commented Mar 16, 2020

Also looking for a solution to this

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

2 participants