import type { TSESLint } from "@typescript-eslint/utils"; import type { ArrayElement, UnknownArray } from "type-fest"; type DeprecatedInfo = Exclude["deprecated"], boolean | undefined>; type ReplacedByInfo = ArrayElement>; type RuleDeprecationOptions = Readonly<{ readonly availableUntil?: string; readonly deprecatedSince?: string; readonly message: string; readonly replacedBy?: readonly ReplacedByInfo[]; readonly ruleId: string; }>; type RuleModule = TSESLint.RuleModule>; /** * Create a replacement descriptor for deprecation metadata. */ export declare const createReplacementRuleInfo: (replacement: Readonly<{ readonly plugin?: Readonly<{ readonly name: string; readonly url?: string; }>; readonly rule?: Readonly<{ readonly name: string; readonly url?: string; }>; }>) => ReplacedByInfo; /** * Create standardized deprecation metadata for this plugin. */ export declare const createDeprecatedRuleInfo: ({ availableUntil, deprecatedSince, message, replacedBy, ruleId, }: RuleDeprecationOptions) => DeprecatedInfo; /** * Determine whether structured deprecation metadata points to a replacement * that belongs to this plugin. */ export declare const hasDeprecatedSamePluginReplacement: ({ deprecated, ruleId, }: Readonly<{ readonly deprecated: TSESLint.RuleMetaData["deprecated"]; readonly ruleId: string; }>) => boolean; /** * Apply deprecated+frozen lifecycle metadata to a rule module. */ export declare const withDeprecatedRuleLifecycle: (rule: TRule, options: RuleDeprecationOptions) => TRule; export {}; //# sourceMappingURL=rule-deprecation.d.ts.map