Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Apr 5, 2023
1 parent 2d57bef commit 7852a0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const todosClient = new TodosClient();
const contentTypeRegistry = new ContentTypeRegistry();
contentTypeRegistry.register({ id: 'todos', version: { latest: 1 } });

const contentClient = new ContentClient((contentType: string) => {
const contentClient = new ContentClient((contentType?: string) => {
switch (contentType) {
case 'todos':
return todosClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class ContentClient {
);
}

mSearch<T = unknown>(input: MSearchIn): Promise<MSearchResult> {
mSearch<T = unknown>(input: MSearchIn): Promise<MSearchResult<T>> {
const crudClient = this.crudClientProvider();
if (!crudClient.mSearch) {
throw new Error('mSearch is not supported by provided crud client');
Expand All @@ -153,6 +153,6 @@ export class ContentClient {
contentTypes: input.contentTypes.map((contentType) =>
addVersion(contentType, this.contentTypeRegistry)
),
}) as Promise<MSearchResult>;
}) as Promise<MSearchResult<T>>;
}
}

0 comments on commit 7852a0e

Please sign in to comment.