Created
August 9, 2020 11:44
-
-
Save jaycosaur/becc7a3fb5856f0d22fb0c2fe12aca55 to your computer and use it in GitHub Desktop.
Union types [typescript] - Typescript to Python field guide
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 StringOrNumber = string | number; | |
const somethingGood: StringOrNumber = "123"; // ok! | |
const somethingBad: StringOrNumber = {}; // not ok! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment