question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile error from query-helpers.d.ts

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pypmannetjiescommented, Sep 9, 2021

What TypeScript version are you using @pypmannetjies ? I’m not 100% sure, but I think you need to be on v4.1 or higher.

I’m on version 3.8.3

That’s fair enough but if support was dropped in this release, shouldn’t it be a major version?

1reaction
ozluycommented, Sep 9, 2021

@pypmannetjies are you on Windows? If yes I had the same problem after Windows updates…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript .d.ts Compilation Errors - angular - Stack Overflow
I am using Gulp to copy library files from node_modules to "wwwroot/shared/lib" and excluding both directories from compilation in tsconfig.json ...
Read more >
to-do-list-application - node_modules - mongoose - History.md
toJSON to include the error name correctly #9849 hanzki; fix(index.d.ts): indicate that Document#remove() returns a promise, ...
Read more >
types/mongoose/index.d.ts - UNPKG
1803, // some lib.d.ts have return type "this" and others have return type "T[]". 1804, // which causes errors. Let the inherited array...
Read more >
Using TypeScript with Mongoose
Mongoose's index.d.ts file supports a wide variety of syntaxes and strives to ... For example, Mongoose won't report an error if email is...
Read more >
Component testing scenarios - Angular
If you'd like to experiment with the application that this guide describes, ... You get this test failure message when the runtime environment...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found