Skip to content

Commit 0dffba5

Browse files
authored
Remove utility-types dependency (#299)
1 parent ddadd3e commit 0dffba5

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,6 @@ License: [MIT](https://github.com/facebook/react/blob/master/LICENSE)
537537
Copyright © Facebook, Inc. and its affiliates.
538538
License: [MIT](https://github.com/facebook/react/blob/master/LICENSE)
539539

540-
[**utility-types**](https://github.com/piotrwitek/utility-types)
541-
Copyright &copy; 2016 Piotr Witek <[email protected]>
542-
License: [MIT](https://github.com/piotrwitek/utility-types/blob/master/LICENSE)
543-
544540
[**node-uuid**](https://github.com/kelektiv/node-uuid)
545541
Copyright &copy; 2010-2016 Robert Kieffer and other contributors
546542
License: [MIT](https://github.com/kelektiv/node-uuid/blob/master/LICENSE.md)

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@
4242
},
4343
"dependencies": {
4444
"@optimizely/optimizely-sdk": "^5.3.4",
45-
"hoist-non-react-statics": "^3.3.2",
46-
"utility-types": "^2.1.0 || ^3.0.0"
45+
"hoist-non-react-statics": "^3.3.2"
4746
},
4847
"peerDependencies": {
4948
"react": ">=16.8.0"

src/withOptimizely.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616
import * as React from 'react';
17-
import { Subtract } from 'utility-types';
1817

1918
import { OptimizelyContextConsumer, OptimizelyContextInterface } from './Context';
2019
import { ReactSDKClient } from './client';
@@ -26,7 +25,7 @@ export interface WithOptimizelyProps {
2625
isServerSide: boolean;
2726
}
2827

29-
export type WithoutOptimizelyProps<P extends WithOptimizelyProps> = Subtract<P, WithOptimizelyProps>;
28+
export type WithoutOptimizelyProps<P extends WithOptimizelyProps> = Omit<P, keyof WithOptimizelyProps>;
3029

3130
export function withOptimizely<P extends WithOptimizelyProps, R>(
3231
Component: React.ComponentType<P>

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -4800,11 +4800,6 @@ url-parse@^1.5.3:
48004800
querystringify "^2.1.1"
48014801
requires-port "^1.0.0"
48024802

4803-
"utility-types@^2.1.0 || ^3.0.0":
4804-
version "3.11.0"
4805-
resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.11.0.tgz#607c40edb4f258915e901ea7995607fdf319424c"
4806-
integrity sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==
4807-
48084803
uuid@^9.0.1:
48094804
version "9.0.1"
48104805
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"

0 commit comments

Comments
 (0)