import { AST_NODE_TYPES, type TSESTree } from '@typescript-eslint/utils'; import * as ts from 'typescript'; /** * Builds a predicate that returns `true` if every constituent of the given type * is an array or tuple type. Unions must be array-like in all branches for a * defensive `Array.from()` to be safely removable; `any` / `unknown` are * treated conservatively as not array-like because they could be a `Set` / * `Map` / iterable that genuinely relies on `Array.from()` to be materialized * into an array. */ export declare const createIsArrayOrTupleType: (checker: ts.TypeChecker) => ((type: ts.Type) => boolean); /** * Wraps the source text of an expression in parentheses when it cannot be used * directly as the object of a member expression. */ export declare const toMemberObjectText: (argText: string, argNodeType: AST_NODE_TYPES) => string; /** * Matches a call expression of the shape `Array.from()` (exactly one * non-spread argument) and returns the argument, or `undefined` when the node * has a different shape. `Array.from(x, mapFn)` maps each element, so it is not * a plain defensive copy and is not matched. */ export declare const matchArrayFromCall: (node: TSESTree.Expression) => TSESTree.Expression | undefined; //# sourceMappingURL=array-type-utils.d.mts.map