Skip to content

Commit

Permalink
fix: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed Mar 24, 2024
1 parent 5b4f762 commit b480c6c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-countries-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"type-plus": patch
---

Update some docs under `numerics`
14 changes: 7 additions & 7 deletions packages/type-plus/src/numeric/is_negative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import type { $ResolveBranch } from '../type_plus/branch/$resolve_branch.js'
import type { $Else, $Then } from '../type_plus/branch/$selection.js'

/**
* Is `T` a positive numeric type.
* Is `T` a negative numeric type.
*
* ```ts
* type R = IsNegative<1> // true
* type R = IsNegative<0> // true
* type R = IsNegative<1n> // true
* type R = IsNegative<-1> // true
* type R = IsNegative<-1n> // true
*
* type R = IsNegative<0> // false
* type R = IsNegative<1> // false
*
* type R = IsNegative<number> // boolean
* type R = IsNegative<bigint> // boolean
* type R = IsNegative<any> // boolean
*
* type R = IsNegative<-1> // false
* ```
*/
*/
export type IsNegative<T, $O extends IsNegative.$Options = {}> = IsBigint<T, {
distributive: $O['distributive'],
$then: $Then,
Expand Down
6 changes: 3 additions & 3 deletions packages/type-plus/src/numeric/is_not_negative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import type { $ResolveBranch } from '../type_plus/branch/$resolve_branch.js'
import type { $Else, $Then } from '../type_plus/branch/$selection.js'

/**
* Is `T` a positive numeric type.
* Is `T` a not a negative numeric type.
*
* ```ts
* type R = IsNotNegative<1> // true
* type R = IsNotNegative<0> // true
* type R = IsNotNegative<1n> // true
*
* type R = IsNotNegative<-1> // false
*
* type R = IsNotNegative<number> // boolean
* type R = IsNotNegative<bigint> // boolean
* type R = IsNotNegative<any> // boolean
*
* type R = IsNotNegative<-1> // false
* ```
*/
export type IsNotNegative<T, $O extends IsNotNegative.$Options = {}> = IsBigint<T, {
Expand Down
11 changes: 6 additions & 5 deletions packages/type-plus/src/numeric/is_not_positive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import type { $ResolveBranch } from '../type_plus/branch/$resolve_branch.js'
import type { $Else, $Then } from '../type_plus/branch/$selection.js'

/**
* Is `T` a positive numeric type.
* Is `T` not a positive numeric type.
*
* ```ts
* type R = IsNotPositive<1> // true
* type R = IsNotPositive<0> // true
* type R = IsNotPositive<1n> // true
* type R = IsNotPositive<-1> // true
* type R = IsNotPositive<-1n> // true
*
* type R = IsNotPositive<0> // false
* type R = IsNotPositive<1> // false
*
* type R = IsNotPositive<number> // boolean
* type R = IsNotPositive<bigint> // boolean
* type R = IsNotPositive<any> // boolean
*
* type R = IsNotPositive<-1> // false
* ```
*/
export type IsNotPositive<T, $O extends IsNotPositive.$Options = {}> = IsBigint<T, {
Expand Down

0 comments on commit b480c6c

Please sign in to comment.