import type { CallExpression, MemberExpression } from 'estree-jsx'; /** * Checks if a CallExpression is calling a specific global identifier. * * This is useful for rules that need to detect global function calls like fetch(), alert(), etc. * * For example: * fetch('https://api.example.com') would return true when checking for 'fetch' * myObj.fetch() would return false when checking for 'fetch' */ export declare const isGlobalIdentifierCall: (node: CallExpression, identifierName: string) => boolean; /** * Checks if a CallExpression or MemberExpression is accessing a property on window, globalThis, or self. * * This is useful for rules that need to detect browser global access patterns. * * Handles both: * - Dot notation: window.fetch, globalThis.fetch, or self.fetch * - Bracket notation: window['fetch'], globalThis['fetch'], or self['fetch'] * * For example: * window.fetch('url') would return true when checking for 'fetch' * globalThis.fetch('url') would return true when checking for 'fetch' * self.fetch('url') would return true when checking for 'fetch' * window['fetch']('url') would return true when checking for 'fetch' * document.fetch('url') would return false when checking for 'fetch' */ export declare const isWindowSelfOrGlobalThisPropertyAccess: (node: CallExpression | MemberExpression, propertyName: string) => boolean; /** * Extracts the property name from a MemberExpression node. * * Handles both: * - Dot notation: object.propertyName (Identifier) * - Bracket notation: object['propertyName'] (Literal) * * For example: * - window.fetch → returns 'fetch' * - window['fetch'] → returns 'fetch' * - object.method → returns 'method' * - object[123] → returns '' (non-string literal) */ export declare const getMemberExpressionPropertyName: (memberExpression: MemberExpression) => string | undefined;