Skip to content
#

epfl

Here are 170 public repositories matching this topic...

hepin1989
hepin1989 commented Sep 25, 2020

I just tried it out in Dotty for https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types

~ dotr
Starting dotty REPL...
scala> type Color = "top" | "middle"
// defined alias type Color = "top" | "middle"

scala> def test(color:Color) = println(color)
def test(color: Color): Unit

scala> test("middle")
middle

scala> test("middel") 

Improve this page

Add a description, image, and links to the epfl topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the epfl topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.