Port delimiter.js to @flow. (#1177)

* Port delimiter.js to @flow.

* Responded to comments.
This commit is contained in:
Ashish Myles
2018-03-01 22:57:10 -05:00
committed by Kevin Barabash
parent 56cfc7cf86
commit 9e22012619
4 changed files with 139 additions and 38 deletions

View File

@@ -275,7 +275,14 @@ defineFunction({
middleDelim = delimiter.sizedDelim(
group.value.value, 1, options,
group.mode, []);
middleDelim.isMiddle = {value: group.value.value, options: options};
// Property `isMiddle` not defined on `span`. It is only used in
// this file above. Fixing this correctly requires refactoring the
// htmlBuilder return type to support passing additional data.
// An easier, but unideal option would be to add `isMiddle` to
// `span` just for this case.
// $FlowFixMe
middleDelim.isMiddle = {value: group.value.value, options};
}
return middleDelim;
},