The Node.js SDK re-exports the WAJS namespace for TypeScript. This reference describes types from WA-JS 4.8.5-rc.0. For operations available on a connected Node.js client, see Whatsapp. For functions running inside WhatsApp Web, see the WA-JS browser API.
The module the caller needs
Make sure a module that ships in a lazily bootloaded bundle is registered.
WhatsApp Web >= 2.3000 splits its module graph into resource bundles the Bootloader fetches on demand, so a module whose bundle the session never needed is absent from the registry and
searchId()can never find it — the binding staysundefinedfor the whole life of the page no matter how often it is retried. Call this before using such a binding: it asks WhatsApp to fetch the bundle exactly like the UI would, which registers the module and lets the existing lazy getters resolve.Best-effort by design. Returns whether
moduleIdis registered when it finishes;falseon the legacy webpack loader (where nothing is lazy) and for modules absent from LAZY_MODULES. A component that loaded is never fetched again; one that failed is retried on the next call.