Skip to content

Commit

Permalink
removed Omit / ReturnType as those are provided by TS 3+
Browse files Browse the repository at this point in the history
  • Loading branch information
dfee committed Jun 13, 2019
1 parent e60d82b commit fd634ee
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/base/helpers/factory.ts
Original file line number Diff line number Diff line change
@@ -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 =>
Expand Down
1 change: 0 additions & 1 deletion src/components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import PropTypes from "prop-types";
import React from "react";

import { forwardRefAs } from "../../base";
import { Omit } from "../../types";
import {
DropdownContainer,
DropdownContainerProps,
Expand Down
5 changes: 2 additions & 3 deletions src/components/modal/__docs__/simple-modal-manager.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -40,8 +39,8 @@ export class SimpleModalManager extends React.Component<

private readonly close = () => {
this.setState({ active: false });
}
};
private readonly open = () => {
this.setState({ active: true });
}
};
}
1 change: 0 additions & 1 deletion src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
NavbarItemContext,
NavbarItemContextValue,
} from "src/components/navbar/navbar-item-context";
import { Omit } from "src/types";

import {
testForwardRefAsExoticComponentIntegration,
Expand Down
1 change: 0 additions & 1 deletion src/components/navbar/navbar-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import PropTypes from "prop-types";
import React from "react";

import { forwardRefAs } from "../../base";
import { Omit } from "../../types";
import {
NavbarItemContainer,
NavbarItemContainerProps,
Expand Down
1 change: 0 additions & 1 deletion src/components/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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<PageLoaderProps, "active"> & {
Expand Down
3 changes: 0 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export type Lit = string | number | boolean | undefined | null | void | {};
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export type Prefer<P, T> = P & Omit<T, keyof P>;
// tslint:disable-next-line: no-any
export type ReturnType<T> = T extends (...args: any[]) => infer R ? R : any;

0 comments on commit fd634ee

Please sign in to comment.