@khanacademy/perseus-editor 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/.babelrc.js +1 -1
  2. package/.eslintrc.js +1 -0
  3. package/CHANGELOG.md +21 -0
  4. package/dist/all-editors.d.ts +2 -0
  5. package/dist/all-editors.js.flow +8 -0
  6. package/dist/all-widgets.d.ts +22 -0
  7. package/dist/all-widgets.js.flow +34 -0
  8. package/dist/article-editor.d.ts +59 -0
  9. package/dist/article-editor.js.flow +72 -0
  10. package/dist/components/blur-input.d.ts +19 -0
  11. package/dist/components/blur-input.js.flow +25 -0
  12. package/dist/components/checkbox.d.ts +20 -0
  13. package/dist/components/checkbox.js.flow +26 -0
  14. package/dist/components/device-framer.d.ts +15 -0
  15. package/dist/components/device-framer.js.flow +20 -0
  16. package/dist/components/drag-target.d.ts +2 -0
  17. package/dist/components/drag-target.js.flow +8 -0
  18. package/dist/components/dropdown-option.d.ts +35 -0
  19. package/dist/components/dropdown-option.js.flow +49 -0
  20. package/dist/components/form-wrapped-text-field.d.ts +48 -0
  21. package/dist/components/form-wrapped-text-field.js.flow +48 -0
  22. package/dist/components/graph-settings.d.ts +2 -0
  23. package/dist/components/graph-settings.js.flow +8 -0
  24. package/dist/components/hover-behavior.d.ts +85 -0
  25. package/dist/components/hover-behavior.js.flow +48 -0
  26. package/dist/components/json-editor.d.ts +2 -0
  27. package/dist/components/json-editor.js.flow +8 -0
  28. package/dist/components/link.d.ts +41 -0
  29. package/dist/components/link.js.flow +50 -0
  30. package/dist/components/simple-button.d.ts +16 -0
  31. package/dist/components/simple-button.js.flow +18 -0
  32. package/dist/components/sortable.d.ts +2 -0
  33. package/dist/components/sortable.js.flow +8 -0
  34. package/dist/components/util.d.ts +1 -0
  35. package/dist/components/util.js.flow +9 -0
  36. package/dist/components/viewport-resizer.d.ts +16 -0
  37. package/dist/components/viewport-resizer.js.flow +22 -0
  38. package/dist/diffs/__stories__/perseus-diff-wrapper.d.ts +5 -0
  39. package/dist/diffs/__stories__/perseus-diff-wrapper.js.flow +11 -0
  40. package/dist/diffs/article-diff.d.ts +50 -0
  41. package/dist/diffs/article-diff.js.flow +71 -0
  42. package/dist/diffs/item-diff.d.ts +23 -0
  43. package/dist/diffs/item-diff.js.flow +41 -0
  44. package/dist/diffs/renderer-diff.d.ts +22 -0
  45. package/dist/diffs/renderer-diff.js.flow +25 -0
  46. package/dist/diffs/split-diff.d.ts +2 -0
  47. package/dist/diffs/split-diff.js.flow +8 -0
  48. package/dist/diffs/string-array-diff.d.ts +2 -0
  49. package/dist/diffs/string-array-diff.js.flow +11 -0
  50. package/dist/diffs/structured-item-diff.d.ts +25 -0
  51. package/dist/diffs/structured-item-diff.js.flow +37 -0
  52. package/dist/diffs/tags-diff.d.ts +21 -0
  53. package/dist/diffs/tags-diff.js.flow +24 -0
  54. package/dist/diffs/text-diff.d.ts +15 -0
  55. package/dist/diffs/text-diff.js.flow +21 -0
  56. package/dist/diffs/widget-diff-performer.d.ts +2 -0
  57. package/dist/diffs/widget-diff-performer.js.flow +8 -0
  58. package/dist/diffs/widget-diff.d.ts +21 -0
  59. package/dist/diffs/widget-diff.js.flow +31 -0
  60. package/dist/editor-page.d.ts +57 -0
  61. package/dist/editor-page.js.flow +73 -0
  62. package/dist/editor.d.ts +82 -0
  63. package/dist/editor.js.flow +98 -0
  64. package/dist/es/index.js +1428 -2587
  65. package/dist/es/index.js.map +1 -1
  66. package/dist/hint-editor.d.ts +64 -0
  67. package/dist/hint-editor.js.flow +87 -0
  68. package/dist/i18n.d.ts +7 -0
  69. package/dist/i18n.js.flow +13 -0
  70. package/dist/iframe-content-renderer.d.ts +22 -0
  71. package/dist/iframe-content-renderer.js.flow +28 -0
  72. package/dist/index.d.ts +17 -2
  73. package/dist/index.js +1492 -2548
  74. package/dist/index.js.flow +23 -2
  75. package/dist/index.js.map +1 -1
  76. package/dist/item-editor.d.ts +36 -0
  77. package/dist/item-editor.js.flow +46 -0
  78. package/dist/item-extras-editor.d.ts +17 -0
  79. package/dist/item-extras-editor.js.flow +23 -0
  80. package/dist/katex-error-view.d.ts +16 -0
  81. package/dist/katex-error-view.js.flow +24 -0
  82. package/dist/multirenderer-editor.d.ts +32 -0
  83. package/dist/multirenderer-editor.js.flow +46 -0
  84. package/dist/section-control-button.d.ts +12 -0
  85. package/dist/section-control-button.js.flow +20 -0
  86. package/dist/stateful-article-editor.d.ts +10 -0
  87. package/dist/stateful-article-editor.js.flow +16 -0
  88. package/dist/stateful-editor-page.d.ts +2 -0
  89. package/dist/stateful-editor-page.js.flow +8 -0
  90. package/dist/testing-widgets.d.ts +22 -0
  91. package/dist/testing-widgets.js.flow +34 -0
  92. package/dist/util/register-all-widgets-and-editors-for-testing.d.ts +1 -0
  93. package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +7 -0
  94. package/dist/widgets/categorizer-editor.d.ts +47 -0
  95. package/dist/widgets/categorizer-editor.js.flow +61 -0
  96. package/dist/widgets/cs-program-editor.d.ts +21 -0
  97. package/dist/widgets/cs-program-editor.js.flow +25 -0
  98. package/dist/widgets/definition-editor.d.ts +17 -0
  99. package/dist/widgets/definition-editor.js.flow +23 -0
  100. package/dist/widgets/dropdown-editor.d.ts +23 -0
  101. package/dist/widgets/dropdown-editor.js.flow +37 -0
  102. package/dist/widgets/example-graphie-widget-editor.d.ts +18 -0
  103. package/dist/widgets/example-graphie-widget-editor.js.flow +25 -0
  104. package/dist/widgets/example-graphie-widget.d.ts +87 -0
  105. package/dist/widgets/example-graphie-widget.js.flow +101 -0
  106. package/dist/widgets/example-widget-editor.d.ts +19 -0
  107. package/dist/widgets/example-widget-editor.js.flow +26 -0
  108. package/dist/widgets/example-widget.d.ts +71 -0
  109. package/dist/widgets/example-widget.js.flow +86 -0
  110. package/dist/widgets/explanation-editor.d.ts +21 -0
  111. package/dist/widgets/explanation-editor.js.flow +27 -0
  112. package/dist/widgets/expression-editor.d.ts +33 -0
  113. package/dist/widgets/expression-editor.js.flow +41 -0
  114. package/dist/widgets/graded-group-editor.d.ts +53 -0
  115. package/dist/widgets/graded-group-editor.js.flow +67 -0
  116. package/dist/widgets/graded-group-set-editor.d.ts +51 -0
  117. package/dist/widgets/graded-group-set-editor.js.flow +65 -0
  118. package/dist/widgets/grapher-editor.d.ts +14 -0
  119. package/dist/widgets/grapher-editor.js.flow +21 -0
  120. package/dist/widgets/group-editor.d.ts +49 -0
  121. package/dist/widgets/group-editor.js.flow +63 -0
  122. package/dist/widgets/iframe-editor.d.ts +18 -0
  123. package/dist/widgets/iframe-editor.js.flow +24 -0
  124. package/dist/widgets/image-editor.d.ts +2 -0
  125. package/dist/widgets/image-editor.js.flow +8 -0
  126. package/dist/widgets/input-number-editor.d.ts +47 -0
  127. package/dist/widgets/input-number-editor.js.flow +77 -0
  128. package/dist/widgets/interaction/constraint-editor.d.ts +26 -0
  129. package/dist/widgets/interaction/constraint-editor.js.flow +35 -0
  130. package/dist/widgets/interaction-editor.d.ts +28 -0
  131. package/dist/widgets/interaction-editor.js.flow +36 -0
  132. package/dist/widgets/interactive-graph-editor.d.ts +2 -0
  133. package/dist/widgets/interactive-graph-editor.js.flow +8 -0
  134. package/dist/widgets/label-image/answer-choices.d.ts +13 -0
  135. package/dist/widgets/label-image/answer-choices.js.flow +16 -0
  136. package/dist/widgets/label-image/behavior.d.ts +14 -0
  137. package/dist/widgets/label-image/behavior.js.flow +17 -0
  138. package/dist/widgets/label-image/marker.d.ts +30 -0
  139. package/dist/widgets/label-image/marker.js.flow +34 -0
  140. package/dist/widgets/label-image/question-markers.d.ts +22 -0
  141. package/dist/widgets/label-image/question-markers.js.flow +25 -0
  142. package/dist/widgets/label-image/select-image.d.ts +10 -0
  143. package/dist/widgets/label-image/select-image.js.flow +13 -0
  144. package/dist/widgets/label-image-editor.d.ts +45 -0
  145. package/dist/widgets/label-image-editor.js.flow +44 -0
  146. package/dist/widgets/lights-puzzle-editor.d.ts +24 -0
  147. package/dist/widgets/lights-puzzle-editor.js.flow +34 -0
  148. package/dist/widgets/matcher-editor.d.ts +19 -0
  149. package/dist/widgets/matcher-editor.js.flow +28 -0
  150. package/dist/widgets/matrix-editor.d.ts +20 -0
  151. package/dist/widgets/matrix-editor.js.flow +26 -0
  152. package/dist/widgets/measurer-editor.d.ts +32 -0
  153. package/dist/widgets/measurer-editor.js.flow +42 -0
  154. package/dist/widgets/molecule-editor.d.ts +17 -0
  155. package/dist/widgets/molecule-editor.js.flow +23 -0
  156. package/dist/widgets/number-line-editor.d.ts +36 -0
  157. package/dist/widgets/number-line-editor.js.flow +45 -0
  158. package/dist/widgets/numeric-input-editor.d.ts +2 -0
  159. package/dist/widgets/numeric-input-editor.js.flow +8 -0
  160. package/dist/widgets/orderer-editor.d.ts +20 -0
  161. package/dist/widgets/orderer-editor.js.flow +30 -0
  162. package/dist/widgets/passage-editor.d.ts +18 -0
  163. package/dist/widgets/passage-editor.js.flow +24 -0
  164. package/dist/widgets/passage-ref-editor.d.ts +11 -0
  165. package/dist/widgets/passage-ref-editor.js.flow +17 -0
  166. package/dist/widgets/passage-ref-target-editor.d.ts +16 -0
  167. package/dist/widgets/passage-ref-target-editor.js.flow +22 -0
  168. package/dist/widgets/plotter-editor.d.ts +45 -0
  169. package/dist/widgets/plotter-editor.js.flow +53 -0
  170. package/dist/widgets/radio/editor.d.ts +64 -0
  171. package/dist/widgets/radio/editor.js.flow +80 -0
  172. package/dist/widgets/reaction-diagram-editor.d.ts +20 -0
  173. package/dist/widgets/reaction-diagram-editor.js.flow +26 -0
  174. package/dist/widgets/sequence-editor.d.ts +56 -0
  175. package/dist/widgets/sequence-editor.js.flow +72 -0
  176. package/dist/widgets/simple-markdown-tester-editor.d.ts +14 -0
  177. package/dist/widgets/simple-markdown-tester-editor.js.flow +23 -0
  178. package/dist/widgets/simple-markdown-tester.d.ts +52 -0
  179. package/dist/widgets/simple-markdown-tester.js.flow +61 -0
  180. package/dist/widgets/simulator-editor.d.ts +20 -0
  181. package/dist/widgets/simulator-editor.js.flow +26 -0
  182. package/dist/widgets/sorter-editor.d.ts +16 -0
  183. package/dist/widgets/sorter-editor.js.flow +22 -0
  184. package/dist/widgets/table-editor.d.ts +18 -0
  185. package/dist/widgets/table-editor.js.flow +24 -0
  186. package/dist/widgets/transformer-editor.d.ts +11 -0
  187. package/dist/widgets/transformer-editor.js.flow +17 -0
  188. package/dist/widgets/unit-editor.d.ts +33 -0
  189. package/dist/widgets/unit-editor.js.flow +41 -0
  190. package/dist/widgets/video-editor.d.ts +19 -0
  191. package/dist/widgets/video-editor.js.flow +25 -0
  192. package/package.json +6 -5
  193. package/src/__stories__/{editor.stories.js → editor.stories.tsx} +4 -5
  194. package/src/__stories__/{section-control-button.stories.jsx → section-control-button.stories.tsx} +10 -11
  195. package/src/__testdata__/{input-number_testdata.js → input-number.testdata.ts} +2 -3
  196. package/src/__tests__/{editor_test.jsx → editor.test.tsx} +4 -7
  197. package/src/__tests__/{i18n_test.jsx → i18n.test.ts} +5 -5
  198. package/src/__tests__/{traversal_test.jsx → traversal.test.ts} +9 -10
  199. package/src/{all-editors_test.js → all-editors.test.ts} +1 -2
  200. package/src/all-editors.ts +83 -0
  201. package/src/all-widgets.ts +7 -0
  202. package/src/{article-editor.jsx → article-editor.tsx} +52 -42
  203. package/src/components/__stories__/{blur-input.stories.jsx → blur-input.stories.tsx} +2 -4
  204. package/src/components/{blur-input.jsx → blur-input.tsx} +12 -13
  205. package/src/components/{checkbox.jsx → checkbox.tsx} +18 -19
  206. package/src/components/{device-framer.jsx → device-framer.tsx} +4 -5
  207. package/src/components/{drag-target.jsx → drag-target.tsx} +0 -1
  208. package/src/components/{dropdown-option.jsx → dropdown-option.tsx} +40 -40
  209. package/src/components/{form-wrapped-text-field.jsx → form-wrapped-text-field.tsx} +47 -53
  210. package/src/components/{graph-settings.jsx → graph-settings.tsx} +4 -8
  211. package/src/components/{hover-behavior.jsx → hover-behavior.ts} +32 -33
  212. package/src/components/{json-editor.jsx → json-editor.tsx} +4 -3
  213. package/src/components/{link.jsx → link.ts} +33 -33
  214. package/src/components/{simple-button.jsx → simple-button.tsx} +3 -4
  215. package/src/components/{sortable.jsx → sortable.tsx} +3 -3
  216. package/src/components/{util.js → util.ts} +1 -2
  217. package/src/components/{viewport-resizer.jsx → viewport-resizer.tsx} +5 -6
  218. package/src/diffs/__stories__/{perseus-diff-wrapper.jsx → perseus-diff-wrapper.tsx} +3 -2
  219. package/src/diffs/__stories__/{structured-item-diff.stories.jsx → structured-item-diff.stories.tsx} +27 -22
  220. package/src/diffs/__stories__/{tags-diff.stories.jsx → tags-diff.stories.tsx} +12 -14
  221. package/src/diffs/__stories__/{text-diff.stories.jsx → text-diff.stories.tsx} +12 -14
  222. package/src/diffs/__tests__/{split-diff_test.js → split-diff.test.ts} +1 -2
  223. package/src/diffs/__tests__/{string-array-diff_test.js → string-array-diff.test.ts} +1 -2
  224. package/src/diffs/__tests__/{structured-item-diff_test.js → structured-item-diff.test.ts} +15 -14
  225. package/src/diffs/__tests__/{widget-diff-performer_test.js → widget-diff-performer.test.ts} +1 -2
  226. package/src/diffs/{article-diff.jsx → article-diff.tsx} +5 -6
  227. package/src/diffs/{item-diff.jsx → item-diff.tsx} +4 -5
  228. package/src/diffs/{renderer-diff.jsx → renderer-diff.tsx} +22 -28
  229. package/src/diffs/{split-diff.jsx → split-diff.ts} +4 -3
  230. package/src/diffs/{string-array-diff.jsx → string-array-diff.ts} +8 -9
  231. package/src/diffs/{structured-item-diff.jsx → structured-item-diff.tsx} +32 -27
  232. package/src/diffs/{tags-diff.jsx → tags-diff.tsx} +15 -16
  233. package/src/diffs/{text-diff.jsx → text-diff.tsx} +13 -13
  234. package/src/diffs/{widget-diff-performer.jsx → widget-diff-performer.ts} +3 -8
  235. package/src/diffs/{widget-diff.jsx → widget-diff.tsx} +15 -14
  236. package/src/{editor-page.jsx → editor-page.tsx} +52 -60
  237. package/src/{editor.jsx → editor.tsx} +315 -277
  238. package/src/{hint-editor.jsx → hint-editor.tsx} +105 -79
  239. package/src/{i18n.jsx → i18n.ts} +9 -6
  240. package/src/{iframe-content-renderer.jsx → iframe-content-renderer.tsx} +23 -17
  241. package/src/{index.js → index.ts} +15 -16
  242. package/src/{item-editor.jsx → item-editor.tsx} +35 -30
  243. package/src/{item-extras-editor.jsx → item-extras-editor.tsx} +3 -4
  244. package/src/{katex-error-view.jsx → katex-error-view.tsx} +4 -5
  245. package/src/{multirenderer-editor.jsx → multirenderer-editor.tsx} +132 -127
  246. package/src/{section-control-button.jsx → section-control-button.tsx} +10 -9
  247. package/src/{stateful-article-editor.jsx → stateful-article-editor.tsx} +2 -5
  248. package/src/{stateful-editor-page.jsx → stateful-editor-page.tsx} +1 -3
  249. package/src/{testing-widgets.js → testing-widgets.ts} +5 -6
  250. package/src/util/{register-all-widgets-and-editors-for-testing_test.js → register-all-widgets-and-editors-for-testing.test.ts} +1 -2
  251. package/src/util/{register-all-widgets-and-editors-for-testing.js → register-all-widgets-and-editors-for-testing.ts} +2 -3
  252. package/src/widgets/__stories__/{label-image-editor.stories.jsx → label-image-editor.stories.tsx} +22 -18
  253. package/src/widgets/__stories__/{radio-editor.stories.jsx → radio-editor.stories.tsx} +15 -10
  254. package/src/widgets/{categorizer-editor.jsx → categorizer-editor.tsx} +8 -6
  255. package/src/widgets/{cs-program-editor.jsx → cs-program-editor.tsx} +17 -17
  256. package/src/widgets/{definition-editor.jsx → definition-editor.tsx} +9 -8
  257. package/src/widgets/{dropdown-editor.jsx → dropdown-editor.tsx} +27 -19
  258. package/src/widgets/{example-graphie-widget-editor.jsx → example-graphie-widget-editor.tsx} +8 -8
  259. package/src/widgets/{example-graphie-widget.jsx → example-graphie-widget.tsx} +14 -17
  260. package/src/widgets/{example-widget-editor.jsx → example-widget-editor.tsx} +10 -7
  261. package/src/widgets/{example-widget.jsx → example-widget.tsx} +14 -12
  262. package/src/widgets/{explanation-editor.jsx → explanation-editor.tsx} +12 -10
  263. package/src/widgets/{expression-editor.jsx → expression-editor.tsx} +36 -26
  264. package/src/widgets/{graded-group-editor.jsx → graded-group-editor.tsx} +18 -10
  265. package/src/widgets/{graded-group-set-editor.jsx → graded-group-set-editor.tsx} +15 -12
  266. package/src/widgets/{grapher-editor.jsx → grapher-editor.tsx} +10 -9
  267. package/src/widgets/{group-editor.jsx → group-editor.tsx} +11 -9
  268. package/src/widgets/{iframe-editor.jsx → iframe-editor.tsx} +16 -13
  269. package/src/widgets/{image-editor.jsx → image-editor.tsx} +4 -7
  270. package/src/widgets/{input-number-editor.jsx → input-number-editor.tsx} +61 -47
  271. package/src/widgets/interaction/{constraint-editor.jsx → constraint-editor.tsx} +21 -24
  272. package/src/widgets/{interaction-editor.jsx → interaction-editor.tsx} +160 -61
  273. package/src/widgets/{interactive-graph-editor.jsx → interactive-graph-editor.tsx} +13 -10
  274. package/src/widgets/label-image/__stories__/{answer-choices.stories.jsx → answer-choices.stories.tsx} +22 -17
  275. package/src/widgets/label-image/__stories__/{behavior.stories.jsx → behavior.stories.tsx} +9 -10
  276. package/src/widgets/label-image/__stories__/{marker.stories.jsx → marker.stories.tsx} +11 -12
  277. package/src/widgets/label-image/__stories__/{question-markers.stories.jsx → question-markers.stories.tsx} +17 -16
  278. package/src/widgets/label-image/__stories__/{select-image.stories.jsx → select-image.stories.tsx} +12 -13
  279. package/src/widgets/label-image/{answer-choices.jsx → answer-choices.tsx} +18 -18
  280. package/src/widgets/label-image/{behavior.jsx → behavior.tsx} +9 -11
  281. package/src/widgets/label-image/{marker.jsx → marker.tsx} +17 -19
  282. package/src/widgets/label-image/{question-markers.jsx → question-markers.tsx} +16 -21
  283. package/src/widgets/label-image/{select-image.jsx → select-image.tsx} +5 -7
  284. package/src/widgets/{label-image-editor.jsx → label-image-editor.tsx} +38 -44
  285. package/src/widgets/{lights-puzzle-editor.jsx → lights-puzzle-editor.tsx} +34 -24
  286. package/src/widgets/{matcher-editor.jsx → matcher-editor.tsx} +9 -7
  287. package/src/widgets/{matrix-editor.jsx → matrix-editor.tsx} +10 -9
  288. package/src/widgets/{measurer-editor.jsx → measurer-editor.tsx} +21 -14
  289. package/src/widgets/{molecule-editor.jsx → molecule-editor.tsx} +9 -8
  290. package/src/widgets/{number-line-editor.jsx → number-line-editor.tsx} +19 -17
  291. package/src/widgets/{numeric-input-editor.jsx → numeric-input-editor.tsx} +10 -10
  292. package/src/widgets/{orderer-editor.jsx → orderer-editor.tsx} +17 -12
  293. package/src/widgets/{passage-editor.jsx → passage-editor.tsx} +9 -7
  294. package/src/widgets/{passage-ref-editor.jsx → passage-ref-editor.tsx} +8 -6
  295. package/src/widgets/{passage-ref-target-editor.jsx → passage-ref-target-editor.tsx} +9 -7
  296. package/src/widgets/{plotter-editor.jsx → plotter-editor.tsx} +34 -33
  297. package/src/widgets/radio/{editor.jsx → editor.tsx} +22 -21
  298. package/src/widgets/{reaction-diagram-editor.jsx → reaction-diagram-editor.tsx} +14 -10
  299. package/src/widgets/{sequence-editor.jsx → sequence-editor.tsx} +13 -13
  300. package/src/widgets/{simple-markdown-tester-editor.jsx → simple-markdown-tester-editor.tsx} +11 -9
  301. package/src/widgets/{simple-markdown-tester.jsx → simple-markdown-tester.tsx} +8 -7
  302. package/src/widgets/{simulator-editor.jsx → simulator-editor.tsx} +10 -8
  303. package/src/widgets/{sorter-editor.jsx → sorter-editor.tsx} +8 -6
  304. package/src/widgets/{table-editor.jsx → table-editor.tsx} +11 -10
  305. package/src/widgets/{transformer-editor.jsx → transformer-editor.tsx} +37 -35
  306. package/src/widgets/{unit-editor.jsx → unit-editor.tsx} +31 -25
  307. package/src/widgets/{video-editor.jsx → video-editor.tsx} +8 -9
  308. package/tsconfig.json +22 -0
  309. package/tsconfig.tsbuildinfo +1 -0
  310. package/src/all-editors.js +0 -85
  311. package/src/all-widgets.js +0 -10
  312. /package/dist/{strings.js → strings} +0 -0
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable @babel/no-invalid-this, react/no-unsafe, react/sort-comp */
2
- // @flow
3
2
  import {
4
3
  components,
5
4
  Changeable,
@@ -16,9 +15,9 @@ import PropTypes from "prop-types";
16
15
  import * as React from "react";
17
16
  import _ from "underscore";
18
17
 
19
- import GraphSettings from "../components/graph-settings.jsx";
18
+ import GraphSettings from "../components/graph-settings";
20
19
 
21
- import ConstraintEditor from "./interaction/constraint-editor.jsx";
20
+ import ConstraintEditor from "./interaction/constraint-editor";
22
21
 
23
22
  const {MathInput, NumberInput, TextInput} = components;
24
23
  const {getDependencies} = Dependencies;
@@ -37,9 +36,9 @@ const defaultInteractionProps = {
37
36
  markings: "graph",
38
37
  },
39
38
  elements: [],
40
- };
39
+ } as const;
41
40
 
