Skip to content

Update the defaultValue check to allow for falsy and undefined values#4838

Draft
JasonAtClockwork wants to merge 2 commits intomasterfrom
jlarabie/ts-default-values
Draft

Update the defaultValue check to allow for falsy and undefined values#4838
JasonAtClockwork wants to merge 2 commits intomasterfrom
jlarabie/ts-default-values

Conversation

@JasonAtClockwork
Copy link
Copy Markdown
Contributor

Description of Changes

This fixes a bug in TypeScript table default serialization where falsy defaults like 0, '', false, and explicit undefined were treated as if no default was provided. I did this as a property check in order to allow undefined which becomes None() as the API allows T | undefined.

Closes: #4700

API and ABI breaking changes

N/A

Expected complexity level and risk

1 - Simple change to check the default value was added as a property

Testing

  • Reproduced the failing issue in a simple throwaway project

@JasonAtClockwork JasonAtClockwork self-assigned this Apr 17, 2026
@JasonAtClockwork JasonAtClockwork added the bugfix Fixes something that was expected to work differently label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes something that was expected to work differently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table field default value 0 or "" isn't interpreted as a default value

1 participant