From b0b15a7a322f8f32a56a99e0eca4d41a6d3ce80f Mon Sep 17 00:00:00 2001 From: Garrett Dawson Date: Mon, 1 Oct 2018 22:12:58 -0600 Subject: [PATCH] react-map-gl - Make mapboxApiAccessToken prop optional (#29241) * Make mapboxApiAccessToken optional * Revise transformRequest --- types/react-map-gl/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-map-gl/index.d.ts b/types/react-map-gl/index.d.ts index 2260644d32..1f459fdb96 100644 --- a/types/react-map-gl/index.d.ts +++ b/types/react-map-gl/index.d.ts @@ -23,20 +23,20 @@ export interface MapError { export interface MapRequest { url: string; - headers: {}; - credentials: string; + headers?: { [index: string]: string }; + credentials?: string; } export interface MapboxProps extends Partial { container?: {}; - mapboxApiAccessToken: string; + mapboxApiAccessToken?: string; attributionControl?: boolean; preserveDrawingBuffer?: boolean; onLoad?: () => void; onError?: (e: MapError) => void; resuseMaps?: boolean; resuseMap?: boolean; - transformRequest?: () => MapRequest; + transformRequest?: (url?: string, resourceType?: string) => MapRequest; mapStyle?: string | {};