Skip to content

Upgrading from 0.25.24 t0 0.27.8 - issues with Type.Intersect #393

Answered by sinclairzx81
tgilino asked this question in Q&A
Discussion options

You must be logged in to vote

@tgilino Hi,

Yeah, there has been quite a few changes from 0.26.0 with respect to intersection types. The composite type is provided as a fallback, however to keep composite inline with the new type model, this type also performs an X extends Y per property check to determine if overlapping properties would yield TNever. This check is only supported for known types (not unsafe types, hence the Extends error you see). I may investigate ways to relax this check in future revisions.

IntersectLegacy Type

You can just import the intersect example from here and replace Type.Intersect for IntersectLegacy

import { IntersectLegacy } from './intersect-legacy' // you will need to copy and paste file…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tgilino
Comment options

Answer selected by tgilino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants