sjrd / scala-js-ts-importer

TypeScript Importer for Scala.js
233 stars 43 forks source link

overrides for var #17

Open antonkulaga opened 10 years ago

antonkulaga commented 10 years ago

Sometimes the importer generates code like override var image: js.Any = ??? But it is not possible to override var-s in Scala

sjrd commented 10 years ago

Huh? Do you have a TypeScript file that produces this, so I can reproduce?

jmmk commented 8 years ago

I ran into this as well with PIXI.js. The issue I saw was:

A note here: the scala-ts-importer did not output override. For me at least, this is something that IntelliJ asked me to do to "make it right", but is still a compiler error. The solution was just to remove these variable declarations from the implementing class.

I'm not sure if TypeScript requires these or if it's also a bug in the TS definition. If the former, I guess the fix would be to detect duplicate variables in implementing classes (sounds complicated?). If the latter, the fix is to correct the TS definition.