Last active
February 23, 2020 08:44
-
-
Save cenkce/96fe3c6f77287b96b24477415a0c056e to your computer and use it in GitHub Desktop.
Tuple Operators Examples
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
// ... import types | |
type ComponentProps: { | |
EnvironmentVariable: TestListToUnion // [] | ["key1", "union type 1" | "union type 2" | "union type 3"] | ["key2", string] | ["key3", number] ... | |
EnvironmentVariables: TestListToTypeAlias // {key4: "type of string";} & {key3: number;} ... | |
SelectedEnvironmentVariableKey: TestKeys // "key1" | "key2" | "key3" | "key4" | undefined | |
... | |
} | |
function Component(props: ComponentProps) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment