I'm wondering if it's possible to give a Type to something "empty" in Scala?
For example, I'm looking for something like Null[String] or Nothing[String] or None[String].
I'm not looking to use an Option. To be honest, what I'm doing is I have a map:
options: Map[String, Any] = Map("id" -> Null, "num" -> Null)
That other people will "extend" with:
_options: Map[String, Any] = Map("id" -> "Hi", "num" -> 5)
options = options ++ _options
And I want to be able to specify what types are suppose to be given in the map.
Thanks!
you can try this: val option: Map[String,Any] = Map("id" -> null)