adobe-webplatform / Snap.svg

The JavaScript library for modern SVG graphics.
http://snapsvg.io
Apache License 2.0
13.95k stars 1.15k forks source link

Docs / Types: Snap.animate with array of numbers #658

Open Steditor opened 3 years ago

Steditor commented 3 years ago

The documentation claims that the setter of the Snap.animate function accepts one number argument: https://github.com/adobe-webplatform/Snap.svg/blob/b365287722a72526000ac4bfcf0ce4cac2faa015/src/animation.js#L97

However, if an array is provided for from and to, the setter will also receive an array: https://github.com/adobe-webplatform/Snap.svg/blob/b365287722a72526000ac4bfcf0ce4cac2faa015/src/mina.js#L104-L113

This should be fixed in the documentation and afterwards then be applied to @types/snapsvg as well: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/snapsvg/index.d.ts#L41