title: How do you declare a value constrained type?
body: <p><a href="http://enwp.org/Ada_%28programming_language%29#Data_types" rel="nofollow noreferrer">Ada</a></p>
  
  <pre><code>type Year_type is range 1800 .. 2100;
  </code></pre>
  
  <p><a href="https://docs.raku.org/language/typesystem#subset" rel="nofollow noreferrer">Raku</a></p>
  
  <pre><code>subset Natural of Int where * ≥ 0;
  </code></pre>
  
  <p><a href="http://p3rl.org/Kavorka::Manual::Signatures#Value-constraints" rel="nofollow noreferrer">Kavorka</a></p>
  
  <pre><code>Int $even where { $_ % 2 == 0 }
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>type Natural = BigInteger /* hypothetical → */ where (n) =&gt; { return n &gt;= 0 };
  </code></pre>