TypeScript type errors for op methods.
See original GitHub issueProblem
TypeScript compiler complains when using op
as documented.
However, the library functions correctly.
Steps to reproduce
import * as aq from "arquero";
aq.from([{ a: 1 }, { a: 2 }])
// Error: Type 'number' is not assignable to type 'string | TableExpr'. ts(2322)
.rollup({ max: aq.op.sum("a") })
.objects();
Expected Behavior
No compiler error
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Documentation - Advanced Types - TypeScript
This page lists some of the more advanced ways in which you can model types, it works in tandem with the Utility Types...
Read more >Type-Safe Error Handling In TypeScript - DEV Community
In this post, I introduce the concept of a Result type, which eliminates the need for throwing exceptions, and reduces risk of runtime ......
Read more >How to declare a function that throws an error in Typescript
There is no such feature in TypeScript. It's possible to specify error type only if a function returns an error, not throws it...
Read more >Error handling in TypeScript like a pro - Journal - Plain
To start us off I'd like to make a distinction between two types of errors: expected business errors and unexpected errors.
Read more >A functional (programming) approach to error handling in ...
A functional (programming) approach to error handling in Typescript. Typescript and Javascript provide an error handling strategy based on the try/catch syntax ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for pointing this out. This is a regression due to the more recent “fixes”. I’ll need to look into what support (if any)
tsc
has for defining overloaded functions from JSDoc.Thanks! The types are indeed wrong here. I’ll look into fixing this soon.