Make sure string is hex value with stream
I would like to make sure that the value I am getting is the 6th row. I am currently speaking
type Color = string;
function foo(color: Color){}
But I would like to say
type Color = '#' + stringOfLength-3-6-8;
function foo(color: Color){}
Is there a way to express such constraints in a stream?
+3
source to share