roman01la / javascript-to-clojurescript

JavaScript to ClojureScript translator
https://roman01la.github.io/javascript-to-clojurescript/
102 stars 6 forks source link

ForOfStatement is not implemented #18

Closed rberger closed 2 years ago

rberger commented 2 years ago

Just want to say that this tool has saved me time and time again. Really appreciate it existing. Hope you have the time and interest to keep evolving it.

Here's something that popped up as a limitation for me. Error: ForOfStatement is not implemented A sample of code that triggered it

  var deviceId;
  for (deviceInfo of deviceInfos) {
    if (deviceInfo.kind === 'videoinput' && deviceInfo.label === 'Reincubate Camo') {
      deviceId = deviceInfo.deviceId
      break;
    }
  }
roman01la commented 2 years ago

Thanks! Since there's no equivalent language construct in ClojureScript I don't think it's possible to translate for...of loop into something that could be done in cljs w/o additional dependencies.