Created
July 26, 2022 03:14
-
-
Save szaranger/f9cd2e23ce174319eeec3f4b5e81b7a0 to your computer and use it in GitHub Desktop.
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 Person = { name: string }; | |
| const john: Person = { name: 'John Doe' }; // Type declaration | |
| const jane = { name: 'Jane Doe' } as Person; // Type assertion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment