Missing newHeight in typscript file
See original GitHub issueMy code :
<AnimateHeight
duration={500}
height={childrenHeight}
onAnimationStart={newHeight => handleAnimationEnd(newHeight)}
>
Typescript return this error :
Type '(newHeight: any) => any' is not assignable to type '() => void'.ts(2322)
I believe that the declaration of newHeight is missing in the onAnimationEnd and onAnimationStart functions :
onAnimationEnd?(): void
onAnimationStart?(): void
to :
onAnimationEnd?(newHeight): void
onAnimationStart?(newHeight): void
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Typescript: Type X is missing the following properties from ...
angular - Typescript: Type X is missing the following properties from type Y length, pop, push, concat, and 26 more. [2740] - Stack...
Read more >[1.3.0] Typescript file missing GetCroppedCanvasOptions ...
I'm submitting a... [X ] Bug report · Current behavior. If I'm not wrong, the typescript file included with v1. · Expected behavior....
Read more >Documentation - TypeScript for JavaScript Programmers
By understanding how JavaScript works, TypeScript can build a type-system that accepts JavaScript code but has types. This offers a type-system without needing ......
Read more >TypeScript - Emotion
The easiest way to use the css prop with TypeScript is with the new JSX ... const subtitleStyle = css` box-sizing: border-box; width:...
Read more >Ninja Squad: Le Blog
The CLI now generates fewer files in a new project: the environment files are gone, so you'll no longer see environment.ts and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Published with
2.0.8
🎉I made two small changes
Changed
children: ReactNode;
tochildren: ReactNode | ReactNode[];
as it can receive multiple children elements.And changed
easing?: "ease" | "linear" | "ease-in" | "ease-out" | "ease-in-out";
toeasing?: "ease" | "linear" | "ease-in" | "ease-out" | "ease-in-out" | string;
to support other timing functions likecubic-bezier
andsteps
.Cheers!
Thanks you Stanko ! 👍