Skip to content

Conversation

@pavadeli
Copy link
Member

Recently withOptional was changed to no longer return an IntersectionType. It returns a normal InterfaceType instead. The Visitor<R> interface used to combine intersections and "normal objects" into a single visitObjectLikeType to prevent confusion, but that confusion is probably gone now. Therefore, the visitObjectLikeType is now split into visitObjectType and visitIntersectionType.

BREAKING CHANGE: Visitor<R> interface now requires two new methods visitObjectType and visitIntersectionType while the existing visitObjectLikeType is removed.

…tersectionType`

Recently `withOptional` was changed to no longer return an `IntersectionType`. It returns a normal `InterfaceType` instead. The `Visitor<R>` interface used to combine intersections and "normal objects" into a single `visitObjectLikeType` to prevent confusion, but that confusion is probably gone now. Therefore, the `visitObjectLikeType` is now split into `visitObjectType` and `visitIntersectionType`.

BREAKING CHANGE: `Visitor<R>` interface now requires two new methods `visitObjectType` and `visitIntersectionType` while the existing `visitObjectLikeType` is removed.
@pavadeli pavadeli enabled auto-merge (squash) February 13, 2025 13:34
@pavadeli pavadeli merged commit 82026c6 into next Feb 13, 2025
3 checks passed
@pavadeli pavadeli deleted the update-visitor branch February 13, 2025 13:35
pavadeli added a commit that referenced this pull request Feb 18, 2025
…tersectionType` (#110)

* feat: split `visitObjectLikeType` into `visitObjectType` and `visitIntersectionType`

Recently `withOptional` was changed to no longer return an `IntersectionType`. It returns a normal `InterfaceType` instead. The `Visitor<R>` interface used to combine intersections and "normal objects" into a single `visitObjectLikeType` to prevent confusion, but that confusion is probably gone now. Therefore, the `visitObjectLikeType` is now split into `visitObjectType` and `visitIntersectionType`.

BREAKING CHANGE: `Visitor<R>` interface now requires two new methods `visitObjectType` and `visitIntersectionType` while the existing `visitObjectLikeType` is removed.

* chore: update docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants