Microsoft/TypeScript

Incorrect type declaration for CryptoKeyPair

Open

#46,036 opened on 2021幎9月23日

GitHub で芋る
 (5 comments) (1 reaction) (0 assignees)TypeScript (6,726 forks)batch import
BugDomain: lib.d.tsHelp Wanted

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (平均マヌゞ 6d 17h) (30d で 9 merged PRs)

説明

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

コントリビュヌタヌガむド