@lillallol/dic
Version:
My own dependency injection container.
23 lines (22 loc) • 663 B
TypeScript
/**
* @description
* The `array1` is iterated and each element is checked if it does exist in `array2`.
* If no common element is found, it returns `null`.
* If a common element is found, it is returned, together with its index for each array.
*/
export declare function getFirstOverlappingElementData<T>(_: {
array1: T[];
array2: T[];
}): {
/**
* @description
* This is the index of the first overlapping element for the first array.
*/
index1: number;
/**
* @description
* This is the index of the first overlapping element for the second array.
*/
index2: number;
overlappingElement: T;
} | null;