Skip to content

Syntax error: Remove trailing comma after rest arg #792

Closed
@cspotcode

Description

@cspotcode

There's a trailing comma after a rest parameter. This won't be allowed in TypeScript 2.9, so as to match the ECMAScript spec.

https://github.com/apollographql/graphql-tools/blob/master/src/stitching/delegateToSchema.ts#L35

Blog post where they announce the change: https://blogs.msdn.microsoft.com/typescript/2018/05/16/announcing-typescript-2-9-rc/
Github issue for the change: microsoft/TypeScript#22262

It's very minor, I know, but I discovered it because recast attempts to parse the graphql codebase in its unit tests, and this file was failing to parse. And if you ever want to upgrade to TS2.9 you'll have to remove it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions