Created
June 5, 2019 18:21
-
-
Save codeBelt/0625400f2fc7b7adf05c7c48653c5ebc to your computer and use it in GitHub Desktop.
TypeScript Types
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
type SizeUnion = | |
| 'title1' | |
| 'title2' | |
| 'title3' | |
| 'headline' | |
| 'subhead' | |
| 'caption1' | |
| 'caption2' | |
| 'body1' | |
| 'callout' | |
| 'footnote1' | |
| 'footnote2' | |
| 'instruction1'; | |
type SizeMap = Record<SizeUnion, string>; | |
private _sizeMap: SizeMap = { | |
title1: 'h1', | |
title2: 'h2', | |
title3: 'h3', | |
headline: 'h4', | |
subhead: 'h5', | |
caption1: 'p', | |
caption2: 'p', | |
body1: 'p', | |
callout: 'p', | |
footnote1: 'p', | |
footnote2: 'p', | |
instruction1: 'p', | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment