/** * Options for the require-no-side-effects rule. */ export interface UtilRequireNoSideEffectsRuleOptions { /** * When true, also flag functions whose names match the factory naming patterns * in addition to JSDoc-tag detection. */ readonly checkNamePatterns?: boolean; /** * Additional name pattern source strings (compiled to RegExp) when `checkNamePatterns` is true. */ readonly additionalNamePatterns?: readonly string[]; } type AstNode = any; /** * ESLint rule definition for require-no-side-effects. */ export interface UtilRequireNoSideEffectsRuleDefinition { readonly meta: { readonly type: 'suggestion'; readonly fixable: 'code'; readonly docs: { readonly description: string; readonly recommended: boolean; }; readonly messages: { readonly missingNoSideEffectsJsdoc: string; readonly missingJsdocForFactory: string; readonly missingImplAnnotationOverloaded: string; }; readonly schema: readonly object[]; }; create(context: { options: UtilRequireNoSideEffectsRuleOptions[]; report: (descriptor: { node: AstNode; messageId: string; data?: Record; fix?: (fixer: AstNode) => AstNode | AstNode[]; }) => void; sourceCode: AstNode; }): Record void>; } /** * ESLint rule requiring the side-effect-free annotation on every factory function — that is, * declarations carrying the `@dbxUtilKind factory` JSDoc tag (and optionally functions matching * factory name patterns). The rule guarantees the marker reaches the bundled JavaScript so * esbuild/rollup can drop unused calls during tree-shaking. * * Behavior: * * - **Single-signature functions:** the JSDoc above the declaration is preserved during emit, so * the rule simply requires `@__NO_SIDE_EFFECTS__` inside that JSDoc. * * - **Overloaded functions:** TypeScript erases overload signatures during emit, so a JSDoc tag * placed only on the first overload is dropped from the bundled JS. The rule additionally requires * either (a) a `// @__NO_SIDE_EFFECTS__` line comment immediately above the implementation, or * (b) a JSDoc with the tag attached directly to the implementation. Auto-fix inserts the line * comment alongside the JSDoc tag so consumer-facing docs and the bundler annotation stay in sync. * * Auto-fix also removes any redundant standalone-comment annotations between the JSDoc and the * declaration (other than the required impl-leading line comment on overloaded functions), and * when no JSDoc is present, creates a minimal one carrying both tags. */ export declare const UTIL_REQUIRE_NO_SIDE_EFFECTS_RULE: UtilRequireNoSideEffectsRuleDefinition; export {};