Skip to content

chore: generate events docs #897

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

Merged
merged 1 commit into from
Sep 15, 2021
Merged

chore: generate events docs #897

merged 1 commit into from
Sep 15, 2021

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Sep 12, 2021

Closes #786

@mxschmitt
Copy link
Member

mxschmitt commented Sep 14, 2021

nice work!

Screen.Recording.2021-09-14.at.12.45.43.mov

@mxschmitt
Copy link
Member

Can we have a fallback to the value which we had before? Otherwise we might break existing users which had the event name as a string. e.g. at the end of the on overloads in the Page.


    @typing.overload
    def on(
        self,
        event: str,
        f: typing.Callable[..., typing.Union[typing.Awaitable[None], None]],
    ) -> None:
        return super().on(event=event, f=f)

@kumaraditya303
Copy link
Contributor Author

Can we have a fallback to the value which we had before? Otherwise we might break existing users which had the event name as a string. e.g. at the end of the on overloads in the Page.


    @typing.overload
    def on(
        self,
        event: str,
        f: typing.Callable[..., typing.Union[typing.Awaitable[None], None]],
    ) -> None:
        return super().on(event=event, f=f)

This is non-breaking change moreover it is typing only change hence there is no runtime change

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.

[FEATURE] Generate Event based overloads for event listeners
2 participants