Skip to content

docs: explain optional field and zero-value semantics#278

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-261-optional-fields-are-not-typed-as-optiona
Open

docs: explain optional field and zero-value semantics#278
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-261-optional-fields-are-not-typed-as-optiona

Conversation

@ivanauth

Copy link
Copy Markdown
Contributor

Closes #261.

Adds a README section explaining why optional* scalar fields aren't typed optional in the generated TS (no proto3 optional; protobuf-ts treats them as required), the zero-value convention for "unset" ("", 0, false, []), and how create() fills them in. Docs-only.

Signed-off-by: ivanauth <ivan@authzed.com>
@ivanauth
ivanauth requested a review from a team as a code owner July 16, 2026 16:57
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.

Optional fields are not typed as optional

1 participant