Created
March 15, 2021 04:00
-
-
Save mscolnick/5aa5744cc1ea98c3db8ef45ea278c847 to your computer and use it in GitHub Desktop.
This file contains 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
interface Person { | |
name: string; | |
age: number; | |
location: string; | |
} | |
type P1 = Person["name"]; // string | |
type P2 = string[][0]; // string | |
type P3 = string[]["length"]; // number | |
type P4 = [string]["length"]; // 1 | |
type P5 = [string, string]["length"]; // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment