Updated Image.fromURL to make the callback strongly typed

This commit is contained in:
Bryan Krol
2019-02-22 14:16:16 -05:00
parent 7e4e9a35c4
commit 85a2bcb512
+1 -1
View File
@@ -2285,7 +2285,7 @@ export class Image {
* @param [callback] Callback to invoke when image is created (newly created image is passed as a first argument)
* @param [imgOptions] Options object
*/
static fromURL(url: string, callback?: Function, imgOptions?: IImageOptions): Image;
static fromURL(url: string, callback?: (image: Image) => void, imgOptions?: IImageOptions): Image;
/**
* Returns Image instance from an SVG element
* @param element Element to parse