Daniel Contreras

Results 14 comments of Daniel Contreras

It's similar but not exactly the same: ```ts type Foo = T extends { new (a: infer A): any } ? A : never; ``` `A` is marked as unused....

Another way is implementing a `valueOf` method that always throws. That way an implicit convertion to a primitive value, like using comparison/arithmetic operators, will fail. The error message can give...

@dgreene1 The case against `==` is very different to comparisons like ``, etc. The fact that `==` gives always `false` for two different temporal objects **is not a bug** of...

@pithu > I am not sure if throwing an exception when calling (implicit) `valueOf` is a good alternativ. Is this a common practice for other libraries? Throwing in `valueOf` is...

> Let's assume we implement that valueOf throws a TypeError. For what classes should we implement it ? > > `LocalDate`, `LocalTime`, `LocalDateTime`, `OffsetTime`, `OffsetDateTime`, `Instant`, `ZonedDateTime`, anything else ?...

@pithu @phueper I'm thinking about implementing this now since some breaking PRs have been recently merged and is very likely the next will be a major version. Is that OK?...

Hi there. I haven't used TypeORM but have you tried converting the `LocalDate` to `string`? ``` where('user.last_check_in = :date', { date: yesterDay.toString(), }) ``` The `.toString()` will convert the date...

This is still an issue. I updated the repro repo to Jest 29.4.3 and the behavior is the same as described.

Why does ts-jest change `module` to `CommonJS` and why this is only apparent if using `isolatedModules: true` in the jest config? If I have to guess I would say it...

There is yet another reason for merging locally: if you want every single commit signed with a key you personally trust. It's true that you can configure the internal Gitea...