42
- type PointEditorProps = $FlowFixMe;
41
+ type PointEditorProps = any;
43
42
 
44
43
  //
45
44
  // Editor for non-interactive points
@@ -60,7 +59,7 @@ class PointEditor extends React.Component<PointEditorProps> {
60
59
  color: KhanColors.BLACK,
61
60
  };
62
61
 
63
- render(): React.Node {
62
+ render(): React.ReactNode {
64
63
  const {TeX} = getDependencies();
65
64
 
66
65
  return (
@@ -71,6 +70,7 @@ class PointEditor extends React.Component<PointEditorProps> {
71
70
  buttonSets={[]}
72
71
  buttonsVisible="never"
73
72
  value={this.props.coordX}
73
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
74
74
  onChange={this.change("coordX")}
75
75
  />
76
76
  <TeX>,</TeX>{" "}
@@ -78,6 +78,7 @@ class PointEditor extends React.Component<PointEditorProps> {
78
78
  buttonSets={[]}
79
79
  buttonsVisible="never"
80
80
  value={this.props.coordY}
81
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
81
82
  onChange={this.change("coordY")}
82
83
  />
83
84
  <TeX>\Large)</TeX>
@@ -85,6 +86,7 @@ class PointEditor extends React.Component<PointEditorProps> {
85
86
  <div className="perseus-widget-row">
86
87
  <ColorPicker
87
88
  value={this.props.color}
89
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
88
90
  onChange={this.change("color")}
89
91
  />
90
92
  </div>
@@ -92,7 +94,7 @@ class PointEditor extends React.Component<PointEditorProps> {
92
94
  );
93
95
  }
94
96
 
95
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
97
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
96
98
  return Changeable.change.apply(this, args);
97
99
  };
98
100
 
@@ -101,7 +103,7 @@ class PointEditor extends React.Component<PointEditorProps> {
101
103
  };
102
104
  }
103
105
 
104
- type LineEditorProps = $FlowFixMe;
106
+ type LineEditorProps = any;
105
107
 
106
108
  //
107
109
  // Editor for non-interactive line segments
@@ -132,7 +134,7 @@ class LineEditor extends React.Component<LineEditorProps> {
132
134
  strokeWidth: 2,
133
135
  };
134
136
 
135
- render(): React.Node {
137
+ render(): React.ReactNode {
136
138
  const {TeX} = getDependencies();
137
139
 
138
140
  return (
@@ -143,6 +145,7 @@ class LineEditor extends React.Component<LineEditorProps> {
143
145
  buttonSets={[]}
144
146
  buttonsVisible="never"
145
147
  value={this.props.startX}
148
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
146
149
  onChange={this.change("startX")}
147
150
  />
148
151
  <TeX>,</TeX>{" "}
@@ -150,6 +153,7 @@ class LineEditor extends React.Component<LineEditorProps> {
150
153
  buttonSets={[]}
151
154
  buttonsVisible="never"
152
155
  value={this.props.startY}
156
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
153
157
  onChange={this.change("startY")}
154
158
  />
155
159
  <TeX>\Large)</TeX>
@@ -160,6 +164,7 @@ class LineEditor extends React.Component<LineEditorProps> {
160
164
  buttonSets={[]}
161
165
  buttonsVisible="never"
162
166
  value={this.props.endX}
167
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
163
168
  onChange={this.change("endX")}
164
169
  />
165
170
  <TeX>,</TeX>{" "}
@@ -167,6 +172,7 @@ class LineEditor extends React.Component<LineEditorProps> {
167
172
  buttonSets={[]}
168
173
  buttonsVisible="never"
169
174
  value={this.props.endY}
175
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
170
176
  onChange={this.change("endY")}
171
177
  />
172
178
  <TeX>\Large)</TeX>
@@ -174,17 +180,20 @@ class LineEditor extends React.Component<LineEditorProps> {
174
180
  <div className="perseus-widget-row">
175
181
  <ColorPicker
176
182
  value={this.props.color}
183
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
177
184
  onChange={this.change("color")}
178
185
  />
179
186
  </div>
180
187
  <div className="perseus-widget-row">
181
188
  <DashPicker
182
189
  value={this.props.strokeDasharray}
190
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
183
191
  onChange={this.change("strokeDasharray")}
184
192
  />
185
193
  &nbsp; &nbsp;
186
194
  <ArrowPicker
187
195
  value={this.props.arrows}
196
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
188
197
  onChange={this.change("arrows")}
189
198
  />
190
199
  </div>
@@ -194,6 +203,7 @@ class LineEditor extends React.Component<LineEditorProps> {
194
203
  <NumberInput
195
204
  value={this.props.strokeWidth}
196
205
  placeholder={2}
206
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
197
207
  onChange={this.change("strokeWidth")}
198
208
  />
199
209
  </div>
@@ -202,7 +212,7 @@ class LineEditor extends React.Component<LineEditorProps> {
202
212
  );
203
213
  }
204
214
 
205
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
215
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
206
216
  return Changeable.change.apply(this, args);
207
217
  };
208
218
 
@@ -211,7 +221,7 @@ class LineEditor extends React.Component<LineEditorProps> {
211
221
  };
212
222
  }
213
223
 
214
- type MovablePointEditorProps = $FlowFixMe;
224
+ type MovablePointEditorProps = any;
215
225
 
216
226
  //
217
227
  // Editor for interactive movable points
@@ -241,7 +251,7 @@ class MovablePointEditor extends React.Component<MovablePointEditorProps> {
241
251
  constraintYMax: "10",
242
252
  };
243
253
 
244
- render(): React.Node {
254
+ render(): React.ReactNode {
245
255
  const {TeX} = getDependencies();
246
256
 
247
257
  return (
@@ -271,6 +281,7 @@ class MovablePointEditor extends React.Component<MovablePointEditorProps> {
271
281
  onChange={this.change("varSubscript")}
272
282
  />
273
283
  </div>
284
+ {/* @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call. */}
274
285
  <ConstraintEditor {...this.props} />
275
286
  </div>
276
287
  );
@@ -285,7 +296,7 @@ class MovablePointEditor extends React.Component<MovablePointEditorProps> {
285
296
  };
286
297
  }
287
298
 
288
- type MovableLineEditorProps = $FlowFixMe;
299
+ type MovableLineEditorProps = any;
289
300
 
290
301
  //
291
302
  // Editor for interactive movable line segments
@@ -319,7 +330,7 @@ class MovableLineEditor extends React.Component<MovableLineEditorProps> {
319
330
  constraintYMax: "10",
320
331
  };
321
332
 
322
- render(): React.Node {
333
+ render(): React.ReactNode {
323
334
  const {TeX} = getDependencies();
324
335
 
325
336
  return (
@@ -378,6 +389,7 @@ class MovableLineEditor extends React.Component<MovableLineEditorProps> {
378
389
  <div className="perseus-widget-row">
379
390
  All constraints are applied to the start point.
380
391
  </div>
392
+ {/* @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call. */}
381
393
  <ConstraintEditor {...this.props} />
382
394
  </div>
383
395
  );
@@ -392,7 +404,7 @@ class MovableLineEditor extends React.Component<MovableLineEditorProps> {
392
404
  };
393
405
  }
394
406
 
395
- type FunctionEditorProps = $FlowFixMe;
407
+ type FunctionEditorProps = any;
396
408
 
397
409
  //
398
410
  // Editor for function plots
@@ -419,7 +431,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
419
431
  strokeWidth: 2,
420
432
  };
421
433
 
422
- render(): React.Node {
434
+ render(): React.ReactNode {
423
435
  const {TeX} = getDependencies();
424
436
 
425
437
  return (
@@ -430,6 +442,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
430
442
  buttonSets={[]}
431
443
  buttonsVisible="never"
432
444
  value={this.props.value}
445
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
433
446
  onChange={this.change("value")}
434
447
  />
435
448
  </div>
@@ -439,6 +452,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
439
452
  buttonSets={[]}
440
453
  buttonsVisible="never"
441
454
  value={this.props.rangeMin}
455
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
442
456
  onChange={this.change("rangeMin")}
443
457
  />
444
458
  <TeX>,</TeX>{" "}
@@ -446,6 +460,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
446
460
  buttonSets={[]}
447
461
  buttonsVisible="never"
448
462
  value={this.props.rangeMax}
463
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
449
464
  onChange={this.change("rangeMax")}
450
465
  />
451
466
  <TeX>\Large)</TeX>
@@ -453,12 +468,14 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
453
468
  <div className="perseus-widget-row">
454
469
  <ColorPicker
455
470
  value={this.props.color}
471
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
456
472
  onChange={this.change("color")}
457
473
  />
458
474
  </div>
459
475
  <div className="perseus-widget-row">
460
476
  <DashPicker
461
477
  value={this.props.strokeDasharray}
478
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
462
479
  onChange={this.change("strokeDasharray")}
463
480
  />
464
481
  </div>
@@ -468,6 +485,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
468
485
  <NumberInput
469
486
  value={this.props.strokeWidth}
470
487
  placeholder={2}
488
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
471
489
  onChange={this.change("strokeWidth")}
472
490
  />
473
491
  </div>
@@ -476,7 +494,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
476
494
  );
477
495
  }
478
496
 
479
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
497
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
480
498
  return Changeable.change.apply(this, args);
481
499
  };
482
500
 
@@ -485,7 +503,7 @@ class FunctionEditor extends React.Component<FunctionEditorProps> {
485
503
  };
486
504
  }
487
505
 
488
- type ParametricEditorProps = $FlowFixMe;
506
+ type ParametricEditorProps = any;
489
507
 
490
508
  //
491
509
  // Editor for parametric plots
@@ -514,7 +532,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
514
532
  strokeWidth: 2,
515
533
  };
516
534
 
517
- render(): React.Node {
535
+ render(): React.ReactNode {
518
536
  const {TeX} = getDependencies();
519
537
 
520
538
  return (
@@ -525,6 +543,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
525
543
  buttonSets={[]}
526
544
  buttonsVisible="never"
527
545
  value={this.props.x}
546
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
528
547
  onChange={this.change("x")}
529
548
  />
530
549
  </div>
@@ -534,6 +553,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
534
553
  buttonSets={[]}
535
554
  buttonsVisible="never"
536
555
  value={this.props.y}
556
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
537
557
  onChange={this.change("y")}
538
558
  />
539
559
  </div>
@@ -543,6 +563,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
543
563
  buttonSets={[]}
544
564
  buttonsVisible="never"
545
565
  value={this.props.rangeMin}
566
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
546
567
  onChange={this.change("rangeMin")}
547
568
  />
548
569
  <TeX>,</TeX>{" "}
@@ -550,6 +571,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
550
571
  buttonSets={[]}
551
572
  buttonsVisible="never"
552
573
  value={this.props.rangeMax}
574
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
553
575
  onChange={this.change("rangeMax")}
554
576
  />
555
577
  <TeX>\Large)</TeX>
@@ -557,12 +579,14 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
557
579
  <div className="perseus-widget-row">
558
580
  <ColorPicker
559
581
  value={this.props.color}
582
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
560
583
  onChange={this.change("color")}
561
584
  />
562
585
  </div>
563
586
  <div className="perseus-widget-row">
564
587
  <DashPicker
565
588
  value={this.props.strokeDasharray}
589
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
566
590
  onChange={this.change("strokeDasharray")}
567
591
  />
568
592
  </div>
@@ -572,6 +596,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
572
596
  <NumberInput
573
597
  value={this.props.strokeWidth}
574
598
  placeholder={2}
599
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
575
600
  onChange={this.change("strokeWidth")}
576
601
  />
577
602
  </div>
@@ -580,7 +605,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
580
605
  );
581
606
  }
582
607
 
583
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
608
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
584
609
  return Changeable.change.apply(this, args);
585
610
  };
586
611
 
@@ -589,7 +614,7 @@ class ParametricEditor extends React.Component<ParametricEditorProps> {
589
614
  };
590
615
  }
591
616
 
592
- type LabelEditorProps = $FlowFixMe;
617
+ type LabelEditorProps = any;
593
618
 
594
619
  //
595
620
  // Editor for labels
@@ -613,7 +638,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
613
638
  label: "\\phi",
614
639
  };
615
640
 
616
- render(): React.Node {
641
+ render(): React.ReactNode {
617
642
  const {TeX} = getDependencies();
618
643
 
619
644
  return (
@@ -621,6 +646,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
621
646
  <div className="perseus-widget-row">
622
647
  <TextInput
623
648
  value={this.props.label}
649
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
624
650
  onChange={this.change("label")}
625
651
  style={{
626
652
  width: "100%",
@@ -633,6 +659,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
633
659
  buttonSets={[]}
634
660
  buttonsVisible="never"
635
661
  value={this.props.coordX}
662
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
636
663
  onChange={this.change("coordX")}
637
664
  />
638
665
  <TeX>,</TeX>{" "}
@@ -640,6 +667,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
640
667
  buttonSets={[]}
641
668
  buttonsVisible="never"
642
669
  value={this.props.coordY}
670
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
643
671
  onChange={this.change("coordY")}
644
672
  />
645
673
  <TeX>\Large)</TeX>
@@ -647,6 +675,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
647
675
  <div className="perseus-widget-row">
648
676
  <ColorPicker
649
677
  value={this.props.color}
678
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
650
679
  onChange={this.change("color")}
651
680
  />
652
681
  </div>
@@ -654,7 +683,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
654
683
  );
655
684
  }
656
685
 
657
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
686
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
658
687
  return Changeable.change.apply(this, args);
659
688
  };
660
689
 
@@ -663,7 +692,7 @@ class LabelEditor extends React.Component<LabelEditorProps> {
663
692
  };
664
693
  }
665
694
 
666
- type RectangleEditorProps = $FlowFixMe;
695
+ type RectangleEditorProps = any;
667
696
 
668
697
  //
669
698
  // Editor for rectangles
@@ -688,7 +717,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
688
717
  color: KhanColors.LIGHT_BLUE,
689
718
  };
690
719
 
691
- render(): React.Node {
720
+ render(): React.ReactNode {
692
721
  const {TeX} = getDependencies();
693
722
 
694
723
  return (
@@ -699,6 +728,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
699
728
  buttonSets={[]}
700
729
  buttonsVisible="never"
701
730
  value={this.props.coordX}
731
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
702
732
  onChange={this.change("coordX")}
703
733
  />
704
734
  <TeX>,</TeX>{" "}
@@ -706,6 +736,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
706
736
  buttonSets={[]}
707
737
  buttonsVisible="never"
708
738
  value={this.props.coordY}
739
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
709
740
  onChange={this.change("coordY")}
710
741
  />
711
742
  <TeX>\Large)</TeX>
@@ -716,6 +747,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
716
747
  buttonSets={[]}
717
748
  buttonsVisible="never"
718
749
  value={this.props.width}
750
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
719
751
  onChange={this.change("width")}
720
752
  />
721
753
  </div>
@@ -725,6 +757,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
725
757
  buttonSets={[]}
726
758
  buttonsVisible="never"
727
759
  value={this.props.height}
760
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
728
761
  onChange={this.change("height")}
729
762
  />
730
763
  </div>
@@ -732,6 +765,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
732
765
  <ColorPicker
733
766
  value={this.props.color}
734
767
  lightColors={true}
768
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
735
769
  onChange={this.change("color")}
736
770
  />
737
771
  </div>
@@ -742,7 +776,7 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
742
776
  );
743
777
  }
744
778
 
745
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
779
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
746
780
  return Changeable.change.apply(this, args);
747
781
  };
748
782
 
@@ -751,12 +785,12 @@ class RectangleEditor extends React.Component<RectangleEditorProps> {
751
785
  };
752
786
  }
