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

Typescript conversion #621

Merged
merged 174 commits into from
Nov 28, 2023
Merged

Typescript conversion #621

merged 174 commits into from
Nov 28, 2023

Conversation

craigbeck
Copy link
Contributor

No description provided.

src/App.ts Outdated
@@ -37,11 +37,11 @@ interface AppOptions {
scriptHash?: string,
}

type OnRouteCallback = (arg0: Page, arg1: Page, model: Model, params: any, done?: () => void) => void;
type OnRouteCallback<T = object> = (arg0: Page, arg1: Page, model: ChildModel<T>, params: PageParams, done?: () => void) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest using just Model here, as the routes receive page.model, which is a root model - instance of the base class Model in racer.

Most other places should be ok with just Model too since Derby doesn't really use the internal underscore-prefixed ChildModel fields.

@craigbeck craigbeck merged commit 603f5e6 into master Nov 28, 2023
3 checks passed
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