Skip to content

Try improving handling of unions#2851

Merged
Marsup merged 1 commit intohapijs:masterfrom
joshkel:union-improvements
Sep 29, 2022
Merged

Try improving handling of unions#2851
Marsup merged 1 commit intohapijs:masterfrom
joshkel:union-improvements

Conversation

@joshkel
Copy link
Contributor

@joshkel joshkel commented Sep 29, 2022

The goal is to handle "complex" unions (unions that aren't merely subsets of a single primitive type) without interfering with simple enumerated-constant-style unions (such as 'development' | 'production' | 'test') or booleans.

Include updated test cases from #2850.

Fixes #2848

The goal is to handle "complex" unions (unions that aren't merely subsets of a single primitive type) without interfering with simple enumerated-constant-style unions (such as `'development' | 'production' | 'test'`) or booleans.

Fixes hapijs#2848
@Marsup Marsup self-assigned this Sep 29, 2022
@Marsup Marsup added bug Bug or defect types TypeScript type definitions labels Sep 29, 2022
@Marsup Marsup added this to the 17.6.2 milestone Sep 29, 2022
@Marsup Marsup merged commit 18c1963 into hapijs:master Sep 29, 2022
@joshkel joshkel deleted the union-improvements branch October 6, 2022 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug or defect types TypeScript type definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict object schema with a boolean property expects alternative, not boolean

2 participants