mirror of
https://github.com/danbulant/jose
synced 2026-05-24 12:35:36 +00:00
chore: update @types/node
This commit is contained in:
parent
cdce59a340
commit
0fc9793904
3 changed files with 3 additions and 7 deletions
|
|
@ -350,7 +350,7 @@
|
||||||
"test-webcrypto": "WEBCRYPTO=true npm test"
|
"test-webcrypto": "WEBCRYPTO=true npm test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.0.0",
|
"@types/node": "^16.3.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
"@typescript-eslint/eslint-plugin": "^4.28.0",
|
||||||
"ava": "^3.13.0",
|
"ava": "^3.13.0",
|
||||||
"bowser": "^2.11.0",
|
"bowser": "^2.11.0",
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,9 @@ import * as util from 'util'
|
||||||
// eslint-disable-next-line import/no-mutable-exports
|
// eslint-disable-next-line import/no-mutable-exports
|
||||||
let impl: (obj: unknown) => obj is KeyObject
|
let impl: (obj: unknown) => obj is KeyObject
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
if (util.types.isKeyObject) {
|
if (util.types.isKeyObject) {
|
||||||
impl = function isKeyObject(obj): obj is KeyObject {
|
impl = function isKeyObject(obj): obj is KeyObject {
|
||||||
// @ts-expect-error
|
return util.types.isKeyObject(obj)
|
||||||
return <boolean>util.types.isKeyObject(obj)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
impl = function isKeyObject(obj): obj is KeyObject {
|
impl = function isKeyObject(obj): obj is KeyObject {
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,9 @@ export default webcrypto
|
||||||
|
|
||||||
let impl: (obj: unknown) => obj is CryptoKey
|
let impl: (obj: unknown) => obj is CryptoKey
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
if (util.types.isCryptoKey) {
|
if (util.types.isCryptoKey) {
|
||||||
impl = function isCryptoKey(obj): obj is CryptoKey {
|
impl = function isCryptoKey(obj): obj is CryptoKey {
|
||||||
// @ts-expect-error
|
return util.types.isCryptoKey(obj)
|
||||||
return <boolean>util.types.isCryptoKey(obj)
|
|
||||||
}
|
}
|
||||||
} else if (webcrypto) {
|
} else if (webcrypto) {
|
||||||
impl = function isCryptoKey(obj): obj is CryptoKey {
|
impl = function isCryptoKey(obj): obj is CryptoKey {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue