From fd634ee2cf7ed9e56050514176ff0fba6f5de8d2 Mon Sep 17 00:00:00 2001 From: Devin Fee Date: Thu, 13 Jun 2019 14:50:44 -0700 Subject: [PATCH] removed Omit / ReturnType as those are provided by TS 3+ --- src/base/helpers/factory.ts | 1 - src/components/dropdown/dropdown.tsx | 1 - src/components/modal/__docs__/simple-modal-manager.tsx | 5 ++--- src/components/modal/modal.tsx | 1 - .../__tests__/navbar-item-container-as-dropdown.test.tsx | 1 - src/components/navbar/navbar-item.tsx | 1 - src/components/navbar/navbar.tsx | 1 - .../page-loader/__docs__/simple-page-loader-manager.tsx | 1 - src/types.ts | 3 --- 9 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/base/helpers/factory.ts b/src/base/helpers/factory.ts index 810431f5..5f7979aa 100644 --- a/src/base/helpers/factory.ts +++ b/src/base/helpers/factory.ts @@ -1,6 +1,5 @@ import PropTypes from "prop-types"; -import { Omit, ReturnType } from "../../types"; import { DEFAULTS, VariablesDefinitions } from "./variables"; export const makePropTypesFactory: MakePropTypesFactoryFunction = makePropTypes => variables => diff --git a/src/components/dropdown/dropdown.tsx b/src/components/dropdown/dropdown.tsx index 060b2d48..92a3206e 100644 --- a/src/components/dropdown/dropdown.tsx +++ b/src/components/dropdown/dropdown.tsx @@ -2,7 +2,6 @@ import PropTypes from "prop-types"; import React from "react"; import { forwardRefAs } from "../../base"; -import { Omit } from "../../types"; import { DropdownContainer, DropdownContainerProps, diff --git a/src/components/modal/__docs__/simple-modal-manager.tsx b/src/components/modal/__docs__/simple-modal-manager.tsx index b25026b2..a44a9570 100644 --- a/src/components/modal/__docs__/simple-modal-manager.tsx +++ b/src/components/modal/__docs__/simple-modal-manager.tsx @@ -1,7 +1,6 @@ import React from "react"; import { Button } from "src/elements/button"; -import { Omit } from "src/types"; import { Modal, ModalProps } from "../modal"; interface SimpleModalManagerProps { @@ -40,8 +39,8 @@ export class SimpleModalManager extends React.Component< private readonly close = () => { this.setState({ active: false }); - } + }; private readonly open = () => { this.setState({ active: true }); - } + }; } diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 010e454f..ad96f003 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -2,7 +2,6 @@ import PropTypes from "prop-types"; import React from "react"; import { forwardRefAs } from "../../base"; -import { Omit } from "../../types"; import { ModalBackground } from "./modal-background"; import { ModalCard } from "./modal-card"; import { ModalClose } from "./modal-close"; diff --git a/src/components/navbar/__tests__/navbar-item-container-as-dropdown.test.tsx b/src/components/navbar/__tests__/navbar-item-container-as-dropdown.test.tsx index c86875e2..5c6bd041 100644 --- a/src/components/navbar/__tests__/navbar-item-container-as-dropdown.test.tsx +++ b/src/components/navbar/__tests__/navbar-item-container-as-dropdown.test.tsx @@ -14,7 +14,6 @@ import { NavbarItemContext, NavbarItemContextValue, } from "src/components/navbar/navbar-item-context"; -import { Omit } from "src/types"; import { testForwardRefAsExoticComponentIntegration, diff --git a/src/components/navbar/navbar-item.tsx b/src/components/navbar/navbar-item.tsx index a0cb650e..21ea1d16 100644 --- a/src/components/navbar/navbar-item.tsx +++ b/src/components/navbar/navbar-item.tsx @@ -2,7 +2,6 @@ import PropTypes from "prop-types"; import React from "react"; import { forwardRefAs } from "../../base"; -import { Omit } from "../../types"; import { NavbarItemContainer, NavbarItemContainerProps, diff --git a/src/components/navbar/navbar.tsx b/src/components/navbar/navbar.tsx index f14b6f23..b1eb972d 100644 --- a/src/components/navbar/navbar.tsx +++ b/src/components/navbar/navbar.tsx @@ -2,7 +2,6 @@ import PropTypes from "prop-types"; import React from "react"; import { forwardRefAs } from "../../base"; -import { Omit } from "../../types"; import { NavbarBrand } from "./navbar-brand"; import { NavbarBurger } from "./navbar-burger"; import { NavbarContainer, NavbarContainerProps } from "./navbar-container"; diff --git a/src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx b/src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx index c58b00be..a2ed82ff 100644 --- a/src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx +++ b/src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx @@ -1,7 +1,6 @@ import React from "react"; import { Button } from "src/elements/button/button"; -import { Omit } from "src/types"; import { PageLoader, PageLoaderProps } from "../page-loader"; export type SimplePageLoaderManagerProps = Omit & { diff --git a/src/types.ts b/src/types.ts index 6a87107a..f8caff14 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,2 @@ export type Lit = string | number | boolean | undefined | null | void | {}; -export type Omit = Pick>; export type Prefer = P & Omit; -// tslint:disable-next-line: no-any -export type ReturnType = T extends (...args: any[]) => infer R ? R : any;