Skip to content

Commit

Permalink
fix(types): remove type enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Apr 9, 2019
1 parent 46235c6 commit 591b3de
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions src/connectors/query-rules/connectQueryRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {
WidgetFactory,
Helper,
SearchParameters,
SearchResults,
InstantSearch,
} from '../../types';
import {
checkRendering,
Expand Down Expand Up @@ -190,15 +188,7 @@ const connectQueryRules: QueryRulesConnector = (render, unmount = noop) => {
let onHelperChange: (state: SearchParameters) => void;

return {
init({
helper,
state,
instantSearchInstance,
}: {
helper: Helper;
state: SearchParameters;
instantSearchInstance: InstantSearch;
}) {
init({ helper, state, instantSearchInstance }) {
initialRuleContexts = state.ruleContexts || [];
onHelperChange = applyRuleContexts.bind({
helper,
Expand Down Expand Up @@ -234,13 +224,7 @@ const connectQueryRules: QueryRulesConnector = (render, unmount = noop) => {
);
},

render({
results,
instantSearchInstance,
}: {
results: SearchResults;
instantSearchInstance: InstantSearch;
}) {
render({ results, instantSearchInstance }) {
const { userData = [] } = results;
const items = transformItems(userData);

Expand All @@ -254,7 +238,7 @@ const connectQueryRules: QueryRulesConnector = (render, unmount = noop) => {
);
},

dispose({ helper, state }: { helper: Helper; state: SearchParameters }) {
dispose({ helper, state }) {
unmount();

if (hasTrackedFilters) {
Expand Down

0 comments on commit 591b3de

Please sign in to comment.