Microsoft/TypeScript

Incorrect type declaration for CryptoKeyPair

Open

#46.036 aberto em 23 de set. de 2021

Ver no GitHub
 (5 comments) (1 reaction) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: lib.d.tsHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

Description

Bug Report

🔎 Search Terms

WebCrypto, CryptoKeyPair

🕗 Version & Regression Information

  • This changed between versions 4.3 and 4.4

Description

Here is W3C spec for CryptoKeyPair dictionary.

In TS v4.4.3 type declaration for CryptoKeyPair is:

interface CryptoKeyPair {
    privateKey?: CryptoKey;
    publicKey?: CryptoKey;
}

In TS v.4.3.5:

interface CryptoKeyPair {
    privateKey: CryptoKey;
    publicKey: CryptoKey;
}

Guia do colaborador