TileFetchtype
A fetch as the loaders use it: the address and, for a stop, a signal. A function that takes only the address fits too.
Import it
import type { TileFetch } from "@johnmorrisdotca/hoshi-stars/door";
Definition
type TileFetch = (url: string, init?: {
signal?: AbortSignal;
}) => Promise<{
ok: boolean;
status: number;
arrayBuffer(): Promise<ArrayBuffer>;
}>;
Examples
import type { TileFetch } from "@johnmorrisdotca/hoshi-stars/door";
const get: TileFetch = (url) => fetch(url);
console.log(typeof get);functionWhat it prints (run when this page was built)