Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow named types in unions #469

Merged
merged 24 commits into from
Sep 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: tests
joscha committed Sep 23, 2024
commit c3ac1b31f8af01706c48cfd1421f903c5085a6b5
3 changes: 1 addition & 2 deletions lib/types.js
Original file line number Diff line number Diff line change
@@ -3076,9 +3076,8 @@ function getTypeBucket(type) {
return 'string';
case 'map':
case 'error':
return 'object';
case 'record':
return type.name ? maybeQualify(type.name, type.namespace) : 'object';
return 'object';
default:
return typeName;
}
2 changes: 1 addition & 1 deletion test/test_types.js
Original file line number Diff line number Diff line change
@@ -3492,7 +3492,7 @@ suite('types', () => {
assert(Type.isType(t.field('unwrapped').type, 'union:unwrapped'));
});

test.only('union projection', () => {
test('union projection', () => {
const Dog = {
type: 'record',
name: 'Dog',