Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was 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

Description

@kygoh

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

> dtslint types

Error: Errors in typescript@2.8 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?

Activity

  1. changed the title [-]Errors in typescript@2.8 for external dependencies:[/-] [+]Specifying TypesScript Version: 2.3 causes "error TS2370: A rest parameter must be of an array type."[/+] on Feb 14, 2020
  2. kygoh commented on Feb 14, 2020

    @kygoh
    Author

    Initially, I thought the problem was with @types/parsimmon@1.10.1 and raised issue #42368 in DefinitelyTyped.

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

  3. EmandM commented on Mar 16, 2020

    @EmandM

    Also looking for a solution to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions