Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Add support for java.util.Set for exported functions #77

Closed
kipz opened this issue Dec 19, 2016 · 1 comment
Closed

Add support for java.util.Set for exported functions #77

kipz opened this issue Dec 19, 2016 · 1 comment

Comments

@kipz
Copy link
Contributor

kipz commented Dec 19, 2016

From @snewman on November 23, 2016 6:11

Currently when returning collections from exported functions, only java.util.List is supported - it would be nice to add support for other collection types, specifically java.util.Set.

For the record, here is the stacktrace you get when using java.util.Set:

- should generate typescript file *** FAILED ***
  java.lang.UnsupportedOperationException: Unsupported type [Seq]
  at com.atomist.rug.ts.TypeScriptGenerationHelper.javaTypeToTypeScriptType(TypeScriptGenerationHelper.scala:35)
  at com.atomist.rug.rugdoc.TypeScriptGenerator$$anonfun$generateType$2.apply(TypeScriptGenerator.scala:82)
  at com.atomist.rug.rugdoc.TypeScriptGenerator$$anonfun$generateType$2.apply(TypeScriptGenerator.scala:73)
  at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
  at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:74)
  at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
  at com.atomist.rug.rugdoc.TypeScriptGenerator.generateType(TypeScriptGenerator.scala:73)
  at com.atomist.rug.rugdoc.TypeScriptGenerator.com$atomist$rug$rugdoc$TypeScriptGenerator$$generate$1(TypeScriptGenerator.scala:119)
  at com.atomist.rug.rugdoc.TypeScriptGenerator$$anonfun$emitInterfaces$2$$anonfun$apply$3.apply(TypeScriptGenerator.scala:140)
  at com.atomist.rug.rugdoc.TypeScriptGenerator$$anonfun$emitInterfaces$2$$anonfun$apply$3.apply(TypeScriptGenerator.scala:140)
  …
@kipz
Copy link
Contributor Author

kipz commented Jan 3, 2017

Given that TS/JS/Rug don't support sets, I think it makes most sense to just use lists.

@kipz kipz closed this as completed Jan 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant