Skip to content

Commit

Permalink
Typescript hotfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed Dec 10, 2019
1 parent ec4e06d commit a2609fa
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,30 @@ export interface CountUpProps {
}

declare class CountUp extends React.Component<CountUpProps, any> {}

export interface useCountUpProps {
start?: number;
end: number;
delay?: number;
duration?: number;
onReset?: ({ pauseResume, start, update }) => void;
onUpdate?: ({ pauseResume, reset, start }) => void;
onPauseResume?: ({ reset, start, update }) => void;
onStart?: ({ pauseResume, reset, start, update }) => void;
onEnd?: ({ pauseResume, reset, start, update }) => void;
}

type countUpHook = (
useCountUpProps,
) => {
countUp: number | string;
onReset: () => void;
nUpdate: () => void;
onPauseResume: () => void;
onStart: ({ pauseResume }) => void;
onEnd: ({ pauseResume }) => void;
};

export const useCountUp: countUpHook;

export default CountUp;

0 comments on commit a2609fa

Please sign in to comment.