Num.Negative
Num / Negative
Import
typescript
import { Num } from '@wollybeard/kit'
// Access via namespace
Num.Negative.someFunction()
typescript
import * as Num from '@wollybeard/kit/num'
// Access via namespace
Num.Negative.someFunction()
Functions
[F]
is
typescript
(value: unknown): boolean
Type predicate to check if value is negative ( 0).
[F]
from
typescript
(value: number): Negative
Construct a Negative number. Throws if the value is not negative.
[F]
tryFrom
typescript
(value: number): Negative | null
Try to construct a Negative number. Returns null if the value is not negative.
[F]
negate
typescript
(value: number): Negative
Negate a positive number to make it negative.
Types
[∩]
Negative
typescript
type Negative = number & { [NegativeBrand]: true }
Negative number ( 0).