Skip to content

Commit fc9d30f

Browse files
committed
chore: add chart categories to Chart type
1 parent 21dd28f commit fc9d30f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/happy-cups-fry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@navigraph/charts": patch
3+
---
4+
5+
Added `ChartCategory` type for improved type-safety when dealing with chart objects.

packages/charts/src/public-types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ export interface BoundingBoxes {
2626
insets: Inset[];
2727
}
2828

29+
export type ChartCategory = "APT" | "REF" | "ARR" | "DEP" | "APP";
30+
2931
export type Chart = {
3032
image_day: string;
3133
image_night: string;
3234
thumb_day: string;
3335
thumb_night: string;
3436
icao_airport_identifier: string;
3537
id: string;
36-
category: string;
38+
category: ChartCategory;
3739
precision_approach: boolean | null;
3840
index_number: string;
3941
name: string;

0 commit comments

Comments
 (0)