Skip to content

otplib API Documentation / @otplib/core / WithRequiredPlugins

Type Alias: WithRequiredPlugins<T>

WithRequiredPlugins<T> = T & object

Defined in: packages/core/src/utility-types.ts:111

Ensure an options type has plugins defined

Type Declaration

base32

base32: Base32Plugin

crypto

crypto: CryptoPlugin

Type Parameters

T

T extends object

Example

ts
type ConfiguredOptions = WithRequiredPlugins<TOTPOptions>;
// TOTPOptions with crypto and base32 required

Released under the MIT License.