Skip to content

Commit

Permalink
fix: integer, decimal and number parameters are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Mar 20, 2020
1 parent 2527712 commit 69f3983
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/v3/matchers.ts
Expand Up @@ -147,7 +147,7 @@ export function boolean(b: boolean) {
* Value must be an integer (must be a number and have no decimal places)
* @param int Example value. If omitted a random value will be generated.
*/
export function integer(int: number) {
export function integer(int?: number) {
if (int) {
return {
"pact:matcher:type": "integer",
Expand All @@ -166,7 +166,7 @@ export function integer(int: number) {
* Value must be a decimal number (must be a number and have decimal places)
* @param num Example value. If omitted a random value will be generated.
*/
export function decimal(num: number) {
export function decimal(num?: number) {
if (num) {
return {
"pact:matcher:type": "decimal",
Expand All @@ -185,7 +185,7 @@ export function decimal(num: number) {
* Value must be a number
* @param num Example value. If omitted a random integer value will be generated.
*/
export function number(num: number) {
export function number(num?: number) {
if (num) {
return {
"pact:matcher:type": "number",
Expand Down

0 comments on commit 69f3983

Please sign in to comment.