Defjs
Core

struct.any

Struct that accepts any value except null and undefined, without validation.

@defjs/core · Function

Signature

function any(): Struct<PresentValue, any>;

The value is returned unchanged, and nothing inside it is validated or stripped.

  • Chain .null(), .optional(), or .nullish() to accept null or undefined.

  • The output type is any. Prefer struct.unknown() when the caller should narrow the value.

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