Skip to content

Commit

Permalink
docs: update TS docstrings for positive/negative int/float validators (
Browse files Browse the repository at this point in the history
  • Loading branch information
Maistho authored May 9, 2024
1 parent 4aa0d9e commit 7836ef1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions env-var.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type PublicAccessors = {
asFloat: (input: string) => number;

/**
* Performs the same task as asFloat(), but also verifies that the number is positive (greater than zero).
* Performs the same task as asFloat(), but also verifies that the number is positive (greater than or equal to zero).
*/
asFloatPositive: (input: string) => number;

/**
* Performs the same task as asFloat(), but also verifies that the number is negative (less than zero).
* Performs the same task as asFloat(), but also verifies that the number is negative (less than or equal to zero).
*/
asFloatNegative: (input: string) => number;

Expand All @@ -32,12 +32,12 @@ type PublicAccessors = {
asInt: (input: string) => number;

/**
* Performs the same task as asInt(), but also verifies that the number is positive (greater than zero).
* Performs the same task as asInt(), but also verifies that the number is positive (greater than or equal to zero).
*/
asIntPositive: (input: string) => number;

/**
* Performs the same task as asInt(), but also verifies that the number is negative (less than zero).
* Performs the same task as asInt(), but also verifies that the number is negative (less than or equal to zero).
*/
asIntNegative: (input: string) => number;

Expand Down Expand Up @@ -121,12 +121,12 @@ interface VariableAccessors <AlternateType = unknown> {
asFloat: () => AlternateType extends undefined ? undefined|number : number;

/**
* Performs the same task as asFloat(), but also verifies that the number is positive (greater than zero).
* Performs the same task as asFloat(), but also verifies that the number is positive (greater than or equal to zero).
*/
asFloatPositive: () => AlternateType extends undefined ? undefined|number : number;

/**
* Performs the same task as asFloat(), but also verifies that the number is negative (less than zero).
* Performs the same task as asFloat(), but also verifies that the number is negative (less than or equal to zero).
*/
asFloatNegative: () => AlternateType extends undefined ? undefined|number : number;

Expand All @@ -137,12 +137,12 @@ interface VariableAccessors <AlternateType = unknown> {
asInt: () => AlternateType extends undefined ? undefined|number : number;

/**
* Performs the same task as asInt(), but also verifies that the number is positive (greater than zero).
* Performs the same task as asInt(), but also verifies that the number is positive (greater than or equal to zero).
*/
asIntPositive: () => AlternateType extends undefined ? undefined|number : number;

/**
* Performs the same task as asInt(), but also verifies that the number is negative (less than zero).
* Performs the same task as asInt(), but also verifies that the number is negative (less than or equal to zero).
*/
asIntNegative: () => AlternateType extends undefined ? undefined|number : number;

Expand Down

0 comments on commit 7836ef1

Please sign in to comment.