mapbox / mapbox-gl-language

Switch language of your Mapbox GL JS style
https://mapbox.github.io/mapbox-gl-language/
BSD 3-Clause "New" or "Revised" License
194 stars 51 forks source link

There is no TS version of the life file #56

Open gdlk888 opened 2 years ago

gdlk888 commented 2 years ago

There is no TS version of the life file

solfKwolf commented 2 years ago

you can add file as follow:


declare module "@mapbox/mapbox-gl-language" {
  import { IControl, Map } from "mapbox-gl";

  export default class MapboxLanguage implements IControl {
    constructor(options?: {
      defaultLanguage: string;
      supportedLanguages?: string[];
    });
    onAdd(map:Map): HTMLElement;
    onRemove(map:Map): void;
    getDefaultPosition?: (() => string) | undefined;
  }
}