UNPKG

maplibre-gl

Version:

BSD licensed community fork of mapbox-gl, a WebGL interactive maps library

16 lines (15 loc) 305 B
/** * A callback definition. * * @example * ```ts * asyncFunction((error, result) => { * if (error) { * // handle error * } else if (result) { * // handle success * } * }); * ``` */ export type Callback<T> = (error?: Error | null, result?: T | null) => void;