Created
July 30, 2018 06:11
-
-
Save tswistak/0f3a8a7dc31bfb9b9f4b46670b78ceac to your computer and use it in GitHub Desktop.
TypeScript 3.0, listing 3
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 characters
| type Strings = [...string]; | |
| type Empty = []; | |
| const c1: Strings = ['a', 'b']; | |
| const c2: Strings = []; | |
| const c3: Empty = []; | |
| const c4: Empty = ['a', 'b']; // invalid type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment