Skip to content

Commit

Permalink
Merge pull request #8 from stevent-team/fix/outputDigits-type
Browse files Browse the repository at this point in the history
Allow null for outputDigits option in the type
  • Loading branch information
GRA0007 authored Jan 24, 2023
2 parents 93db5b9 + 070a83c commit 4466abf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/grumpy-bobcats-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stevent-team/totp": patch
---

Fix type for outputDigits to allow null
2 changes: 1 addition & 1 deletion lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ interface TotpGenerationOptions {
/** Number of decimal digits in the generated TOTP
* @note defaults to 6
* @note set to `null` for no truncation */
outputDigits?: number
outputDigits?: number | null
}

export type TotpOptions = Partial<TotpGenerationOptions & TotpValidationOptions> & Required<Pick<TotpGenerationOptions, 'secret'>>
Expand Down

0 comments on commit 4466abf

Please sign in to comment.