Skip to content

Compile error from query-helpers.d.ts #1025

Closed
@pypmannetjies

Description

@pypmannetjies

It looks like the latest version of the DOM testing library types has a compile error:

node_modules/@testing-library/dom/types/query-helpers.d.ts(6,60): error TS1005: ',' expected.

I believe it was introduced in this PR

  • @testing-library/dom version: 8.3.0
  • Testing Framework and version: Mocha 9.1.1
  • DOM Environment: N/A

Relevant code or config:

var your => (code) => here;

What you did:

Compiled a file which is using the dom-testing type

import * as domTesting from '@testing-library/dom';

What happened:

Compile error:

node_modules/@testing-library/dom/types/query-helpers.d.ts(6,60): error TS1005: ',' expected.

Suggested solution:

It looks like the error is on this line

export type GetErrorFunction<Arguments extends any[] = [alt: string]> = (

It's complaining about the : after the alt

Not sure what the intended type is.

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