# My full code: # Define a custom Nim object to wrap the console type CustomConsole = distinct JsObject # Create a global instance of the custom console var console {.importjs: "console", nodecl.}: CustomConsole # Define custom methods or properties for your console proc log(c: CustomeConsole, message: string) {.importjs: "console.log(#)".}