diff options
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r-- | ext/crypto/lib.deno_crypto.d.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts index 7681a56ab..6a3255745 100644 --- a/ext/crypto/lib.deno_crypto.d.ts +++ b/ext/crypto/lib.deno_crypto.d.ts @@ -71,6 +71,10 @@ interface EcKeyGenParams extends Algorithm { namedCurve: NamedCurve; } +interface EcImportParams extends Algorithm { + namedCurve: NamedCurve; +} + interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } @@ -195,14 +199,22 @@ interface SubtleCrypto { importKey( format: "jwk", keyData: JsonWebKey, - algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, + algorithm: + | AlgorithmIdentifier + | HmacImportParams + | RsaHashedImportParams + | EcImportParams, extractable: boolean, keyUsages: KeyUsage[], ): Promise<CryptoKey>; importKey( format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, - algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, + algorithm: + | AlgorithmIdentifier + | HmacImportParams + | RsaHashedImportParams + | EcImportParams, extractable: boolean, keyUsages: KeyUsage[], ): Promise<CryptoKey>; |