Re-type a node:crypto KeyObject as node-opcua-crypto's KeyObject (which PublicKey
aliases). Both describe the very same runtime object; only their declarations diverged.
node-opcua-crypto declares its own structural KeyObject carrying three fixed export()
overloads (pem -> string | Buffer, der -> Buffer, jwk -> JsonWebKey). @types/node 26
collapsed node's overloads into a single generic signature returning a conditional type,
export<T extends KeyExportOptions = {}>(options?: T): KeyExportResult<T, NonSharedBuffer>,
which for an uninstantiated T resolves to string | JsonWebKey | NonSharedBuffer and so is
assignable to none of the three. The two declarations are now mutually unassignable, which
is a fact about the .d.ts files rather than about the value.
Drop this once node-opcua-crypto re-exports crypto.KeyObject instead of redeclaring it.
Re-type a
node:cryptoKeyObject as node-opcua-crypto'sKeyObject(whichPublicKeyaliases). Both describe the very same runtime object; only their declarations diverged.node-opcua-crypto declares its own structural
KeyObjectcarrying three fixedexport()overloads (pem-> string | Buffer,der-> Buffer,jwk-> JsonWebKey). @types/node 26 collapsed node's overloads into a single generic signature returning a conditional type,export<T extends KeyExportOptions = {}>(options?: T): KeyExportResult<T, NonSharedBuffer>, which for an uninstantiated T resolves tostring | JsonWebKey | NonSharedBufferand so is assignable to none of the three. The two declarations are now mutually unassignable, which is a fact about the .d.ts files rather than about the value.Drop this once node-opcua-crypto re-exports
crypto.KeyObjectinstead of redeclaring it.