TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

feat: completely factorize SubtleCrypto.generateKey()

Open hkleungai opened this issue 8 months ago • 1 comments

Opening this PR in favor of this comment from @Renegade334 in my another PR in DT repo.

Since https://nodejs.org/api/webcrypto.html#cryptokeyusages lists the usages in its own table, and it is closely aligned to the MDN reference in https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey, I believe it is possible to raise such change to @types/web as well.

Potentially we can do this to other methods in the key-usages table, but let's see how reviewers think about this change, then we may perform the refactoring incrementally in subsequent PRs.

Fallback signature is also updated, in favor of matching richer shape of possible Algorithm object.

hkleungai avatar Jun 23 '25 17:06 hkleungai

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

github-actions[bot] avatar Jun 23 '25 17:06 github-actions[bot]