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

Commit afe11e2

Browse files
committed
Fix internal typing
1 parent 39b4867 commit afe11e2

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/csstransition.tsx

+12-5
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import { CSSProperties, ComponentClass, ReactNode, StatelessComponent, HTMLAttri
1111
import { assemble, setDisplayName, omitProps, defaultProps } from "reassemble";
1212

1313
import { reducer } from "./reducer";
14-
import { withTransitionState } from "./composables/withTransitionState";
14+
import { withTransitionState, WithTransitionStateProps } from "./composables/withTransitionState";
1515
import { mergeWithBaseStyle } from "./composables/mergeWithBaseStyle";
16-
import { withTransitionInfo } from "./composables/withTransitionInfo";
17-
import { withTransitionObserver } from "./composables/withTransitionObserver";
16+
import { withTransitionInfo, WithTransitionInfoProps } from "./composables/withTransitionInfo";
17+
import { withTransitionObserver, WithTransitionObserverProps } from "./composables/withTransitionObserver";
1818
import { withWorkaround } from "./composables/withWorkaround";
1919
import { preventPhantomEvents } from "./composables/preventPhantomEvents";
20-
import { withDOMNodeCallback } from "./composables/withDOMNodeCallback";
20+
import { withDOMNodeCallback, WithDOMNodeCallbackProps } from "./composables/withDOMNodeCallback";
2121

2222
export type CSSTransitionDelay = number | { appear?: number; enter?: number; leave?: number };
2323
export type CSSTransitionEventHandler = () => void;
@@ -59,11 +59,18 @@ export interface CSSTransitionInnerProps
5959
onDOMNodeRef?: (ref: Element) => void;
6060
}
6161

62+
type PropsUnion = CSSTransitionProps
63+
& WithTransitionInfoProps
64+
& WithTransitionStateProps
65+
& WithDOMNodeCallbackProps
66+
& WithTransitionObserverProps
67+
& CSSTransitionInnerProps;
68+
6269
const withDefaultProps = defaultProps<Partial<CSSTransitionProps>>({
6370
component: "div",
6471
});
6572

66-
const mapPropsToInner = omitProps<keyof CSSTransitionProps | "onTransitionBegin" | "transitionInfo" | "transitionState" | "getDOMNode">(
73+
const mapPropsToInner = omitProps<keyof PropsUnion>(
6774
"active",
6875
"transitionAppear",
6976
"defaultStyle",

0 commit comments

Comments
 (0)