From 1e67a7aa78d5e79ce226356c352bb63b9cb5210d Mon Sep 17 00:00:00 2001 From: rafaelsouzaf Date: Tue, 19 Dec 2017 09:54:29 -0300 Subject: [PATCH] Using "keyof" to set the algorithm value types. Thanks @SimonSchick, I understand now. --- types/iron/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/iron/index.d.ts b/types/iron/index.d.ts index 1ee9ebbb9c..14ccfcbc2f 100644 --- a/types/iron/index.d.ts +++ b/types/iron/index.d.ts @@ -15,7 +15,7 @@ export interface SealOptionsSub { /** * the algorithm used ('aes-256-cbc' for encryption and 'sha256' for integrity are the only two supported at this time). */ - algorithm: string; + algorithm: keyof Algorithms; /** * the number of iterations used to derive a key from the password. Set to 1 by default. The number of ideal iterations * to use is dependent on your application's performance requirements. More iterations means it takes longer to generate the key.