Describe the bug
The typescript definitions for import and export AES key specify it should be one of 'pkcs8' | 'spki' | 'raw'
However, it looks like pkcs8 and spki are not valid and it should be 'raw' or 'jwk'
To Reproduce
const x = exportKey( myKey, 'pkcs8'); < doesn't work, throwing wrong type of key error
const x = exportKey( myKey, 'jwk'); < works great
More info
Line 125 of web-crypto.d.ts (& line 117)
declare const exportKey: (key: CryptoKey, type?: 'pkcs8' | 'spki' | 'raw') => Promise;
Describe the bug
The typescript definitions for import and export AES key specify it should be one of 'pkcs8' | 'spki' | 'raw'
However, it looks like pkcs8 and spki are not valid and it should be 'raw' or 'jwk'
To Reproduce
const x = exportKey( myKey, 'pkcs8'); < doesn't work, throwing wrong type of key error
const x = exportKey( myKey, 'jwk'); < works great
More info
Line 125 of web-crypto.d.ts (& line 117)
declare const exportKey: (key: CryptoKey, type?: 'pkcs8' | 'spki' | 'raw') => Promise;