Defjs
Core

struct.number

Struct that accepts number values except NaN.

@defjs/core · Function

Signature

function number(): NumberStruct;
  • Accepts number values, including Infinity. NaN and non-numbers fail with invalid_type.

  • Strings are not coerced.

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