1 | import React from 'react';
|
2 | import algoliasearch from 'algoliasearch';
|
3 | export interface IPackage {
|
4 | objectID: string;
|
5 | name: string;
|
6 | version: string;
|
7 | description: string;
|
8 | repository?: IPackageRepository;
|
9 | owner: IPackageOwner;
|
10 | humanDownloadsLast30Days: string;
|
11 | }
|
12 | export interface IPackageRepository {
|
13 | url: string;
|
14 | }
|
15 | export interface IPackageOwner {
|
16 | name: string;
|
17 | email?: string;
|
18 | avatar: string;
|
19 | link: string;
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare const search: (query: string, page?: number) => Promise<algoliasearch.Response<IPackage>>;
|
30 | export declare type WithSearchContext<X> = X & {
|
31 | hits: IPackage[];
|
32 | };
|
33 | export declare const SearchContext: React.Context<IPackage[]>;
|