Defjs
Core

struct.unknown

Struct that accepts any value except null and undefined, typed as unknown.

@defjs/core · Function

Signature

function unknown(): UnknownStruct;

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 unknown, so the caller must narrow it before use.

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