general: tree-shaking pre-MD and old comet versions (#5675)

Co-authored-by: BenyFilho <168232825+BenyFilho@users.noreply.github.com>
Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
This commit is contained in:
Rajeh Taher 2026-02-11 01:24:54 +02:00 • committed by GitHub
commit 9b1eb76b2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 70 additions and 469 deletions

27
index.d.ts vendored
View file

@ -323,10 +323,6 @@ declare namespace WAWebJS {
/** Emitted when authentication is successful */
on(event: 'authenticated', listener: (
/**
* Object containing session information, when using LegacySessionAuth. Can be used to restore the session
*/
session?: ClientSession
) => void): this
/**
@ -567,7 +563,7 @@ declare namespace WAWebJS {
evalOnNewDoc?: Function,
/** Puppeteer launch options. View docs here: https://github.com/puppeteer/puppeteer/ */
puppeteer?: puppeteer.PuppeteerNodeLaunchOptions & puppeteer.ConnectOptions
/** Determines how to save and restore sessions. Will use LegacySessionAuth if options.session is set. Otherwise, NoAuth will be used. */
/** Determines how to save and restore sessions. Otherwise, NoAuth will be used. */
authStrategy?: AuthStrategy,
/** The version of WhatsApp Web to use. Use options.webVersionCache to configure how the version is retrieved. */
webVersion?: string,
@ -575,15 +571,7 @@ declare namespace WAWebJS {
webVersionCache?: WebCacheOptions,
/** How many times should the qrcode be refreshed before giving up
* @default 0 (disabled) */
qrMaxRetries?: number,
/**
* @deprecated This option should be set directly on the LegacySessionAuth
*/
restartOnAuthFail?: boolean
/**
* @deprecated Only here for backwards-compatibility. You should move to using LocalAuth, or set the authStrategy to LegacySessionAuth explicitly.
*/
session?: ClientSession
qrMaxRetries?: number
/** If another whatsapp web session is detected (another browser), take over the session in the current browser
* @default false */
takeoverOnConflict?: boolean,
@ -700,17 +688,6 @@ declare namespace WAWebJS {
extract: (options: { session: string, path: string }) => Promise<any> | any,
}
/**
* Legacy session auth strategy
* Not compatible with multi-device accounts.
*/
export class LegacySessionAuth extends AuthStrategy {
constructor(options?: {
session?: ClientSession,
restartOnAuthFail?: boolean,
})
}
/**
* Represents a WhatsApp client session
*/