-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Geo I] Typing functionality (#5179)
Co-authored-by: Tony <tonyvanswet@gmail.com>
- Loading branch information
1 parent
030e919
commit 5073fff
Showing
14 changed files
with
185 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ coverage | |
.nyc_output | ||
cypress/videos | ||
cypress/screenshots | ||
config | ||
config | ||
|
||
tsconfig.node.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
import { FeatureCollection, Feature, MultiPolygon, Polygon } from '@turf/turf'; | ||
import { config } from './generateWorld'; | ||
|
||
export type GeoConfig = typeof config; | ||
|
||
export interface ZoneConfig { | ||
[key: string]: { | ||
subZoneNames?: string[]; | ||
bounding_box: number[]; | ||
}; | ||
subZoneNames?: string[]; | ||
bounding_box: number[][]; | ||
timezone: string; | ||
[key: string]: any; | ||
} | ||
|
||
export interface ZonesConfig { | ||
[key: string]: ZoneConfig; | ||
} | ||
|
||
export interface ExchangeConfig { | ||
capacity?: [number, number]; | ||
lonlat: [number, number]; | ||
rotation: number; | ||
[key: string]: any; | ||
// The following properties are removed from the generated exchange config | ||
// comment?: string; | ||
// _comment?: string; | ||
// parsers?: { | ||
// exchange?: string; | ||
// exchangeForecast?: string; | ||
// }; | ||
} | ||
|
||
export interface ExchangesConfig { | ||
[key: string]: ExchangeConfig; | ||
} | ||
|
||
export declare type FeatureProperties = { | ||
zoneName: string; | ||
countryKey: string; | ||
countryName: string; | ||
isAggregatedView?: boolean; | ||
isHighestGranularity?: boolean; | ||
isCombined?: boolean; | ||
}; | ||
|
||
export interface WorldFeatureCollection extends FeatureCollection { | ||
features: Feature<MultiPolygon | Polygon, FeatureProperties>[]; | ||
} |
Oops, something went wrong.