Closed aomarks closed 6 years ago
Please add a deprecation notice in the animate function description. Also what do you think about a console.warn
called only when you call animate
directly?
It's a major version bump; I think we can get away with at least encouraging people move off of the function.
Actually scratch that. I doubt there will be another major version bump in which we actually remove the animate function
Actually scratch that. I doubt there will be another major version bump in which we actually remove the animate function
I added a deprecation comment to use the other method instead.
Yeah, maybe the console warning is overkill given that we'll probably never remove it.
The @suppress {checkTypes}
seems to cause an @ts-ignore
annotation to show up in the output on the animate()
signature, is that not enough to handle this case?
No, it has no effect in this context.
What does PaperRippleElement
become if it changes the type of animate
? Does it just fail to compile completely or does it become something that's no longer considered a subtype of the stuff it extends but still has the same members (excluding animate
)?
(discussed offline) This seems like the best way to go about this without making a breaking change by renaming animate
.
Also don't emit the
animate()
method in the TypeScript types, because it conflicts withElement.animate()
.This way the types compile, but there is still a way for users to type-safely call our
animate()
method.