Skip to content

Introduce mapped type DirectionVectors#6

Closed
Async10 wants to merge 1 commit intotsoding:mainfrom
Async10:main
Closed

Introduce mapped type DirectionVectors#6
Async10 wants to merge 1 commit intotsoding:mainfrom
Async10:main

Conversation

@Async10
Copy link

@Async10 Async10 commented Jul 19, 2024

This change makes DIRECTION_VECTORS a table of type DirectionVectors. This ensures a compilation error if the defintion of Direction changes without DIRECTION_VECTORS being adapted.

This change makes DIRECTION_VECTORS a table of type DirectionVectors. This ensures a compilation error if the defintion of Direction changes without DIRECTION_VECTORS being adapted.
@rexim
Copy link
Member

rexim commented Jul 20, 2024

Honestly, I don't like the fact that this mapped type thingie is actually an object and it stringifies the indices. Since Direction is now a number, I'd like the DirectionVectors to be an array indexable by numbers.

@Async10
Copy link
Author

Async10 commented Jul 20, 2024

Fair point. I am closing the PR.

@Async10 Async10 closed this Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants