Skip to content

Commit

Permalink
Update ExpressionSpecification type in flow definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Nov 8, 2017
1 parent df1b00b commit 3b7187a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions build/generate-flow-typed-style-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,19 @@ declare type CompositeFunctionSpecification<T> =
| {| type: 'interval', stops: Array<[{zoom: number, value: number}, T]>, property: string, default?: T |}
| {| type: 'categorical', stops: Array<[{zoom: number, value: string | number | boolean}, T]>, property: string, default?: T |};
declare type ExpressionFunctionSpecification = {|
expression: mixed
|}
declare type ExpressionSpecification = Array<mixed>;
declare type PropertyValueSpecification<T> =
| T
| CameraFunctionSpecification<T>
| ExpressionFunctionSpecification;
| ExpressionSpecification;
declare type DataDrivenPropertyValueSpecification<T> =
| T
| CameraFunctionSpecification<T>
| SourceFunctionSpecification<T>
| CompositeFunctionSpecification<T>
| ExpressionFunctionSpecification;
| ExpressionSpecification;
${flowObjectDeclaration('StyleSpecification', spec.$root)}
Expand Down
8 changes: 3 additions & 5 deletions flow-typed/style-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,19 @@ declare type CompositeFunctionSpecification<T> =
| {| type: 'interval', stops: Array<[{zoom: number, value: number}, T]>, property: string, default?: T |}
| {| type: 'categorical', stops: Array<[{zoom: number, value: string | number | boolean}, T]>, property: string, default?: T |};

declare type ExpressionFunctionSpecification = {|
expression: mixed
|}
declare type ExpressionSpecification = Array<mixed>;

declare type PropertyValueSpecification<T> =
| T
| CameraFunctionSpecification<T>
| ExpressionFunctionSpecification;
| ExpressionSpecification;

declare type DataDrivenPropertyValueSpecification<T> =
| T
| CameraFunctionSpecification<T>
| SourceFunctionSpecification<T>
| CompositeFunctionSpecification<T>
| ExpressionFunctionSpecification;
| ExpressionSpecification;

declare type StyleSpecification = {|
"version": 8,
Expand Down

0 comments on commit 3b7187a

Please sign in to comment.