import { type AstNode } from './util'; /** * ESLint rule definition shape used by `no-redundant-on-destroy`. */ export interface DbxWebNoRedundantOnDestroyRuleDefinition { readonly meta: { readonly type: 'suggestion'; readonly fixable: 'code'; readonly docs: { readonly description: string; readonly recommended: boolean; }; readonly messages: { readonly redundantCleanupCall: string; readonly redundantNgOnDestroy: string; readonly emptyNgOnDestroy: string; readonly orphanedImplementsOnDestroy: string; }; readonly schema: readonly object[]; }; create(context: AstNode): Record void>; } /** * ESLint rule that flags `ngOnDestroy()` bodies whose statements are entirely * redundant `this..destroy()` / `this..complete()` calls on * fields whose initializer is wrapped with `cleanSubscription`, * `completeOnDestroy`, or `clean`. * * Auto-fix: * - Removes each redundant statement, plus its leading whitespace and trailing newline. * - Removes the `ngOnDestroy` method declaration when its body becomes empty. * - When the `ngOnDestroy` method is removed entirely, also removes the * `implements OnDestroy` clause from the class (verified against the * `@angular/core` import). The now-unused `OnDestroy` import is left for * `eslint-plugin-unused-imports` to clean up. * - When a class declares `implements OnDestroy` from `@angular/core` but has * no `ngOnDestroy()` method (e.g. left over from a previous run), the * orphaned implements clause is removed. */ export declare const DBX_WEB_NO_REDUNDANT_ON_DESTROY_RULE: DbxWebNoRedundantOnDestroyRuleDefinition;