Skip to content

Commit

Permalink
improve exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jun 4, 2024
1 parent 75860ec commit 47c8390
Show file tree
Hide file tree
Showing 5 changed files with 877 additions and 4,411 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ If you find errors in the definitions, e.g., function calls that should be allow
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (foxriver76) improve exported types

### 3.1.5 (2024-06-03)
* (foxriver76) provide up-to-date types

Expand Down
21 changes: 4 additions & 17 deletions build/cjs/controllerTools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,13 @@ declare function pattern2RegEx(pattern: string): string;
* @returns path to adapter directory or null if no directory found
*/
declare function getAdapterDir(adapter: string): string | null;
interface Multilingual {
en: string;
de?: string;
ru?: string;
pt?: string;
nl?: string;
fr?: string;
it?: string;
es?: string;
pl?: string;
uk?: string;
"zh-cn"?: string;
}
export interface GetInstalledInfoReponse {
export interface InstalledInfo {
controller?: boolean;
version?: string;
icon?: string;
title?: string;
titleLang?: Multilingual;
desc?: Multilingual;
titleLang?: ioBroker.Translated;
desc?: ioBroker.Translated;
platform?: string;
keywords?: string[];
readme?: string;
Expand All @@ -52,7 +39,7 @@ export interface GetInstalledInfoReponse {
* @param hostJsControllerVersion Version of the running js-controller, will be included in the returned information if provided
* @returns object containing information about installed host
*/
declare function getInstalledInfo(hostJsControllerVersion?: string): GetInstalledInfoReponse;
declare function getInstalledInfo(hostJsControllerVersion?: string): Record<string, InstalledInfo>;
/**
* Checks if we are running inside a docker container
*/
Expand Down
21 changes: 4 additions & 17 deletions build/esm/controllerTools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,13 @@ declare function pattern2RegEx(pattern: string): string;
* @returns path to adapter directory or null if no directory found
*/
declare function getAdapterDir(adapter: string): string | null;
interface Multilingual {
en: string;
de?: string;
ru?: string;
pt?: string;
nl?: string;
fr?: string;
it?: string;
es?: string;
pl?: string;
uk?: string;
"zh-cn"?: string;
}
export interface GetInstalledInfoReponse {
export interface InstalledInfo {
controller?: boolean;
version?: string;
icon?: string;
title?: string;
titleLang?: Multilingual;
desc?: Multilingual;
titleLang?: ioBroker.Translated;
desc?: ioBroker.Translated;
platform?: string;
keywords?: string[];
readme?: string;
Expand All @@ -52,7 +39,7 @@ export interface GetInstalledInfoReponse {
* @param hostJsControllerVersion Version of the running js-controller, will be included in the returned information if provided
* @returns object containing information about installed host
*/
declare function getInstalledInfo(hostJsControllerVersion?: string): GetInstalledInfoReponse;
declare function getInstalledInfo(hostJsControllerVersion?: string): Record<string, InstalledInfo>;
/**
* Checks if we are running inside a docker container
*/
Expand Down
Loading

0 comments on commit 47c8390

Please sign in to comment.