chore(eslint): fix gon types

This commit is contained in:
Paul Chavard 2022-02-23 13:24:51 +01:00 committed by Pierre de La Morinerie
parent 12ddaa0533
commit 67bfeb261a

View file

@ -2,6 +2,17 @@ import { QueryClient, QueryFunction } from 'react-query';
import { getJSON, isNumeric } from '@utils';
import { matchSorter } from 'match-sorter';
type Gon = {
gon: {
autocomplete?: {
api_geo_url?: string;
api_adresse_url?: string;
api_education_url?: string;
};
};
};
declare const window: Window & typeof globalThis & Gon;
const API_EDUCATION_QUERY_LIMIT = 5;
const API_GEO_QUERY_LIMIT = 5;
const API_ADRESSE_QUERY_LIMIT = 5;
@ -16,7 +27,7 @@ const API_ADRESSE_QUERY_LIMIT = 5;
const API_GEO_COMMUNES_QUERY_LIMIT = 60;
const { api_geo_url, api_adresse_url, api_education_url } =
(window as any).gon.autocomplete || {};
window.gon.autocomplete || {};
type QueryKey = readonly [
scope: string,