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: serviceUnavailable -> serverUnavailable. #238

Merged
merged 1 commit into from Sep 20, 2019

Conversation

@mastermatt
Copy link
Contributor

mastermatt commented Sep 19, 2019

Fixes #237

This fixes the types, but it's a little concerning that the tests didn't catch this. It seems they don't actually run the code?

@jarrodyellets
@hueniverse

error TS2551: Property 'serverUnavailable' does not exist on type 'typeof Boom'. Did you mean 'serviceUnavailable'?

Fixes #237
@hueniverse hueniverse self-assigned this Sep 20, 2019
@hueniverse hueniverse added this to the 7.4.6 milestone Sep 20, 2019
@hueniverse hueniverse merged commit fb5b8f0 into hapijs:master Sep 20, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hueniverse

This comment has been minimized.

Copy link
Member

hueniverse commented Sep 20, 2019

Thanks!

The tests are based on tsd which doesn't run the TS tests. I guess I should change this.

@mastermatt mastermatt deleted the mastermatt:serverUnavailable branch Sep 20, 2019
@mastermatt

This comment has been minimized.

Copy link
Contributor Author

mastermatt commented Sep 20, 2019

@hueniverse I've come across several other bugs with the types since 7.4.6 was published. Such as Boom instances not having a data attr or isBoom no longer being a type guard.
Were these changes on purpose?
These seem to be documented features and were not bugs in DefinitelyTyped.

data - additional error information (assigned to error.data).

I'm just curious why the DT types and tests weren't relied upon more.
Should I open more PRs for the issues I've found?

@hueniverse

This comment has been minimized.

Copy link
Member

hueniverse commented Sep 20, 2019

Reusing DT types is more work than starting from scratch. I can't get 100% coverage tested because I don't use TS myself. If you find bugs, just open issues or PRs. Should not take more than a few hours to get things patched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.