Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert AppRoutes to TS & Type Lessons' props better #169

Closed
wants to merge 2 commits into from

Conversation

na2hiro
Copy link
Contributor

@na2hiro na2hiro commented May 10, 2024

During #168 I noticed there are some code that are untyped but could be typed relatively easily: AppRoutes and Lessons' props where most of props were captured with {[name: string]: any}.

I started with most conservative unknown, which cannot be used without type guards, and repeatedly fixed where TS complains. I didn't eagerly type everything, so if some field requires any today, such fields are kept unknown.

src/AppRoutes.tsx Show resolved Hide resolved
src/pages/lessons/Lessons.tsx Show resolved Hide resolved
src/pages/lessons/Lessons.tsx Show resolved Hide resolved
src/components/TypedText.tsx Show resolved Hide resolved
@na2hiro
Copy link
Contributor Author

na2hiro commented Jun 16, 2024

Will be handled together with #171

@na2hiro na2hiro closed this Jun 16, 2024
@na2hiro na2hiro deleted the type-approutes branch June 16, 2024 07:16
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.

1 participant