Extract render target logic out of renderer to be target agnostic

This commit is contained in:
Niklas von Hertzen
2017-08-06 20:21:35 +08:00
parent f7f445c71e
commit a2895691ba
6 changed files with 652 additions and 523 deletions

View File

@@ -25,13 +25,11 @@ export const TEXT_DECORATION_LINE = {
export type TextDecorationStyle = $Values<typeof TEXT_DECORATION_STYLE>;
export type TextDecorationLine = $Values<typeof TEXT_DECORATION_LINE>;
type TextDecorationLineType = Array<TextDecorationLine> | null;
export type TextDecoration =
| {
textDecorationLine: Array<TextDecorationLine>,
textDecorationStyle: TextDecorationStyle,
textDecorationColor: Color | null
}
| $Values<typeof TEXT_DECORATION>;
export type TextDecoration = {
textDecorationLine: Array<TextDecorationLine>,
textDecorationStyle: TextDecorationStyle,
textDecorationColor: Color | null
} | null;
const parseLine = (line: string): TextDecorationLine => {
switch (line) {