WebCrypto interfaces need to be cleaned up
Opening this to track this work but the fixes should live in the internal Cloudflare runtime code (either as code changes or overrides). The various operations are too generic. For example, we should export a AesGcmParams that has a fixed name of AES-GCM whereas currently we have a catch-all SubtleCryptoEncryptAlgorithm that is the union of all possible values. Same for things like SubtleCryptoImportKeyAlgorithm, SubtleCryptoHashAlgorithm which don't technically exist. As a nicety, we should hard-code the set of legal values for params that only have a valid set.
cc @harrishancock for visibility.
Hey! 👋 We'll get this fixed in the next major version of workers-types using the new type generation system. 👍