Skip to content

Commit adf46b8

Browse files
fix: layer name
1 parent 0d88e44 commit adf46b8

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

packages/amdb/src/types/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export enum FeatureType {
1212
/** Not provided */
1313
// Clearway = 10,
1414
FinalApproachAndTakeoffArea = 11,
15-
TouchDownLiftOfArea = 12,
15+
TouchDownLiftOffArea = 12,
1616
HelipadThreshold = 13,
1717
TaxiwayElement = 14,
1818
TaxiwayShoulder = 15,

packages/amdb/src/types/features/helipads.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export type TouchDownLiftOfArea = AmdbFeature<
5252
*/
5353
surftype: SurfaceType
5454
},
55-
FeatureType.TouchDownLiftOfArea,
55+
FeatureType.TouchDownLiftOffArea,
5656
Polygon
5757
>
5858

packages/amdb/src/types/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export interface AmdbResultStructure {
9191

9292
export type AmdbLayerName = keyof AmdbResultStructure
9393

94+
// Type checks that FeatureType names match AmdbResultStructure so we can have an array of valid layers
95+
export const allLayers: AmdbLayerName[] = Object.keys(FeatureType)
96+
.filter(item => !parseInt(item) && item != "0")
97+
.map(item => item.toLowerCase()) as Lowercase<keyof typeof FeatureType>[]
98+
9499
export type AmdbResult<P extends AmdbLayerName> = Pick<AmdbResultStructure, P>
95100

96101
export enum Projection {

0 commit comments

Comments
 (0)