Skip to content

update createDefaultCodec to handle Unknown types correctly#35

Open
abrantesarthur wants to merge 3 commits intomainfrom
createDefaultType_unknown
Open

update createDefaultCodec to handle Unknown types correctly#35
abrantesarthur wants to merge 3 commits intomainfrom
createDefaultType_unknown

Conversation

@abrantesarthur
Copy link
Contributor

Related Issues

  • [none]

Security Implications

[none]

System Availability

[none]

@abrantesarthur abrantesarthur changed the title update createDefaultCodec to handle literal types correctly update createDefaultCodec to handle Unknown types correctly Jan 19, 2025

// The default of an object type is an empty object
if (codec instanceof t.ObjectType) {
if (codec instanceof t.ObjectType || codec instanceof t.UnknownType) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be UnknownRecord, since UnknownType is for unknown

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly, if I do codec instanceof t.RecordType I get error Right-hand side of 'instanceof' is not callable

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.

2 participants