Skip to content

Commit

Permalink
fix: es type
Browse files Browse the repository at this point in the history
  • Loading branch information
elrrrrrrr committed Nov 23, 2024
1 parent 51c5b53 commit 6ea10b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/repository/SearchRepository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SingletonProto, AccessLevel, Inject } from '@eggjs/tegg';
import { SearchAdapter } from '../common/typing';
import { AuthorType, CnpmcorePatchInfo, PackageManifestType } from './PackageRepository';
import { estypes } from '@elastic/elasticsearch';

export type SearchJSONPickKey = '_rev' | 'name' | 'description' | 'keywords' | 'license' | 'maintainers' | 'dist-tags' | '_source_registry_name';

Expand Down Expand Up @@ -35,7 +36,7 @@ export class SearchRepository {


async searchPackage(query) {
return await this.searchAdapter.search<SearchManifestType>(query);
return await this.searchAdapter.search<SearchManifestType>(query) as estypes.SearchHitsMetadata<SearchManifestType>;
}

async upsertPackage(document: SearchManifestType) {
Expand Down

0 comments on commit 6ea10b5

Please sign in to comment.