Skip to content

Commit

Permalink
Fix TS7051 error, add missing hook configuration parameters (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgodziejewski authored and mmarkelov committed Dec 23, 2019
1 parent 9618465 commit eb74c5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export interface RenderCounterProps {
update?: (newEnd?: number) => void;
}

type EasingFn = (t: number, b: number, c: number, d: number) => number;

export interface CountUpProps extends CallbackProps {
className?: string;
decimal?: string;
Expand All @@ -54,7 +56,7 @@ export interface CountUpProps extends CallbackProps {
start?: number;
suffix?: string;
useEasing?: boolean;
easingFn?: (t: number, b: number, c: number, d: number) => number;
easingFn?: EasingFn;
formattingFn?: (n: number) => string;
children?: (props: RenderCounterProps) => JSX.Element;
}
Expand All @@ -67,10 +69,12 @@ export interface useCountUpProps extends CallbackProps {
end: number;
delay?: number;
duration?: number;
easingFn?: EasingFn;
separator?: string;
}

type countUpHook = (
useCountUpProps,
arg: useCountUpProps,
) => {
countUp: number | string;
start: Function;
Expand Down

0 comments on commit eb74c5d

Please sign in to comment.