Skip to content

Commit

Permalink
[osgi] getService: Fix wrong param type in JSDoc
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Sep 16, 2024
1 parent 7d38dbd commit 9c87bb7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/osgi.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ function _lookupService (classOrName) {
}

/**
* Gets a service registered with OSGi. Allows providing multiple classes/names to try for lookup.
* Gets a service registered with OSGi.
* Allows providing multiple classes/names to try for lookup.
*
* @memberof osgi
* @param {Array<String|JavaClass>} classOrNames the class of the service to get
* @param {...(string|JavaClass)} classOrNames the class of the service to get
*
* @returns {*|null} an instance of the service, or `null` if it cannot be found
* @throws {Error} if no services of the requested type(s) can be found
Expand Down
7 changes: 4 additions & 3 deletions types/osgi.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/**
* Gets a service registered with OSGi. Allows providing multiple classes/names to try for lookup.
* Gets a service registered with OSGi.
* Allows providing multiple classes/names to try for lookup.
*
* @memberof osgi
* @param {Array<String|JavaClass>} classOrNames the class of the service to get
* @param {...(string|JavaClass)} classOrNames the class of the service to get
*
* @returns {*|null} an instance of the service, or `null` if it cannot be found
* @throws {Error} if no services of the requested type(s) can be found
*/
export function getService(...classOrNames: Array<string | JavaClass>): any | null;
export function getService(...classOrNames: (string | JavaClass)[]): any | null;
/**
* Finds services registered with OSGi.
*
Expand Down
2 changes: 1 addition & 1 deletion types/osgi.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c87bb7

Please sign in to comment.