-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathindex.d.ts
32 lines (24 loc) · 874 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { PureComponent } from "react";
import type MapboxLanguageControl from "@mapbox/mapbox-gl-language/index";
type Props = {
/** List of supported languages */
supportedLanguages?: string[];
/** Custom style transformation to apply */
languageTransform?: Function;
/**
* RegExp to match if a text-field is a language field
* (optional, default /^\{name/)
*/
languageField?: RegExp;
/** Given a language choose the field in the vector tiles */
getLanguageField?: Function;
/** Name of the source that contains the different languages. */
languageSource?: string;
/** Name of the default language to initialize style after loading. */
defaultLanguage?: string;
/** Name of the language to set */
language?: string;
};
export default class LanguageControl extends PureComponent<Props> {
getControl(): MapboxLanguageControl;
}