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.

TS: typedef for toReceiveMessage is wrong

See original GitHub issue

The toReceiveMessage matcher is async, but the exported signature is not.

Thus TS complains:

Screen Shot 2019-10-11 at 2 20 35 PM

Should be defined as an async matcher.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
neezercommented, Oct 14, 2019

Please let me know if you know what it’s using under the hood to detect this

Not sure, but I do know that VSCode uses TypeScript, so at some level it’s a TS warning. Looks like this warning in particular was added with this PR: https://github.com/microsoft/TypeScript/pull/32384

I’ll give the new version a try in a bit and report back.

0reactions
romgaincommented, Oct 14, 2019

@neezer It should now be fixed in v1.5.1 - let me know if you have any other issues!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript prefers sources to compiled typedefs #47369
This causes an error at main.ts:1:14 : Type 'null' is not assignable to type 'string'. Loose nulls are permitted in node_modules/ ...
Read more >
How to typedef a function according to tslint with "() => void"?
As typescript tell you, you need to define precisely the prototype of the function you want to use. You will gain auto-completion and...
Read more >
typedef | typescript-eslint
typedef. Require type annotations in certain places. TypeScript cannot always infer types for all places in code. Some locations require type annotations ...
Read more >
767538 – Compilation error when defining the same type ...
The duplicate typedefs are invalid in both ISO C89 and C99, it is only valid in the upcoming C1X standard that is being...
Read more >
Two ways you can take advantage of types in JavaScript ...
This blog post describes how you can enable javascript intellisense and design time error highlighting without TypeScript.
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