mardi 14 juin 2016

Only void function can be called with the "new" keyword

I'm trying to use the Foundation's Reveal plugin in my Typescript code in following way (altered for readability):

var popup = new Foundation.Reveal($('#element'));

and I'm getting following error during compilation (in the end it does compile and work anyway):

TS2350: Only a void function can be called with the 'new' keyword.

How should I write it then?

Typescript Playground - code illustrating the problem

Aucun commentaire:

Enregistrer un commentaire