@@ -16,7 +16,7 @@ interface Coords {
1616 locationY : number ;
1717}
1818
19- function findIndex ( { locationX, locationY} : Coords , map : LayoutsMap ) : number {
19+ const findIndex = ( { locationX, locationY} : Coords , map : LayoutsMap ) : number => {
2020 for ( const index in map ) {
2121 const layout = map [ index ] ;
2222 if (
@@ -29,7 +29,7 @@ function findIndex({locationX, locationY}: Coords, map: LayoutsMap): number {
2929 }
3030 }
3131 return - 1 ;
32- }
32+ } ;
3333
3434export interface Params {
3535 setValue ( text : string ) : void ;
@@ -47,9 +47,7 @@ export const useClearByFocusCellCommon = (params: Params) => {
4747 paramsRef . current = params ;
4848 } , [ params ] ) ;
4949
50- const clearCodeByCoords = useCallback ( function clearCodeByCoords (
51- coords : Coords ,
52- ) : void {
50+ const clearCodeByCoords = useCallback ( ( coords : Coords ) : void => {
5351 const index = findIndex ( coords , cellsLayouts . current ) ;
5452 if ( index !== - 1 ) {
5553 const { value, setValue} = paramsRef . current ;
@@ -58,13 +56,9 @@ export const useClearByFocusCellCommon = (params: Params) => {
5856 }
5957 } , [ ] ) ;
6058
61- const getCellOnLayoutHandler = useCallback ( function getCellOnLayoutHandler (
62- index : number ,
63- ) {
59+ const getCellOnLayoutHandler = useCallback ( ( index : number ) => {
6460 if ( ! callbackRef . current [ index ] ) {
65- callbackRef . current [ index ] = function onCellLayout (
66- event : LayoutChangeEvent ,
67- ) {
61+ callbackRef . current [ index ] = ( event : LayoutChangeEvent ) : void => {
6862 const { width, height, x, y} = event . nativeEvent . layout ;
6963 cellsLayouts . current [ `${ index } ` ] = {
7064 x,
0 commit comments