Defjs
Core

struct.null

Struct that accepts only null.

@defjs/core · Function

Signature

function null(): Struct<null, null>;

Accepts null only. Every other value fails with invalid_type. That includes undefined at the root or in an array or tuple; a missing object or record field reports missing_key instead.

This is not the .null() modifier. The modifier adds null to the values another struct accepts.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao