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

fix: give stats initial values #915

Merged
merged 2 commits into from
Apr 16, 2021
Merged

Conversation

achingbrain
Copy link
Member

Otherwise the compiler cannot derive the type and thinks stats.snapshot returns {}

Otherwise the compiler cannot derive the type and thinks `stats.snapshot` returns `{}`
@achingbrain
Copy link
Member Author

The resulting types:

    /**
     * Returns a clone of the current stats.
     */
    get snapshot(): {
        dataReceived: Big;
        dataSent: Big;
    };
    /**
     * Returns a clone of the internal movingAverages
     */
    get movingAverages(): {
        dataReceived: MovingAverage[];
        dataSent: MovingAverage[];
    };

@vasco-santos vasco-santos merged commit 3d0a79e into master Apr 16, 2021
@vasco-santos vasco-santos deleted the fix/give-stats-initial-values branch April 16, 2021 15:10
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