chore(eslint): fix gon types
This commit is contained in:
parent
12ddaa0533
commit
67bfeb261a
1 changed files with 12 additions and 1 deletions
|
@ -2,6 +2,17 @@ import { QueryClient, QueryFunction } from 'react-query';
|
||||||
import { getJSON, isNumeric } from '@utils';
|
import { getJSON, isNumeric } from '@utils';
|
||||||
import { matchSorter } from 'match-sorter';
|
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_EDUCATION_QUERY_LIMIT = 5;
|
||||||
const API_GEO_QUERY_LIMIT = 5;
|
const API_GEO_QUERY_LIMIT = 5;
|
||||||
const API_ADRESSE_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_COMMUNES_QUERY_LIMIT = 60;
|
||||||
|
|
||||||
const { api_geo_url, api_adresse_url, api_education_url } =
|
const { api_geo_url, api_adresse_url, api_education_url } =
|
||||||
(window as any).gon.autocomplete || {};
|
window.gon.autocomplete || {};
|
||||||
|
|
||||||
type QueryKey = readonly [
|
type QueryKey = readonly [
|
||||||
scope: string,
|
scope: string,
|
||||||
|
|
Loading…
Reference in a new issue