Type safety improvements [#287] (#335)

* Work through linter issues related to non-null checks and any.
This commit is contained in:
Brandon Liu
2024-01-29 22:46:08 +08:00
committed by GitHub
parent 9a29c5a78a
commit d7e24d046e
2 changed files with 33 additions and 23 deletions

View File

@@ -77,7 +77,7 @@ export const leafletRasterLayer = (source: PMTiles, options: any) => {
// copied from MapLibre /util/ajax.ts
type RequestParameters = {
url: string;
headers?: any;
headers?: unknown;
method?: "GET" | "POST" | "PUT";
body?: string;
type?: "string" | "json" | "arrayBuffer" | "image";
@@ -87,7 +87,7 @@ type RequestParameters = {
type ResponseCallback = (
error?: Error | null,
data?: any | null,
data?: unknown | null,
cacheControl?: string | null,
expires?: string | null
) => void;