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.

Type definition wrong?

See original GitHub issue

Just found this project and would love to be able to use linq style code in typescript. However, I think there’s something wrong with the typings file. It’s almost like it’s out of date. Specifically, I’m trying to use the GroupBy changes in 1.12.1. I’ve tried that version and 1.12.2. Both seem to have this in index.d.ts:

GroupBy(grouper: (key: T) => any, mapper: (element: T) => any): any;

I’ll admit that I’m fairly new to typescript, so maybe I’m missing something, but isn’t that the wrong entry?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
texastolandcommented, Jan 3, 2019

I wrestled with TypeScript in microbundle including several PRs. I found deeper issues and ended up falling back to Rollup. Wish I could help!

1reaction
robertmclawscommented, Jan 3, 2019

I think the point of shipping it as a TypeScript file is that it gets compiled by the end project, and doesn’t get transpiled to something else in between. There are other implementations (like linqjs) that are frankly a little better in some ways, so this project should play to it’s strengths (more closely mapping to the C# LINQ implementation) and keep things simple. Just ship the TS file. Don’t transpile it, don’t have a separate types file. None of that is necessary. If you’re not using TypeScript in the first place, I don’t think you should be using this library. But that’s just my personal opinion 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to overwrite incorrect TypeScript type definition installed ...
How to overwrite incorrect TypeScript type definition installed via @types/package · You can just add a new interface with the same name as...
Read more >
Type I and type II errors - Wikipedia
In statistical hypothesis testing, a type I error is the mistaken rejection of an actually true null hypothesis (also known as a "false...
Read more >
error TS2688: Cannot find type definition file for...random paths.
Basically anything that tries to do typescript gets a bunch of errors about not finding type definitions I never reference in any of...
Read more >
TypeScript. How to rewrite type definition file (file.d.ts) of any ...
If you have some node_modules package with the very old /odd / bad definition of TypeScript, you can easily rewrite it so your...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
Passing arguments of the wrong type (e.g. passing a list when an int is expected) should result in a TypeError , but passing...
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