mirror of
https://github.com/danbulant/jose
synced 2026-05-24 20:41:46 +00:00
style: use <> type casting syntax in embedded.ts
This commit is contained in:
parent
f362f6fde1
commit
3ebe3756fe
1 changed files with 2 additions and 3 deletions
|
|
@ -52,9 +52,8 @@ export default async function EmbeddedJWK(
|
|||
throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')
|
||||
}
|
||||
|
||||
const key = (await parseJwk(joseHeader.jwk!, joseHeader.alg!, true)) as
|
||||
| CryptoKey
|
||||
| KeyObject
|
||||
// eslint-disable-next-line @typescript-eslint/keyword-spacing
|
||||
const key = <CryptoKey | KeyObject>await parseJwk(joseHeader.jwk!, joseHeader.alg!, true)
|
||||
|
||||
if (key.type !== 'public') {
|
||||
throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a public key')
|
||||
|
|
|
|||
Loading…
Reference in a new issue