← Server functions

Server.Nullable

luastra/server

Server.Nullable is an exported, statically checked data contract of luastra/server. Its exact declaration documents the fields or alternatives accepted at the module boundary and is erased after Luau analysis.

Before you use it

Add luastra/server to this module's dependencies in luastra.json, then import it with require("luastra/server"). Declare rpc.call in luastra.json and configure a declared backend operation with a deployed trusted handler. Application code should prefer its generated operation function and decoder.

How it fits

The type describes request options, v2 limits, nullable values, public errors, or the tagged envelope-decoding result.

When to use it

Use Server.Nullable when annotating values that cross the public luastra/server boundary or when exporting helpers built on that module. The type documents the exact checked shape and prevents unrelated tables from being substituted accidentally.

Fields or definition

ParameterType / valuesDescription
kind"null" } | { kind: "value"Literal discriminator identifying the exact alternative in this union.
valueTValidated value available on the successful result branch.

What happens next

A checked request, result, limit, nullable-value, or public-error annotation.

Failures and fixes

Handle transport failure, envelope decode failure, and domain validation failure separately. The static web build does not deploy trusted backend handlers, credentials, or production operations for you.

Availability

Public-source alpha API in 0.5.0-alpha; production backend deployment remains application-owned.

Exact declaration

export type Nullable<T> = { kind: "null" } | { kind: "value", value: T }

Continue learning

Prerequisites

Server.value

Companions

Server.nullValue

Complete inventory

View all pages in Server functions
← Previous: Server.DecodeResultNext: Server.Error →