Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
enhance hoist-non-react-statics types (#2729)
Browse files Browse the repository at this point in the history
* deps: add types/hoist-non-react-statics

* remove custom hoist-non-react-statics typing
  • Loading branch information
HugeSkull authored and rosskevin committed Jan 17, 2019
1 parent bbb2697 commit f554a6e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 24 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"@types/enzyme": "3.1.15",
"@types/enzyme-adapter-react-16": "1.0.3",
"@types/graphql": "14.0.4",
"@types/hoist-non-react-statics": "^3.0.1",
"@types/invariant": "2.2.29",
"@types/jest": "23.3.12",
"@types/object-assign": "4.0.30",
Expand Down
2 changes: 1 addition & 1 deletion src/mutation-hoc.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { DocumentNode } from 'graphql';
const hoistNonReactStatics = require('hoist-non-react-statics');
import hoistNonReactStatics from 'hoist-non-react-statics';

import { parser } from './parser';
import { MutationOpts, OperationOption, OptionProps, MutateProps } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/query-hoc.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { ApolloError } from 'apollo-client';
import { DocumentNode } from 'graphql';
const hoistNonReactStatics = require('hoist-non-react-statics');
import hoistNonReactStatics from 'hoist-non-react-statics';

import { parser } from './parser';
import { OperationOption, QueryOpts, OptionProps, DataProps } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/subscription-hoc.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { DocumentNode } from 'graphql';
const hoistNonReactStatics = require('hoist-non-react-statics');
import hoistNonReactStatics from 'hoist-non-react-statics';

import { parser } from './parser';
import { OperationOption, QueryOpts, OptionProps, DataProps } from './types';
Expand Down
2 changes: 1 addition & 1 deletion src/withApollo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import * as React from 'react';
import { OperationOption } from './types';
import ApolloConsumer from './ApolloConsumer';
import { ApolloClient } from 'apollo-client';
import hoistNonReactStatics from 'hoist-non-react-statics';

const invariant = require('invariant');
const hoistNonReactStatics = require('hoist-non-react-statics');

function getDisplayName<P>(WrappedComponent: React.ComponentType<P>) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
Expand Down
20 changes: 0 additions & 20 deletions typings/hoist-non-react-statics.d.ts

This file was deleted.

0 comments on commit f554a6e

Please sign in to comment.