Skip to content

Error on tsc compilation #43

@dougg0k

Description

@dougg0k

Hi,

I'm getting this error when trying to compile a project that I added graphql-fields-list.

node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts:509:52 - error TS2379: Argument of type '{ fragments: ObjMap<FragmentDefinitionNode>; vars: { [variable: string]: unknown; }; withVars: boolean | undefined; }' is not assignable to parameter of type 'TraverseOptions' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
  Types of property 'withVars' are incompatible.
    Type 'boolean | undefined' is not assignable to type 'boolean'.
      Type 'undefined' is not assignable to type 'boolean'.

509     const tree = traverse(getNodes(fieldNode), {}, {
                                                       ~
510             fragments: info.fragments,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
512             withVars: withDirectives,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
513         },
    ~~~~~~~~~

It's the only lib giving problems.

Can you fix?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions