Skip to content

Commit

Permalink
[fix] Stronger AnimationConfig types (#2356)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <[email protected]>
Co-authored-by: Dragan Okanovic <[email protected]>
  • Loading branch information
igorDykhta and abstractalgo authored Oct 5, 2023
1 parent a2fd52c commit 5a9fa5b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/types/reducers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export type SplitMapLayers = {[key: string]: boolean};
export type SplitMap = {
layers: SplitMapLayers;
};

/** See "Locale aware formats" at https://momentjs.com/docs/#/parsing/string-format/ */
export type AnimationConfigTimeFormat = 'L' | 'L LT' | 'L LTS';

export type AnimationConfig = {
domain: number[] | null;
currentTime: number | null;
Expand All @@ -205,9 +209,9 @@ export type AnimationConfig = {
isAnimating?: boolean;
timeSteps?: null | number[];
// auto generated based on time domain
defaultTimeFormat?: string | null;
defaultTimeFormat: AnimationTimeFormat | null;
// custom ui input
timeFormat?: string | null;
timeFormat?: AnimationTimeFormat | null;
// custom ui input
timezone?: string | null;
// hide or show control
Expand Down

0 comments on commit 5a9fa5b

Please sign in to comment.