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

Metrics should be defined or null #2446

Merged
merged 2 commits into from May 1, 2021
Merged

Metrics should be defined or null #2446

merged 2 commits into from May 1, 2021

Conversation

dapplion
Copy link
Contributor

Motivation

Typing the metrics module as IMetrics | undefined is dangerous because you can forget to add and Typescript won't alert us.

Description

Type it as IMetrics | null so types ensure we pass metrics to all functions that need it.

@github-actions github-actions bot added Api scope-networking All issues related to networking, gossip, and libp2p. labels Apr 29, 2021
@codeclimate
Copy link

codeclimate bot commented Apr 29, 2021

Code Climate has analyzed commit 1dba4fb and detected 0 issues on this pull request.

View more on Code Climate.

@dapplion dapplion merged commit 04a7391 into master May 1, 2021
@dapplion dapplion deleted the dapplion/metrics-null branch May 1, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants