Skip to content

Commit b7e3c64

Browse files
authored
fix(javascript): expose sub algoliasearch client's type (#873)
1 parent 0d988f9 commit b7e3c64

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

templates/javascript/clients/algoliasearch/builds/imports.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ export * from './models';
1616

1717
export const apiClientVersion = searchClientVersion;
1818

19+
/**
20+
* The client type.
21+
*/
1922
export type Algoliasearch = ReturnType<typeof algoliasearch>;
2023

templates/javascript/clients/algoliasearch/builds/models.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ export * from '{{{npmNamespace}}}/client-personalization/model';
1717
export * from '{{{npmNamespace}}}/client-analytics/model';
1818
export * from '{{{npmNamespace}}}/client-abtesting/model';
1919

20+
export { SearchClient } from '{{{npmNamespace}}}/client-search';
21+
export { PersonalizationClient } from '{{{npmNamespace}}}/client-personalization';
22+
export { AnalyticsClient } from '{{{npmNamespace}}}/client-analytics';
23+
export { AbtestingClient } from '{{{npmNamespace}}}/client-abtesting';
24+
2025
export { ErrorBase, PutProps, PostProps, DelProps, GetProps };
2126

2227
export type CommonClientOptions = { requester?: Requester; hosts?: Host[] };

templates/javascript/clients/api-single.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ export function create{{capitalizedApiName}}({
130130
};
131131
}
132132

133+
/**
134+
* The client type.
135+
*/
133136
export type {{capitalizedApiName}} = ReturnType<typeof create{{capitalizedApiName}}>;
134137

135138
{{/operations}}

0 commit comments

Comments
 (0)