177177177
1771771772y ago

Deno.inspect, how to log class instances with getters

im trying to log a class instance that has getters in it, with Deno.inspect
Deno.inspect(client, {
colors: true,
getters: true
})
Deno.inspect(client, {
colors: true,
getters: true
})
and it logs [Circular *1], why?
5 Replies
177177177
1771771772y ago
and what does [Circualr *1] goopturtle
Moomoo
Moomoo2y ago
I assume it means you have some circular data structure going on. Have you tried it with a simpler class or object?
177177177
1771771772y ago
yes they work but i cant see the getters in any of them, even with simple classes
Moomoo
Moomoo2y ago
Yeah I don't see the getters either with a simple test case. It might be a bug. Someone opened an issue about it recently: https://github.com/denoland/deno/issues/16408. They closed it, but you could ask them to reopen it, or create a new issue.
177177177
1771771772y ago
oh, bow3