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

Adding ServiceManager typescript definitions; and fixing typos and potential bugs. #229

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

pomgui
Copy link
Contributor

@pomgui pomgui commented Sep 10, 2020

This PR contains the following changes:

index.js

Line(s) Description
1381,1575 params parameter is optional, but if it wasn't sent then custom parameter value was being lost.
1798 added name limbotrans for the property that was being populated by _processQuery
2180-2184 Simplifying expressions: (x != null ? x : null) <==> x
2218-2220 The if expressions weren't considering undefined nor other types (strings, objects, Dates, etc.), better using ===.
2270 Adding constants to be used as parameters of Shutdown (specially useful in typescript)
2365,2386 options is not defined, so these lines would throw an exception. Using null they will get their default values).
2586,2588,2601 infos.length will never be defined as infos is meant to be an object with the required properties, so better using another validation for empty object.
2702 removing optread as it was never used
2780 Removing callback parameter as pool wasn't using it at all. The example in the README.md wasn't sending it as well.
3610 Removing unreacheable code. The line 3593 already took care of it.
4320 Removing redundant if. No matter if it's true or false, the same code will be executed

index.d.ts

Line(s) Description
7 Fixed typo
21-25 Changing return type as intended in the js code.
26-27 Added methods to Database as intended in the js code.
48,58 Added new attach to return a ServiceManager instance
59 Fixed typo
62 Removed callback parameter from pool.
63-240 Added ServiceManager definitions

@mariuz mariuz merged commit 0471321 into hgourvest:master Sep 10, 2020
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