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

Native serializer: for option and optional, handle both "undefined" and "null" as missing values #452

Merged
merged 2 commits into from
May 27, 2024

Conversation

andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented May 27, 2024

No description provided.

@andreibancioiu andreibancioiu self-assigned this May 27, 2024
@andreibancioiu andreibancioiu marked this pull request as ready for review May 27, 2024 12:04
assert.deepEqual(typedValuesUsingNull, typedValuesUsingUndefined);
assert.deepEqual(typedValuesUsingNull[0].getType(), new OptionType(new NullType()));
assert.deepEqual(typedValuesUsingNull[0].valueOf(), null);
assert.deepEqual(typedValuesUsingNull[1].getType(), new OptionalType(new U32Type()));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the current behavior of the native serializer. Kept unchanged.

@andreibancioiu andreibancioiu merged commit 5d47501 into main May 27, 2024
1 check passed
@andreibancioiu andreibancioiu deleted the serializer-null-or-undefined branch May 27, 2024 12:12
@andreibancioiu
Copy link
Contributor Author

Post-factum: PR does not bring new behavior, it was not necessary.

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.

3 participants