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

Remove nullable member type from SensorOptions.frequency and fix warning #292

Merged
merged 1 commit into from Oct 10, 2017

Conversation

alexshalamov
Copy link

@alexshalamov alexshalamov commented Sep 28, 2017

This PR fixes warning for one of the algorithms and removes ambiguous nullable dictionary member.

Reason to make SensorOptions.frequency non-nullable:

  • SensorOptions is already optional in constructor
  • Easier to check if SensorOptions.frequency is present, like in construct sensor object.
  • No need to add null to a possible set of frequency values, therefore, complicating algorithms.

Right now, passing { frequency: null } would lead to setting sensor_instance.desiredSamplingFrequency to null.


Preview | Diff

@alexshalamov
Copy link
Author

@rwaldron Do you have any objections for removing nullable specifier?

@alexshalamov
Copy link
Author

Did a quick search and could not find any other API that uses nullable primitive (double) in named dictionary that is used as a input.

@alexshalamov
Copy link
Author

I'm merging this PR. If there would be any comments, I will address them in follow-up PRs. Thanks!

@alexshalamov alexshalamov merged commit f7688f6 into w3c:master Oct 10, 2017
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

3 participants