Skip to content

Commit

Permalink
chore: add example for type ExitsInformation
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondMofeng committed Feb 3, 2024
1 parent def6503 commit e84e2ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,7 @@ type BodyPartDefinition<T extends BodyPartConstant = BodyPartConstant> = T exten
*
* If the body part is boosted, this property specifies the mineral type which is used for boosting.
*/
boost?: keyof typeof BOOSTS[T];
boost?: keyof (typeof BOOSTS)[T];
/**
* One of the body part types constants.
*/
Expand Down Expand Up @@ -1790,6 +1790,15 @@ type StoreDefinitionUnlimited = Store<ResourceConstant, true>;
// energy: number;
// }

/**
* @example
* {
* "1": "W8N4", // TOP
* "3": "W7N3", // RIGHT
* // "5": "W8N2", // BOTTOM
* "7": "W9N3" // LEFT
* }
*/
type ExitsInformation = Partial<Record<ExitKey, string>>;

interface AllLookAtTypes {
Expand Down
11 changes: 10 additions & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type BodyPartDefinition<T extends BodyPartConstant = BodyPartConstant> = T exten
*
* If the body part is boosted, this property specifies the mineral type which is used for boosting.
*/
boost?: keyof typeof BOOSTS[T];
boost?: keyof (typeof BOOSTS)[T];
/**
* One of the body part types constants.
*/
Expand Down Expand Up @@ -191,6 +191,15 @@ type StoreDefinitionUnlimited = Store<ResourceConstant, true>;
// energy: number;
// }

/**
* @example
* {
* "1": "W8N4", // TOP
* "3": "W7N3", // RIGHT
* // "5": "W8N2", // BOTTOM
* "7": "W9N3" // LEFT
* }
*/
type ExitsInformation = Partial<Record<ExitKey, string>>;

interface AllLookAtTypes {
Expand Down

0 comments on commit e84e2ca

Please sign in to comment.