Skip to content

StyleImageInterface definition differs from the documented interface #9350

@DiogoAndre

Description

@DiogoAndre

mapbox-gl-js version: Master

The StyleImageInterface defined on style/style_image.js is different from the version documented on the same file. The return type for the render() function is implemented as void but documented as boolean, which looks like the correct return type.

export type StyleImageInterface = {
    width: number,
    height: number,
    data: Uint8Array | Uint8ClampedArray,
    render?: () => void,
    onAdd?: (map: Map, id: string) => void,
    onRemove?: () => void
};
 * @function
 * @memberof StyleImageInterface
 * @instance
 * @name render
 * @return {boolean} `true` if this method updated the image. `false` if the image was not changed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions