import type { RootEntityType } from '../implementation/root-entity-type.js'; import { QuickFix } from '../validation/quick-fix.js'; export interface AddIndexQuickFixOptions { /** * Whether the index should leave out objects where one of the fields is null * * Defaults to false. A sparse index can't be used for sorting unless there also is a filter * that excludes null values, so only use this if the index is just needed for filtering. */ readonly sparse?: boolean; } /** * Creates a quick fix that adds a (non-unique) index on the given fields of a root entity type * * If the index is on a single direct field of the root entity type, @index is added to that field. * Otherwise (paths into value objects, entity extensions or child entities, or multiple fields), * the index is added to the "indices" argument of @rootEntity. * * Returns undefined if the paths are not valid index paths, if an equivalent index already exists, * or if the type has not been declared in a source the quick fix could change. * * @param rootEntityType the type to add the index to * @param fieldPaths a dot-separated field path (e.g. "address.country"), or a list of them for a * multi-field index */ export declare function createAddIndexQuickFix(rootEntityType: RootEntityType, fieldPaths: string | ReadonlyArray, { sparse }?: AddIndexQuickFixOptions): QuickFix | undefined;