From c806fbdabe144c865612bbbc9ef596c9611c8310 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Sun, 19 Nov 2023 17:13:38 +0900 Subject: fix(ext,runtime): add missing custom inspections (#21219) --- ext/cache/01_cache.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ext/cache') diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index e64178d89..d3514a3f2 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -8,6 +8,7 @@ const { StringPrototypeSplit, StringPrototypeTrim, Symbol, + SymbolFor, TypeError, } = primordials; import { @@ -59,6 +60,10 @@ class CacheStorage { cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); return await op_cache_storage_delete(cacheName); } + + [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { + return `${this.constructor.name} ${inspect({}, inspectOptions)}`; + } } const _matchAll = Symbol("[[matchAll]]"); @@ -275,6 +280,10 @@ class Cache { return responses; } + + [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) { + return `${this.constructor.name} ${inspect({}, inspectOptions)}`; + } } webidl.configureInterface(CacheStorage); -- cgit v1.2.3