Move redundant prop to type

This commit is contained in:
Rene Pfeuffer
2020-02-07 15:10:54 +01:00
parent d3d33d5d65
commit bcba3e28cd
4 changed files with 2 additions and 6 deletions

View File

@@ -3,12 +3,10 @@ import DiffFile from "./DiffFile";
import { DiffObjectProps, File } from "./DiffTypes";
import Notification from "../Notification";
import { WithTranslation, withTranslation } from "react-i18next";
import { DefaultCollapsed } from "./defaultCollapsed";
type Props = WithTranslation &
DiffObjectProps & {
diff: File[];
defaultCollapse?: DefaultCollapsed;
};
class Diff extends React.Component<Props> {

View File

@@ -9,14 +9,12 @@ import Tag from "../Tag";
import Icon from "../Icon";
import { Change, ChangeEvent, DiffObjectProps, File, Hunk as HunkType } from "./DiffTypes";
import TokenizedDiffView from "./TokenizedDiffView";
import { DefaultCollapsed } from "./defaultCollapsed";
const EMPTY_ANNOTATION_FACTORY = {};
type Props = DiffObjectProps &
WithTranslation & {
file: File;
defaultCollapse?: DefaultCollapsed;
};
type Collapsible = {

View File

@@ -1,4 +1,5 @@
import { ReactNode } from "react";
import { DefaultCollapsed } from "./defaultCollapsed";
// We place the types here and not in @scm-manager/ui-types,
// because they represent not a real scm-manager related type.
@@ -77,4 +78,5 @@ export type DiffObjectProps = {
fileAnnotationFactory?: FileAnnotationFactory;
annotationFactory?: AnnotationFactory;
markConflicts?: boolean;
defaultCollapse?: DefaultCollapsed;
};

View File

@@ -10,12 +10,10 @@ import { DiffObjectProps, File } from "./DiffTypes";
import { NotFoundError } from "../errors";
import { Notification } from "../index";
import { withTranslation, WithTranslation } from "react-i18next";
import { DefaultCollapsed } from "./defaultCollapsed";
type Props = WithTranslation &
DiffObjectProps & {
url: string;
defaultCollapse?: DefaultCollapsed;
};
type State = {