2

I am trying to use image loading third party plugin blueimp. That plugin has global function

loadImage(
    e.target.files[0],
    function (img) {
        document.body.appendChild(img);
    },
    { maxWidth: 600 }
);

How can I call this function using typescript?

peterh
  • 11,875
  • 18
  • 85
  • 108
Gayan
  • 2,750
  • 5
  • 47
  • 88
  • 1
    Here is a quick migration guide : https://basarat.gitbooks.io/typescript/content/docs/types/migrating.html – basarat Dec 21 '15 at 22:38
  • Possible duplicate of [typescript: What to do if a typings (or tsd) is not available?](http://stackoverflow.com/questions/36834121/typescript-what-to-do-if-a-typings-or-tsd-is-not-available) – Alex Sep 30 '16 at 11:35

1 Answers1

7

You can put the following line before the function call:

declare var loadImage;

[Playground]

MartyIX
  • 27,828
  • 29
  • 136
  • 207