mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
createInstantSearch and createIndex should accept props
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ import * as React from 'react';
|
||||
export function createInstantSearch(
|
||||
defaultAlgoliaClient: (appId: string, apiKey: string, options: { _useRequestCache: boolean }) => object,
|
||||
root: object
|
||||
): React.ComponentClass;
|
||||
): React.ComponentClass<any>;
|
||||
|
||||
/**
|
||||
* Creates a specialized root Index component. It accepts
|
||||
@@ -26,7 +26,7 @@ export function createInstantSearch(
|
||||
* @param defaultRoot - the defininition of the root of an Index sub tree.
|
||||
* @return a Index root
|
||||
*/
|
||||
export function createIndex(defaultRoot: object): any;
|
||||
export function createIndex(defaultRoot: object): React.ComponentClass<any>;
|
||||
|
||||
export interface ConnectorDescription {
|
||||
displayName: string;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
() => {
|
||||
const InstantSearch = createInstantSearch(() => ({}), {Root: 'div', props: {className: `widget`}});
|
||||
|
||||
<InstantSearch>
|
||||
<InstantSearch appId={'test'} apiKey={'test'}>
|
||||
<div></div>
|
||||
</InstantSearch>;
|
||||
};
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
() => {
|
||||
const Index = createIndex({Root: 'div', props: {className: `widget`}});
|
||||
|
||||
<Index>
|
||||
<Index indexName={'test'} root={{Root: 'div', props: {className: `widget`}}}>
|
||||
<div></div>
|
||||
</Index>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user