Skip to content

Commit

Permalink
resolve issue with union type not being checked correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Jan 6, 2025
1 parent 8024fc8 commit 5d3d307
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const BundleAnalysisReportSchema = z.object({
isCached: z.boolean(),
})

const BundleAnalysisReportUnion = z.union([
const BundleAnalysisReportUnion = z.discriminatedUnion('__typename', [
BundleAnalysisReportSchema,
MissingHeadReportSchema.shape.__typename,
z.object({ __typename: MissingHeadReportSchema.shape.__typename }),
])

const BundleAnalysisComparisonResult = z.union([
Expand Down

0 comments on commit 5d3d307

Please sign in to comment.