Replies: 1 comment
-
FYI I've fixed this as part of the latest release! You can now import GarbageCollectionCardTypes which is namepsaced so you can easily access |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Shannon,
I have started to experiment with your wonderful repo. Have a question about the types of the components though, let's use the garbage collection card as an example, since that's the card I started fiddling with.
When I generate my schedule, I would like it to be type safe of course. I see that the GarbageCollectionCardProps are exported, but none of the other types are made available for importing.
Thus, I need to utilize type aliases to be able to assert the correct return types on my methods:
type Schedule = Extract<GarbageCollectionCardProps['schedules'][number], any>;
And then to get the WeekConfig, I'd have to create yet another alias:
type WeekConfig = Extract<Schedule['weeks'][number], any>;
This might become a bit cumbersome in the long run and IMHO it could benefit the users of your dashboard if the types were being exported to the end user.
Or maybe there's already something in place, it might just be that I have not found it yet.
Would be great to hear your thoughts on the matter!
Beta Was this translation helpful? Give feedback.
All reactions