export interface DataWithOffset { offset: number; data: T; } declare type SetParentFunc = (parent: T, index: number) => void; /** * Extract the keys of type `T` matching type `TType` */ declare type KeysOfType = { [Key in keyof T]-?: T[Key] extends TType | undefined ? Key : never; }[keyof T]; /** * Show TypeScript that the fields we're interested in are of type `TType` */ declare type OnlyType = { [Key in KeysOfType]?: TType; }; export declare const offsetForIndex: (index: number, items: DataWithOffset>[], sizeKey: KeysOfType) => number; declare type Allowed = OnlyType>; export declare function updateDisplacedChildren(startIndex: number, items: Array & Allowed>>, parent: TParent, sizeKey: keyof OnlyType, setParentFuncKey: keyof Allowed): void; export {};