Created
September 25, 2017 13:25
-
-
Save kofno/d3402156cae7fc70dc86ac4c2ff38213 to your computer and use it in GitHub Desktop.
Revisions
-
kofno created this gist
Sep 25, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // Given this interface One { kind: 'one'; value: 1; } interface Two { kind: 'two'; value: 2; } // ... and this alias type Number = One | Two; // ... can the `kind` values be expressed as a type without having to explicitly do this: type NumberKinds = 'one' | 'two';