-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
Rewrite application files to TS #3006
Conversation
There's a Either |
Let's enforce this with a union type! Yay for type safety! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just convert Application to TS? That could be one of the most valuable things to type.
I planned for this to just be an intermediary step, but screw it. TYPESCRIPT, HERE WE COME! 🚀 |
4a4242e
to
382e340
Compare
Object
typings with Record<string, unknown>
} | ||
); | ||
|
||
export interface RouteResolver< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we use Mithril's RouteResolver
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more specific to our use case, in terms of typing attributes and the fact that Flarum uses its Component class for basically every component.
Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
1676a87
to
cef66f1
Compare
Rebased onto master to fix the conflicts |
Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
LET'S GET TYPESCRIPTIN' |
Changes proposed in this pull request:
Reviewers should focus on:
Any more specific/accurate types we could use?
Confirmed