mdgriffith / elm-animator

A timeline-based animation engine for Elm
https://package.elm-lang.org/packages/mdgriffith/elm-animator/latest/
BSD 3-Clause "New" or "Revised" License
132 stars 15 forks source link

Is possible to use the "wrong" `watching` function #9

Open lucamug opened 4 years ago

lucamug commented 4 years ago

In one of the first example that I wrote I was using Animator.watching instead of Animator.Css.watching.

From @mdgriffith

Oh! you need to use Animator.Css.watching for css. Yeah, unfortunately that’s a subtle one :thinking_face: I was trying to figure out a way to protect this case with types, but wasn’t able to find a nice way.

How about moving Animator.watching to Animator.Inline. Even if the compile still will not detect the problem, as developer I could see the difference. I could also get an error as I would probably not Import Animator.Inline while working with Animator.Css