Microsoft/TypeScript

Incorrect type declaration for CryptoKeyPair

Open

#46 036 ouverte le 23 sept. 2021

Voir sur GitHub
 (5 commentaires) (1 réaction) (0 assignés)TypeScript (6 726 forks)batch import
BugDomain: lib.d.tsHelp Wanted

Métriques du dépôt

Stars
 (48 455 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (9 PRs mergées en 30 j)

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;
}

Guide contributeur