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 routes to Typescript #3177

Merged
merged 3 commits into from
Dec 1, 2021
Merged

Convert routes to Typescript #3177

merged 3 commits into from
Dec 1, 2021

Conversation

askvortsov1
Copy link
Sponsor Member

Converts routes.js files to Typescript, resolves issues with app.route.X not found.

constructor() {
super();

routes(this);

this.route = Object.assign(Application.prototype.route.bind(this), makeRouteHelpers(this));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to use this.constructor.route instead? That way we don't make it specific to Application in case for some reason some extension wants to modify it. Even if not for that, just to make sure we're referencing the current subclass just in case.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That exact syntax didn't work, but I changed it to use prototypes

@askvortsov1 askvortsov1 merged commit 29c290e into master Dec 1, 2021
@askvortsov1 askvortsov1 deleted the as/app_route_typing branch December 1, 2021 16:27
@SychO9 SychO9 added this to the 1.2 milestone Dec 1, 2021
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.

4 participants