diff options
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/polyfills/internal/crypto/keys.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/node/polyfills/internal/crypto/keys.ts b/ext/node/polyfills/internal/crypto/keys.ts index 8cb9ab690..ca22e12c6 100644 --- a/ext/node/polyfills/internal/crypto/keys.ts +++ b/ext/node/polyfills/internal/crypto/keys.ts @@ -4,6 +4,13 @@ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials +import { primordials } from "ext:core/mod.js"; + +const { + ObjectDefineProperties, + SymbolToStringTag, +} = primordials; + import { op_node_create_private_key, op_node_create_public_key, @@ -209,6 +216,14 @@ export class KeyObject { } } +ObjectDefineProperties(KeyObject.prototype, { + [SymbolToStringTag]: { + __proto__: null, + configurable: true, + value: "KeyObject", + }, +}); + export interface JsonWebKeyInput { key: JsonWebKey; format: "jwk"; |