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

Commit f554a6e

Browse files
HugeSkullrosskevin
authored andcommitted
enhance hoist-non-react-statics types (#2729)
* deps: add types/hoist-non-react-statics * remove custom hoist-non-react-statics typing
1 parent bbb2697 commit f554a6e

File tree

7 files changed

+14
-24
lines changed

7 files changed

+14
-24
lines changed

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
"@types/enzyme": "3.1.15",
100100
"@types/enzyme-adapter-react-16": "1.0.3",
101101
"@types/graphql": "14.0.4",
102+
"@types/hoist-non-react-statics": "^3.0.1",
102103
"@types/invariant": "2.2.29",
103104
"@types/jest": "23.3.12",
104105
"@types/object-assign": "4.0.30",

src/mutation-hoc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { DocumentNode } from 'graphql';
3-
const hoistNonReactStatics = require('hoist-non-react-statics');
3+
import hoistNonReactStatics from 'hoist-non-react-statics';
44

55
import { parser } from './parser';
66
import { MutationOpts, OperationOption, OptionProps, MutateProps } from './types';

src/query-hoc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { ApolloError } from 'apollo-client';
33
import { DocumentNode } from 'graphql';
4-
const hoistNonReactStatics = require('hoist-non-react-statics');
4+
import hoistNonReactStatics from 'hoist-non-react-statics';
55

66
import { parser } from './parser';
77
import { OperationOption, QueryOpts, OptionProps, DataProps } from './types';

src/subscription-hoc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import { DocumentNode } from 'graphql';
3-
const hoistNonReactStatics = require('hoist-non-react-statics');
3+
import hoistNonReactStatics from 'hoist-non-react-statics';
44

55
import { parser } from './parser';
66
import { OperationOption, QueryOpts, OptionProps, DataProps } from './types';

src/withApollo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import * as React from 'react';
22
import { OperationOption } from './types';
33
import ApolloConsumer from './ApolloConsumer';
44
import { ApolloClient } from 'apollo-client';
5+
import hoistNonReactStatics from 'hoist-non-react-statics';
56

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

99
function getDisplayName<P>(WrappedComponent: React.ComponentType<P>) {
1010
return WrappedComponent.displayName || WrappedComponent.name || 'Component';

typings/hoist-non-react-statics.d.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)