Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 408e629

Browse files
committed
Update to newest react typings
1 parent 8b735c8 commit 408e629

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@types/enzyme": "^2.5.37",
5656
"@types/jsdom": "^2.0.29",
5757
"@types/mocha": "^2.2.32",
58-
"@types/react": "^15.0.4",
58+
"@types/react": "^15.0.10",
5959
"@types/sinon": "^1.16.31",
6060
"awesome-typescript-loader": "^3.0.0-beta.18",
6161
"babel-core": "^6.22.1",

‎src/composables/preventPhantomEvents.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CSSTransitionProps } from "../csstransition";
66
type PropsOut = {
77
requestTimeUpdate?: () => void;
88
handleTimeUpdateRequest?: () => void;
9-
onTransitionEnd?: EventHandler<TransitionEvent>;
9+
onTransitionEnd?: EventHandler<TransitionEvent<any>>;
1010
};
1111

1212
type PropsUnion = CSSTransitionProps & PropsOut;
@@ -31,7 +31,7 @@ export const preventPhantomEvents = isolate(
3131
timeUpdateRequested = false;
3232
}
3333
},
34-
onTransitionEnd: ({onTransitionEnd}) => (e: TransitionEvent) => {
34+
onTransitionEnd: ({onTransitionEnd}) => (e: TransitionEvent<any>) => {
3535
if (!onTransitionEnd) { return; }
3636

3737
if (e.target !== e.currentTarget) {

‎src/composables/withTransitionObserver.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { WithTransitionInfoProps } from "./withTransitionInfo";
77
import matchTransitionProperty from "../utils/matchTransitionProperty";
88

99
export type WithTransitionObserverProps = {
10-
onTransitionStart: EventHandler<TransitionEvent>,
10+
onTransitionStart: EventHandler<TransitionEvent<any>>,
1111
};
1212

1313
type PropsOut = WithTransitionObserverProps & {
14-
onTransitionEnd: EventHandler<TransitionEvent>,
14+
onTransitionEnd: EventHandler<TransitionEvent<any>>,
1515
};
1616

1717
type PropsUnion = CSSTransitionInnerProps
@@ -28,7 +28,7 @@ export const withTransitionObserver =
2828
onTransitionStart,
2929
onTransitionBegin,
3030
},
31-
) => (e: TransitionEvent) => {
31+
) => (e: TransitionEvent<any>) => {
3232
if (onTransitionStart) { onTransitionStart(e); }
3333
if (!inTransition || e.target !== e.currentTarget ||
3434
!matchTransitionProperty(e.propertyName, firstProperty)) {
@@ -43,7 +43,7 @@ export const withTransitionObserver =
4343
onTransitionEnd,
4444
onTransitionComplete,
4545
},
46-
) => (e: TransitionEvent) => {
46+
) => (e: TransitionEvent<any>) => {
4747
if (onTransitionEnd) { onTransitionEnd(e); }
4848
if (!inTransition || e.target !== e.currentTarget ||
4949
!matchTransitionProperty(e.propertyName, lastProperty)) {

‎src/composables/withWorkaround.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { WithTransitionInfoProps } from "./withTransitionInfo";
77
import { WithTransitionObserverProps } from "./withTransitionObserver";
88

99
type PropsOut = {
10-
workaroundHandler?: EventHandler<TransitionEvent>,
10+
workaroundHandler?: EventHandler<TransitionEvent<any>>,
1111
children?: ReactNode;
1212
};
1313

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /