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(types): Registry.getSingleMetric may return undefined #388

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

martin-helmich
Copy link
Contributor

This PR fixes a small error in the TypeScript typings.

The implementation does a simple lookup on an object type:

	getSingleMetric(name) {
		return this._metrics[name];
	}

When supplied with a non-existent name, this will simply return undefined -- which is not reflected in the typings.

Copy link
Collaborator

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@SimenB SimenB changed the title Typings: Registry.getSingleMetric may return "undefined" fix(types): Registry.getSingleMetric may return undefined Aug 10, 2020
@SimenB SimenB merged commit 25f9c40 into siimon:master Aug 10, 2020
@martin-helmich martin-helmich deleted the bugfix/registry-typings branch August 10, 2020 07:31
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.

None yet

2 participants