project: Move to ESM Modules

This commit is contained in:
Rajeh Taher
2025-07-17 13:54:17 +03:00
parent 19124426b2
commit 787aed88b8
69 changed files with 5143 additions and 4757 deletions
+5 -2
View File
@@ -1,13 +1,16 @@
import { Contact } from './Contact'
import { Boom } from '@hapi/boom'
import type { Contact } from './Contact'
export type WAConnectionState = 'open' | 'connecting' | 'close'
export type ConnectionState = {
/** connection is now open, connecting or closed */
connection: WAConnectionState
/** the error that caused the connection to close */
lastDisconnect?: {
error: Error | undefined
// TODO: refactor and gain independence from Boom
error: Boom | Error | undefined
date: Date
}
/** is this a new login */