753
787
 
754
- type InteractionEditorProps = $FlowFixMe;
755
- type InteractionEditorState = $FlowFixMe;
788
+ type InteractionEditorProps = any;
789
+ type InteractionEditorState = any;
756
790
 
757
791
  class InteractionEditor extends React.Component<
758
792
  InteractionEditorProps,
759
- InteractionEditorState,
793
+ InteractionEditorState
760
794
  > {
761
795
  // TODO(eater): Make more better
762
796
  static propTypes = {
@@ -766,7 +800,7 @@ class InteractionEditor extends React.Component<
766
800
  graph: PropTypes.objectOf(PropTypes.any),
767
801
  };
768
802
 
769
- static widgetName: "interaction" = "interaction";
803
+ static widgetName = "interaction" as const;
770
804
  static defaultProps: InteractionEditorProps = defaultInteractionProps;
771
805
 
772
806
  state: InteractionEditorState = {
@@ -781,9 +815,7 @@ class InteractionEditor extends React.Component<
781
815
  });
782
816
  }
783
817
 
784
- _getAllVarSubscripts(
785
- elements: $ReadOnlyArray<$FlowFixMe>,
786
- ): $ReadOnlyArray<$FlowFixMe> {
818
+ _getAllVarSubscripts(elements: ReadonlyArray<any>): ReadonlyArray<any> {
787
819
  return _.map(
788
820
  _.where(elements, {type: "movable-point"}),
789
821
  (element) => element.options.varSubscript,
@@ -802,18 +834,17 @@ class InteractionEditor extends React.Component<
802
834
  );
803
835
  }
804
836
 
805
- _getAllFunctionNames(
806
- elements: $ReadOnlyArray<$FlowFixMe>,
807
- ): $ReadOnlyArray<string> {
837
+ _getAllFunctionNames(elements: ReadonlyArray<any>): ReadonlyArray<string> {
808
838
  return _.map(
809
839
  _.where(elements, {type: "function"}),
810
840
  (element) => element.options.funcName,
811
841
  );
812
842
  }
813
843
 
814
- _updateGraphProps: ($FlowFixMe) => $FlowFixMe = (newProps) => {
844
+ _updateGraphProps: (arg1: any) => any = (newProps) => {
815
845
  // TODO(eater): GraphSettings should name this tickStep instead
816
846
  // of step. Grr..
847
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
817
848
  this.change({
818
849
  graph: _.extend(_.omit(newProps, "step"), {
819
850
  tickStep: newProps.step,
@@ -821,7 +852,9 @@ class InteractionEditor extends React.Component<
821
852
  });
822
853
  };
823
854
 
824
- _addNewElement: (SyntheticInputEvent<>) => void = (e) => {
855
+ _addNewElement: (arg1: React.ChangeEvent<HTMLInputElement>) => void = (
856
+ e,
857
+ ) => {
825
858
  const elementType = e.target.value;
826
859
  if (elementType === "") {
827
860
  return;
@@ -851,17 +884,20 @@ class InteractionEditor extends React.Component<
851
884
  : elementType === "rectangle"
852
885
  ? _.clone(RectangleEditor.defaultProps)
853
886
  : {},
854
- };
887
+ } as const;
855
888
 
856
889
  let nextSubscript;
857
890
  if (elementType === "movable-point") {
858
891
  nextSubscript =
859
892
  _.max([_.max(this.state.usedVarSubscripts), -1]) + 1;
893
+ // @ts-expect-error [FEI-5003] - TS2339 - Property 'varSubscript' does not exist on type '{}'.
860
894
  newElement.options.varSubscript = nextSubscript;
861
895
  } else if (elementType === "movable-line") {
862
896
  nextSubscript =
863
897
  _.max([_.max(this.state.usedVarSubscripts), -1]) + 1;
898
+ // @ts-expect-error [FEI-5003] - TS2339 - Property 'startSubscript' does not exist on type '{}'.
864
899
  newElement.options.startSubscript = nextSubscript;
900
+ // @ts-expect-error [FEI-5003] - TS2339 - Property 'endSubscript' does not exist on type '{}'.
865
901
  newElement.options.endSubscript = nextSubscript + 1;
866
902
  } else if (elementType === "function") {
867
903
  // TODO(eater): The 22nd function added will be {(x) since '{'
@@ -876,41 +912,47 @@ class InteractionEditor extends React.Component<
876
912
  "e".charCodeAt(0),
877
913
  ]) + 1,
878
914
  );
915
+ // @ts-expect-error [FEI-5003] - TS2339 - Property 'funcName' does not exist on type '{}'.
879
916
  newElement.options.funcName = nextLetter;
880
917
  }
918
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
881
919
  this.change({
882
920
  elements: this.props.elements.concat(newElement),
883
921
  });
884
922
  };
885
923
 
886
- _deleteElement: (number) => void = (index) => {
924
+ _deleteElement: (arg1: number) => void = (index) => {
887
925
  const element = this.props.elements[index];
926
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
888
927
  this.change({elements: _.without(this.props.elements, element)});
889
928
  };
890
929
 
891
- _moveElementUp: (number) => void = (index) => {
930
+ _moveElementUp: (arg1: number) => void = (index) => {
892
931
  const element = this.props.elements[index];
893
932
  const newElements = _.without(this.props.elements, element);
894
933
  newElements.splice(index - 1, 0, element);
934
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
895
935
  this.change({elements: newElements});
896
936
  };
897
937
 
898
- _moveElementDown: (number) => void = (index) => {
938
+ _moveElementDown: (arg1: number) => void = (index) => {
899
939
  const element = this.props.elements[index];
900
940
  const newElements = _.without(this.props.elements, element);
901
941
  newElements.splice(index + 1, 0, element);
942
+ // @ts-expect-error [FEI-5003] - TS2554 - Expected 3 arguments, but got 1.
902
943
  this.change({elements: newElements});
903
944
  };
904
945
 
905
- change: ($FlowFixMe, $FlowFixMe, $FlowFixMe) => $FlowFixMe = (...args) => {
946
+ change: (arg1: any, arg2: any, arg3: any) => any = (...args) => {
906
947
  return Changeable.change.apply(this, args);
907
948
  };
908
949
 
909
- render(): React.Node {
950
+ render(): React.ReactNode {
910
951
  const {TeX} = getDependencies();
911
952
 
912
953
  return (
913
954
  <div className="perseus-widget-interaction-editor">
955
+ {/* @ts-expect-error [FEI-5003] - TS2322 - Type '{ children: (false | Element)[]; title: string; }' is not assignable to type 'Pick<Readonly<ElementContainerProps> & Readonly<{ children?: ReactNode; }>, "children" | "onDelete" | "onDown" | "onUp">'. */}
914
956
  <ElementContainer title="Grid settings">
915
957
  <GraphSettings
916
958
  editableSettings={["canvas", "graph"]}
@@ -951,18 +993,23 @@ class InteractionEditor extends React.Component<
951
993
  onUp={
952
994
  n === 0
953
995
  ? null
954
- : this._moveElementUp.bind(this, n)
996
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
997
+ this._moveElementUp.bind(this, n)
955
998
  }
956
999
  // eslint-disable-next-line react/jsx-no-bind
957
1000
  onDown={
1001
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
958
1002
  n === this.props.elements.length - 1
959
1003
  ? null
960
- : this._moveElementDown.bind(
1004
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1005
+ this._moveElementDown.bind(
1006
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
961
1007
  this,
962
1008
  n,
963
1009
  )
964
1010
  }
965
1011
  // eslint-disable-next-line react/jsx-no-bind
1012
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
966
1013
  onDelete={this._deleteElement.bind(this, n)}
967
1014
  key={element.key}
968
1015
  >
@@ -971,6 +1018,7 @@ class InteractionEditor extends React.Component<
971
1018
  onChange={(newProps) => {
972
1019
  const elements = JSON.parse(
973
1020
  JSON.stringify(
1021
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
974
1022
  this.props.elements,
975
1023
  ),
976
1024
  );
@@ -978,6 +1026,7 @@ class InteractionEditor extends React.Component<
978
1026
  elements[n].options,
979
1027
  newProps,
980
1028
  );
1029
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
981
1030
  this.change({elements: elements});
982
1031
  }}
983
1032
  />
@@ -1015,18 +1064,23 @@ class InteractionEditor extends React.Component<
1015
1064
  onUp={
1016
1065
  n === 0
1017
1066
  ? null
1018
- : this._moveElementUp.bind(this, n)
1067
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1068
+ this._moveElementUp.bind(this, n)
1019
1069
  }
1020
1070
  // eslint-disable-next-line react/jsx-no-bind
1021
1071
  onDown={
1072
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1022
1073
  n === this.props.elements.length - 1
1023
1074
  ? null
1024
- : this._moveElementDown.bind(
1075
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1076
+ this._moveElementDown.bind(
1077
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1025
1078
  this,
1026
1079
  n,
1027
1080
  )
1028
1081
  }
1029
1082
  // eslint-disable-next-line react/jsx-no-bind
1083
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1030
1084
  onDelete={this._deleteElement.bind(this, n)}
1031
1085
  key={element.key}
1032
1086
  >
@@ -1035,6 +1089,7 @@ class InteractionEditor extends React.Component<
1035
1089
  onChange={(newProps) => {
1036
1090
  const elements = JSON.parse(
1037
1091
  JSON.stringify(
1092
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1038
1093
  this.props.elements,
1039
1094
  ),
1040
1095
  );
@@ -1042,6 +1097,7 @@ class InteractionEditor extends React.Component<
1042
1097
  elements[n].options,
1043
1098
  newProps,
1044
1099
  );
1100
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1045
1101
  this.change({elements: elements});
1046
1102
  }}
1047
1103
  />
@@ -1067,18 +1123,23 @@ class InteractionEditor extends React.Component<
1067
1123
  onUp={
1068
1124
  n === 0
1069
1125
  ? null
1070
- : this._moveElementUp.bind(this, n)
1126
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1127
+ this._moveElementUp.bind(this, n)
1071
1128
  }
1072
1129
  // eslint-disable-next-line react/jsx-no-bind
1073
1130
  onDown={
1131
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1074
1132
  n === this.props.elements.length - 1
1075
1133
  ? null
1076
- : this._moveElementDown.bind(
1134
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1135
+ this._moveElementDown.bind(
1136
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1077
1137
  this,
1078
1138
  n,
1079
1139
  )
1080
1140
  }
1081
1141
  // eslint-disable-next-line react/jsx-no-bind
1142
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1082
1143
  onDelete={this._deleteElement.bind(this, n)}
1083
1144
  key={element.key}
1084
1145
  >
@@ -1087,6 +1148,7 @@ class InteractionEditor extends React.Component<
1087
1148
  onChange={(newProps) => {
1088
1149
  const elements = JSON.parse(
1089
1150
  JSON.stringify(
1151
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1090
1152
  this.props.elements,
1091
1153
  ),
1092
1154
  );
@@ -1094,6 +1156,7 @@ class InteractionEditor extends React.Component<
1094
1156
  elements[n].options,
1095
1157
  newProps,
1096
1158
  );
1159
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1097
1160
  this.change({elements: elements});
1098
1161
  }}
1099
1162
  />
@@ -1127,18 +1190,23 @@ class InteractionEditor extends React.Component<
1127
1190
  onUp={
1128
1191
  n === 0
1129
1192
  ? null
1130
- : this._moveElementUp.bind(this, n)
1193
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1194
+ this._moveElementUp.bind(this, n)
1131
1195
  }
1132
1196
  // eslint-disable-next-line react/jsx-no-bind
1133
1197
  onDown={
1198
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1134
1199
  n === this.props.elements.length - 1
1135
1200
  ? null
1136
- : this._moveElementDown.bind(
1201
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1202
+ this._moveElementDown.bind(
1203
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1137
1204
  this,
1138
1205
  n,
1139
1206
  )
1140
1207
  }
1141
1208
  // eslint-disable-next-line react/jsx-no-bind
1209
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1142
1210
  onDelete={this._deleteElement.bind(this, n)}
1143
1211
  key={element.key}
1144
1212
  >
@@ -1147,6 +1215,7 @@ class InteractionEditor extends React.Component<
1147
1215
  onChange={(newProps) => {
1148
1216
  const elements = JSON.parse(
1149
1217
  JSON.stringify(
1218
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1150
1219
  this.props.elements,
1151
1220
  ),
1152
1221
  );
@@ -1154,6 +1223,7 @@ class InteractionEditor extends React.Component<
1154
1223
  elements[n].options,
1155
1224
  newProps,
1156
1225
  );
1226
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1157
1227
  this.change({elements: elements});
1158
1228
  }}
1159
1229
  />
@@ -1177,17 +1247,22 @@ class InteractionEditor extends React.Component<
1177
1247
  onUp={
1178
1248
  n === 0
1179
1249
  ? null
1180
- : this._moveElementUp.bind(this, n)
1250
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1251
+ this._moveElementUp.bind(this, n)
1181
1252
  }
1182
1253
  // eslint-disable-next-line react/jsx-no-bind
1183
1254
  onDown={
1255
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1184
1256
  n === this.props.elements.length - 1
1185
1257
  ? null
1186
- : this._moveElementDown.bind(
1258
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1259
+ this._moveElementDown.bind(
1260
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1187
1261
  this,
1188
1262
  n,
1189
1263
  )
1190
1264
  }
1265
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1191
1266
  onDelete={this._deleteElement}
1192
1267
  key={element.key}
1193
1268
  >
@@ -1196,6 +1271,7 @@ class InteractionEditor extends React.Component<
1196
1271
  onChange={(newProps) => {
1197
1272
  const elements = JSON.parse(
1198
1273
  JSON.stringify(
1274
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1199
1275
  this.props.elements,
1200
1276
  ),
1201
1277
  );
@@ -1203,6 +1279,7 @@ class InteractionEditor extends React.Component<
1203
1279
  elements[n].options,
1204
1280
  newProps,
1205
1281
  );
1282
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1206
1283
  this.change({elements: elements});
1207
1284
  }}
1208
1285
  />
@@ -1217,17 +1294,22 @@ class InteractionEditor extends React.Component<
1217
1294
  onUp={
1218
1295
  n === 0
1219
1296
  ? null
1220
- : this._moveElementUp.bind(this, n)
1297
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1298
+ this._moveElementUp.bind(this, n)
1221
1299
  }
1222
1300
  // eslint-disable-next-line react/jsx-no-bind
1223
1301
  onDown={
1302
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1224
1303
  n === this.props.elements.length - 1
1225
1304
  ? null
1226
- : this._moveElementDown.bind(
1305
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1306
+ this._moveElementDown.bind(
1307
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1227
1308
  this,
1228
1309
  n,
1229
1310
  )
1230
1311
  }
1312
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1231
1313
  onDelete={this._deleteElement}
1232
1314
  key={element.key}
1233
1315
  >
@@ -1236,6 +1318,7 @@ class InteractionEditor extends React.Component<
1236
1318
  onChange={(newProps) => {
1237
1319
  const elements = JSON.parse(
1238
1320
  JSON.stringify(
1321
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1239
1322
  this.props.elements,
1240
1323
  ),
1241
1324
  );
@@ -1243,6 +1326,7 @@ class InteractionEditor extends React.Component<
1243
1326
  elements[n].options,
1244
1327
  newProps,
1245
1328
  );
1329
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1246
1330
  this.change({elements: elements});
1247
1331
  }}
1248
1332
  />
@@ -1266,17 +1350,22 @@ class InteractionEditor extends React.Component<
1266
1350
  onUp={
1267
1351
  n === 0
1268
1352
  ? null
1269
- : this._moveElementUp.bind(this, n)
1353
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1354
+ this._moveElementUp.bind(this, n)
1270
1355
  }
1271
1356
  // eslint-disable-next-line react/jsx-no-bind
1272
1357
  onDown={
1358
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1273
1359
  n === this.props.elements.length - 1
1274
1360
  ? null
1275
- : this._moveElementDown.bind(
1361
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1362
+ this._moveElementDown.bind(
1363
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1276
1364
  this,
1277
1365
  n,
1278
1366
  )
1279
1367
  }
1368
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1280
1369
  onDelete={this._deleteElement}
1281
1370
  key={element.key}
1282
1371
  >
@@ -1285,6 +1374,7 @@ class InteractionEditor extends React.Component<
1285
1374
  onChange={(newProps) => {
1286
1375
  const elements = JSON.parse(
1287
1376
  JSON.stringify(
1377
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1288
1378
  this.props.elements,
1289
1379
  ),
1290
1380
  );
@@ -1292,6 +1382,7 @@ class InteractionEditor extends React.Component<
1292
1382
  elements[n].options,
1293
1383
  newProps,
1294
1384
  );
1385
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1295
1386
  this.change({elements: elements});
1296
1387
  }}
1297
1388
  />
@@ -1323,17 +1414,22 @@ class InteractionEditor extends React.Component<
1323
1414
  onUp={
1324
1415
  n === 0
1325
1416
  ? null
1326
- : this._moveElementUp.bind(this, n)
1417
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation. | TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1418
+ this._moveElementUp.bind(this, n)
1327
1419
  }
1328
1420
  // eslint-disable-next-line react/jsx-no-bind
1329
1421
  onDown={
1422
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1330
1423
  n === this.props.elements.length - 1
1331
1424
  ? null
1332
- : this._moveElementDown.bind(
1425
+ : // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1426
+ this._moveElementDown.bind(
1427
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1333
1428
  this,
1334
1429
  n,
1335
1430
  )
1336
1431
  }
1432
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1337
1433
  onDelete={this._deleteElement}
1338
1434
  key={element.key}
1339
1435
  >
@@ -1342,6 +1438,7 @@ class InteractionEditor extends React.Component<
1342
1438
  onChange={(newProps) => {
1343
1439
  const elements = JSON.parse(
1344
1440
  JSON.stringify(
1441
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1345
1442
  this.props.elements,
1346
1443
  ),
1347
1444
  );
@@ -1349,6 +1446,7 @@ class InteractionEditor extends React.Component<
1349
1446
  elements[n].options,
1350
1447
  newProps,
1351
1448
  );
1449
+ // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
1352
1450
  this.change({elements: elements});
1353
1451
  }}
1354
1452
  />
@@ -1359,6 +1457,7 @@ class InteractionEditor extends React.Component<
1359
1457
  this,
1360
1458
  )}
1361
1459
  <div className="perseus-widget-interaction-editor-select-element">
1460
+ {/* @ts-expect-error [FEI-5003] - TS2322 - Type '(arg1: ChangeEvent<HTMLInputElement>) => void' is not assignable to type 'ChangeEventHandler<HTMLSelectElement>'. */}
1362
1461
  <select onChange={this._addNewElement}>
1363
1462
  <option value="">Add an element{"\u2026"}</option>
1364
1463
  <option disabled>--</option>
@@ -1381,7 +1480,7 @@ class InteractionEditor extends React.Component<
1381
1480
  /* eslint-enable max-len */
1382
1481
  }
1383
1482
 
1384
- serialize: () => $FlowFixMe = () => {
1483
+ serialize: () => any = () => {
1385
1484
  return EditorJsonify.serialize.call(this);
1386
1485
  };
1387
1486
  }