Skip to content

otplib API Documentation / @otplib/core / PluginConfig

Type Alias: PluginConfig<T>

PluginConfig<T> = T extends object ? Pick<T, "crypto" | "base32"> : never

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

Extract the plugin configuration from an options type

Type Parameters

T

T

Example

ts
type Plugins = PluginConfig<TOTPOptions>;
// { crypto: CryptoPlugin; base32?: Base32Plugin }

Released under the MIT License.