UNPKG

mapbox-gl

Version:
39 lines (30 loc) 1.34 kB
// This file is generated. Edit build/generate-style-code.js, then run `yarn run codegen`. // @flow /* eslint-disable */ import styleSpec from '../../style-spec/reference/latest'; import { Properties, DataConstantProperty, DataDrivenProperty, CrossFadedDataDrivenProperty, CrossFadedProperty, ColorRampProperty } from '../properties'; import type Color from '../../style-spec/util/color'; import type Formatted from '../../style-spec/expression/types/formatted'; export type PaintProps = {| "background-color": DataConstantProperty<Color>, "background-pattern": CrossFadedProperty<string>, "background-opacity": DataConstantProperty<number>, |}; const paint: Properties<PaintProps> = new Properties({ "background-color": new DataConstantProperty(styleSpec["paint_background"]["background-color"]), "background-pattern": new CrossFadedProperty(styleSpec["paint_background"]["background-pattern"]), "background-opacity": new DataConstantProperty(styleSpec["paint_background"]["background-opacity"]), }); // Note: without adding the explicit type annotation, Flow infers weaker types // for these objects from their use in the constructor to StyleLayer, as // {layout?: Properties<...>, paint: Properties<...>} export default ({ paint }: $Exact<{ paint: Properties<PaintProps> }>);