Can Deno list all functions within a script without explicit registration or annotation?
.
For context, here is how you do it for
For context, here is how you do it for globalThis
:
globalThiswindow.window object that you would find in a browser, as Deno does not have a windowing system—it's a runtime for executing JavaScript outside of the browser. However, the globalThis object is the standard way to access the global scope in both the browser and Deno.window object, in Deno, module-scoped functions are not automatically attached to globalThis.this instead of globalThis, maybe?Object.keysdeno docimport * as myModule from './myModule.ts';
Object.keys(myModule)
.filter((key: string) => typeof myModule[key] === 'function')
.forEach((funcName: string) => console.log(funcName));