@khanacademy/perseus-editor 2.6.0 → 2.6.2

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 (180) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/article-editor.d.ts +1 -2
  3. package/dist/components/form-wrapped-text-field.d.ts +1 -10
  4. package/dist/components/graph-points-count-selector.d.ts +1 -1
  5. package/dist/es/index.js +414 -436
  6. package/dist/es/index.js.map +1 -1
  7. package/dist/index.js +411 -435
  8. package/dist/index.js.map +1 -1
  9. package/dist/widgets/input-number-editor.d.ts +1 -2
  10. package/dist/widgets/interactive-graph-editor.d.ts +48 -47
  11. package/dist/widgets/plotter-editor.d.ts +47 -23
  12. package/package.json +12 -12
  13. package/src/__stories__/editor.stories.tsx +3 -1
  14. package/src/__tests__/i18n.test.ts +1 -1
  15. package/src/article-editor.tsx +13 -14
  16. package/src/components/checkbox.tsx +2 -1
  17. package/src/components/dropdown-option.tsx +13 -12
  18. package/src/components/form-wrapped-text-field.tsx +5 -2
  19. package/src/components/graph-points-count-selector.tsx +3 -1
  20. package/src/components/graph-settings.tsx +1 -1
  21. package/src/components/hover-behavior.ts +2 -2
  22. package/src/components/json-editor.tsx +2 -2
  23. package/src/components/sortable.tsx +1 -1
  24. package/src/components/util.ts +1 -1
  25. package/src/components/widget-editor.tsx +8 -7
  26. package/src/diffs/__tests__/structured-item-diff.test.ts +8 -8
  27. package/src/diffs/renderer-diff.tsx +3 -3
  28. package/src/diffs/split-diff.ts +2 -2
  29. package/src/diffs/structured-item-diff.tsx +11 -10
  30. package/src/diffs/text-diff.tsx +1 -1
  31. package/src/diffs/widget-diff.tsx +2 -2
  32. package/src/editor-page.tsx +8 -8
  33. package/src/editor.tsx +37 -36
  34. package/src/hint-editor.tsx +28 -27
  35. package/src/i18n.ts +4 -4
  36. package/src/iframe-content-renderer.tsx +10 -10
  37. package/src/item-editor.tsx +4 -4
  38. package/src/katex-mhchem/parser.js +24 -24
  39. package/src/multirenderer-editor.tsx +11 -11
  40. package/src/widgets/__stories__/label-image-editor.stories.tsx +1 -0
  41. package/src/widgets/__stories__/radio-editor.stories.tsx +1 -0
  42. package/src/widgets/categorizer-editor.tsx +3 -3
  43. package/src/widgets/cs-program-editor.tsx +2 -2
  44. package/src/widgets/definition-editor.tsx +3 -2
  45. package/src/widgets/dropdown-editor.tsx +9 -8
  46. package/src/widgets/example-graphie-widget-editor.tsx +1 -1
  47. package/src/widgets/example-graphie-widget.tsx +2 -2
  48. package/src/widgets/example-widget-editor.tsx +2 -2
  49. package/src/widgets/example-widget.tsx +4 -3
  50. package/src/widgets/explanation-editor.tsx +4 -3
  51. package/src/widgets/expression-editor.tsx +9 -9
  52. package/src/widgets/graded-group-editor.tsx +7 -6
  53. package/src/widgets/graded-group-set-editor.tsx +3 -3
  54. package/src/widgets/grapher-editor.tsx +3 -2
  55. package/src/widgets/group-editor.tsx +4 -3
  56. package/src/widgets/iframe-editor.tsx +5 -4
  57. package/src/widgets/input-number-editor.tsx +6 -6
  58. package/src/widgets/interaction-editor.tsx +103 -102
  59. package/src/widgets/interactive-graph-editor.tsx +12 -8
  60. package/src/widgets/label-image/marker.tsx +2 -1
  61. package/src/widgets/label-image/question-markers.tsx +1 -1
  62. package/src/widgets/lights-puzzle-editor.tsx +5 -4
  63. package/src/widgets/matrix-editor.tsx +2 -2
  64. package/src/widgets/measurer-editor.tsx +7 -6
  65. package/src/widgets/molecule-editor.tsx +2 -2
  66. package/src/widgets/number-line-editor.tsx +2 -1
  67. package/src/widgets/numeric-input-editor.tsx +2 -2
  68. package/src/widgets/orderer-editor.tsx +3 -2
  69. package/src/widgets/passage-editor.tsx +3 -3
  70. package/src/widgets/passage-ref-editor.tsx +4 -3
  71. package/src/widgets/passage-ref-target-editor.tsx +1 -1
  72. package/src/widgets/plotter-editor.tsx +253 -243
  73. package/src/widgets/radio/editor.tsx +3 -3
  74. package/src/widgets/reaction-diagram-editor.tsx +5 -5
  75. package/src/widgets/sequence-editor.tsx +1 -1
  76. package/src/widgets/simple-markdown-tester-editor.tsx +4 -3
  77. package/src/widgets/simple-markdown-tester.tsx +2 -2
  78. package/src/widgets/simulator-editor.tsx +1 -1
  79. package/src/widgets/sorter-editor.tsx +2 -1
  80. package/src/widgets/table-editor.tsx +1 -1
  81. package/src/widgets/transformer-editor.tsx +10 -10
  82. package/src/widgets/unit-editor.tsx +5 -5
  83. package/tsconfig-build.tsbuildinfo +1 -1
  84. package/dist/all-editors.js.flow +0 -8
  85. package/dist/all-widgets.js.flow +0 -34
  86. package/dist/article-editor.js.flow +0 -72
  87. package/dist/components/blur-input.js.flow +0 -25
  88. package/dist/components/checkbox.js.flow +0 -26
  89. package/dist/components/device-framer.js.flow +0 -20
  90. package/dist/components/drag-target.js.flow +0 -8
  91. package/dist/components/dropdown-option.js.flow +0 -49
  92. package/dist/components/form-wrapped-text-field.js.flow +0 -45
  93. package/dist/components/graph-points-count-selector.js.flow +0 -12
  94. package/dist/components/graph-settings.js.flow +0 -8
  95. package/dist/components/graph-type-selector.js.flow +0 -12
  96. package/dist/components/hover-behavior.js.flow +0 -48
  97. package/dist/components/json-editor.js.flow +0 -8
  98. package/dist/components/link.js.flow +0 -50
  99. package/dist/components/section-control-button.js.flow +0 -25
  100. package/dist/components/segment-count-selector.js.flow +0 -11
  101. package/dist/components/simple-button.js.flow +0 -18
  102. package/dist/components/sortable.js.flow +0 -8
  103. package/dist/components/util.js.flow +0 -9
  104. package/dist/components/viewport-resizer.js.flow +0 -22
  105. package/dist/components/widget-editor.js.flow +0 -91
  106. package/dist/components/widget-select.js.flow +0 -16
  107. package/dist/diffs/article-diff.js.flow +0 -71
  108. package/dist/diffs/item-diff.js.flow +0 -41
  109. package/dist/diffs/renderer-diff.js.flow +0 -25
  110. package/dist/diffs/split-diff.js.flow +0 -8
  111. package/dist/diffs/string-array-diff.js.flow +0 -11
  112. package/dist/diffs/structured-item-diff.js.flow +0 -37
  113. package/dist/diffs/tags-diff.js.flow +0 -24
  114. package/dist/diffs/text-diff.js.flow +0 -21
  115. package/dist/diffs/widget-diff-performer.js.flow +0 -8
  116. package/dist/diffs/widget-diff.js.flow +0 -31
  117. package/dist/editor-page.js.flow +0 -72
  118. package/dist/editor.js.flow +0 -96
  119. package/dist/hint-editor.js.flow +0 -87
  120. package/dist/i18n.js.flow +0 -13
  121. package/dist/iframe-content-renderer.js.flow +0 -28
  122. package/dist/index.js.flow +0 -23
  123. package/dist/item-editor.js.flow +0 -46
  124. package/dist/item-extras-editor.js.flow +0 -23
  125. package/dist/katex-error-view.js.flow +0 -24
  126. package/dist/multirenderer-editor.js.flow +0 -46
  127. package/dist/stateful-article-editor.js.flow +0 -16
  128. package/dist/stateful-editor-page.js.flow +0 -8
  129. package/dist/testing-widgets.js.flow +0 -34
  130. package/dist/util/points.js.flow +0 -9
  131. package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +0 -7
  132. package/dist/widgets/categorizer-editor.js.flow +0 -62
  133. package/dist/widgets/cs-program-editor.js.flow +0 -25
  134. package/dist/widgets/definition-editor.js.flow +0 -23
  135. package/dist/widgets/dropdown-editor.js.flow +0 -37
  136. package/dist/widgets/example-graphie-widget-editor.js.flow +0 -25
  137. package/dist/widgets/example-graphie-widget.js.flow +0 -102
  138. package/dist/widgets/example-widget-editor.js.flow +0 -26
  139. package/dist/widgets/example-widget.js.flow +0 -86
  140. package/dist/widgets/explanation-editor.js.flow +0 -27
  141. package/dist/widgets/expression-editor.js.flow +0 -43
  142. package/dist/widgets/graded-group-editor.js.flow +0 -68
  143. package/dist/widgets/graded-group-set-editor.js.flow +0 -66
  144. package/dist/widgets/grapher-editor.js.flow +0 -21
  145. package/dist/widgets/group-editor.js.flow +0 -64
  146. package/dist/widgets/iframe-editor.js.flow +0 -24
  147. package/dist/widgets/image-editor.js.flow +0 -8
  148. package/dist/widgets/input-number-editor.js.flow +0 -77
  149. package/dist/widgets/interaction/constraint-editor.js.flow +0 -35
  150. package/dist/widgets/interaction-editor.js.flow +0 -36
  151. package/dist/widgets/interactive-graph-editor.js.flow +0 -5803
  152. package/dist/widgets/label-image/answer-choices.js.flow +0 -16
  153. package/dist/widgets/label-image/behavior.js.flow +0 -17
  154. package/dist/widgets/label-image/marker.js.flow +0 -32
  155. package/dist/widgets/label-image/question-markers.js.flow +0 -23
  156. package/dist/widgets/label-image/select-image.js.flow +0 -13
  157. package/dist/widgets/label-image-editor.js.flow +0 -44
  158. package/dist/widgets/lights-puzzle-editor.js.flow +0 -34
  159. package/dist/widgets/matcher-editor.js.flow +0 -28
  160. package/dist/widgets/matrix-editor.js.flow +0 -26
  161. package/dist/widgets/measurer-editor.js.flow +0 -42
  162. package/dist/widgets/molecule-editor.js.flow +0 -23
  163. package/dist/widgets/number-line-editor.js.flow +0 -45
  164. package/dist/widgets/numeric-input-editor.js.flow +0 -8
  165. package/dist/widgets/orderer-editor.js.flow +0 -30
  166. package/dist/widgets/passage-editor.js.flow +0 -24
  167. package/dist/widgets/passage-ref-editor.js.flow +0 -17
  168. package/dist/widgets/passage-ref-target-editor.js.flow +0 -22
  169. package/dist/widgets/plotter-editor.js.flow +0 -53
  170. package/dist/widgets/radio/editor.js.flow +0 -81
  171. package/dist/widgets/reaction-diagram-editor.js.flow +0 -26
  172. package/dist/widgets/sequence-editor.js.flow +0 -73
  173. package/dist/widgets/simple-markdown-tester-editor.js.flow +0 -23
  174. package/dist/widgets/simple-markdown-tester.js.flow +0 -61
  175. package/dist/widgets/simulator-editor.js.flow +0 -26
  176. package/dist/widgets/sorter-editor.js.flow +0 -22
  177. package/dist/widgets/table-editor.js.flow +0 -24
  178. package/dist/widgets/transformer-editor.js.flow +0 -17
  179. package/dist/widgets/unit-editor.js.flow +0 -41
  180. package/dist/widgets/video-editor.js.flow +0 -25
@@ -8,7 +8,6 @@ import {
8
8
  components,
9
9
  icons,
10
10
  ApiOptions,
11
- Changeable,
12
11
  Errors,
13
12
  PerseusError,
14
13
  } from "@khanacademy/perseus";
@@ -21,7 +20,7 @@ import SectionControlButton from "./components/section-control-button";
21
20
  import Editor from "./editor";
22
21
  import IframeContentRenderer from "./iframe-content-renderer";
23
22
 
24
- import type {APIOptions} from "@khanacademy/perseus";
23
+ import type {APIOptions, Changeable} from "@khanacademy/perseus";
25
24
 
26
25
  const {HUD, InlineIcon} = components;
27
26
  const {iconCircleArrowDown, iconCircleArrowUp, iconPlus, iconTrash} = icons;
@@ -78,7 +77,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
78
77
  _updatePreviewFrames() {
79
78
  if (this.props.mode === "preview") {
80
79
  // eslint-disable-next-line react/no-string-refs
81
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
80
+ // @ts-expect-error - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
82
81
  this.refs["frame-all"].sendNewData({
83
82
  type: "article-all",
84
83
  data: this._sections().map((section, i) => {
@@ -88,7 +87,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
88
87
  } else if (this.props.mode === "edit") {
89
88
  this._sections().forEach((section, i) => {
90
89
  // eslint-disable-next-line react/no-string-refs
91
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
90
+ // @ts-expect-error - TS2339 - Property 'sendNewData' does not exist on type 'ReactInstance'.
92
91
  this.refs["frame-" + i].sendNewData({
93
92
  type: "article",
94
93
  data: this._apiOptionsForSection(section, i),
@@ -117,7 +116,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
117
116
  highlightLint: this.state.highlightLint,
118
117
  paths: this.props.contentPaths,
119
118
  },
120
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
119
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
121
120
  legacyPerseusLint: editor ? editor.getSaveWarnings() : [],
122
121
  };
123
122
  }
@@ -304,7 +303,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
304
303
  newProps,
305
304
  ) => {
306
305
  const sections = _.clone(this._sections());
307
- // @ts-expect-error [FEI-5003] - TS2542 - Index signature in type 'readonly RendererProps[]' only permits reading.
306
+ // @ts-expect-error - TS2542 - Index signature in type 'readonly RendererProps[]' only permits reading.
308
307
  sections[i] = _.extend({}, sections[i], newProps);
309
308
  this.props.onChange({json: sections});
310
309
  };
@@ -315,9 +314,9 @@ export default class ArticleEditor extends React.Component<Props, State> {
315
314
  }
316
315
  const sections = _.clone(this._sections());
317
316
  const section = sections[i];
318
- // @ts-expect-error [FEI-5003] - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
317
+ // @ts-expect-error - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
319
318
  sections.splice(i, 1);
320
- // @ts-expect-error [FEI-5003] - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
319
+ // @ts-expect-error - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
321
320
  sections.splice(i - 1, 0, section);
322
321
  this.props.onChange({
323
322
  json: sections,
@@ -330,9 +329,9 @@ export default class ArticleEditor extends React.Component<Props, State> {
330
329
  return;
331
330
  }
332
331
  const section = sections[i];
333
- // @ts-expect-error [FEI-5003] - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
332
+ // @ts-expect-error - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
334
333
  sections.splice(i, 1);
335
- // @ts-expect-error [FEI-5003] - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
334
+ // @ts-expect-error - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
336
335
  sections.splice(i + 1, 0, section);
337
336
  this.props.onChange({
338
337
  json: sections,
@@ -355,7 +354,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
355
354
  widgets: sections[i].widgets,
356
355
  }
357
356
  : {};
358
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'splice' does not exist on type 'JsonType'.
357
+ // @ts-expect-error - TS2339 - Property 'splice' does not exist on type 'JsonType'.
359
358
  sections.splice(i + 1, 0, newSection);
360
359
  this.props.onChange({
361
360
  json: sections,
@@ -364,7 +363,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
364
363
 
365
364
  _handleRemoveSection(i: number) {
366
365
  const sections = _.clone(this._sections());
367
- // @ts-expect-error [FEI-5003] - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
366
+ // @ts-expect-error - TS2551 - Property 'splice' does not exist on type 'readonly RendererProps[]'. Did you mean 'slice'?
368
367
  sections.splice(i, 1);
369
368
  this.props.onChange({
370
369
  json: sections,
@@ -375,7 +374,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
375
374
  if (this.props.mode === "edit") {
376
375
  return this._sections().map((section, i) => {
377
376
  // eslint-disable-next-line react/no-string-refs
378
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
377
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
379
378
  return this.refs["editor" + i].serialize();
380
379
  });
381
380
  }
@@ -406,7 +405,7 @@ export default class ArticleEditor extends React.Component<Props, State> {
406
405
 
407
406
  return this._sections().map((section, i) => {
408
407
  // eslint-disable-next-line react/no-string-refs
409
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
408
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
410
409
  return this.refs["editor" + i].getSaveWarnings();
411
410
  });
412
411
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
1
2
  /**
2
3
  * Reusable checkbox component.
3
4
  **/
@@ -130,7 +131,7 @@ export default class Checkbox extends React.Component<CheckboxProps> {
130
131
  )}
131
132
  disabled={disabled}
132
133
  onChange={onChange}
133
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'string | number | undefined' is not assignable to type 'number | undefined'.
134
+ // @ts-expect-error - TS2322 - Type 'string | number | undefined' is not assignable to type 'number | undefined'.
134
135
  tabIndex={tabIndex}
135
136
  />
136
137
  </div>
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
1
2
  /**
2
3
  * The Option is an item to be used in the Select components and the
3
4
  * derivations such as MultiSelect, CheckList, and CheckBoxList. Also includes
@@ -25,7 +26,7 @@ const findAndFocusElement = (component?: Element | null) => {
25
26
  const DOMNode: Element | Text | null | undefined =
26
27
  ReactDOM.findDOMNode(component);
27
28
  const button = DOMNode as HTMLInputElement;
28
- // @ts-expect-error [FEI-5003] - TS2774 - This condition will always return true since this function is always defined. Did you mean to call it instead?
29
+ // @ts-expect-error - TS2774 - This condition will always return true since this function is always defined. Did you mean to call it instead?
29
30
  if (button.focus) {
30
31
  focusWithChromeStickyFocusBugWorkaround(button);
31
32
  }
@@ -66,7 +67,7 @@ const check = `M10,3.8C10,4,9.9,4.2,9.8,4.3L5.1,8.9L4.3,9.8C4.2,9.9,4,10,3.8,10
66
67
  export const optionHeight = 30;
67
68
 
68
69
  class Option extends React.Component<Props> {
69
- // @ts-expect-error [FEI-5003] - TS2564 - Property 'node' has no initializer and is not definitely assigned in the constructor.
70
+ // @ts-expect-error - TS2564 - Property 'node' has no initializer and is not definitely assigned in the constructor.
70
71
  node: HTMLDivElement;
71
72
 
72
73
  handleKeyDown(event: any): void {
@@ -113,7 +114,7 @@ class Option extends React.Component<Props> {
113
114
 
114
115
  return (
115
116
  <button
116
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'HTMLButtonElement | null' is not assignable to type 'HTMLDivElement'.
117
+ // @ts-expect-error - TS2322 - Type 'HTMLButtonElement | null' is not assignable to type 'HTMLDivElement'.
117
118
  ref={(node) => (this.node = node)}
118
119
  value={value}
119
120
  role="menuitemradio"
@@ -123,14 +124,14 @@ class Option extends React.Component<Props> {
123
124
  disabled && styles.cursorDefault,
124
125
  hideFocusState && styles.noFocus,
125
126
  )}
126
- // @ts-expect-error [FEI-5003] - TS2322 - Type '(value: string) => void' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'.
127
+ // @ts-expect-error - TS2322 - Type '(value: string) => void' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'.
127
128
  onClick={(value: string) => {
128
129
  if (!disabled && onClick) {
129
- // @ts-expect-error [FEI-5003] - TS2554 - Expected 0 arguments, but got 1.
130
+ // @ts-expect-error - TS2554 - Expected 0 arguments, but got 1.
130
131
  onClick(value);
131
132
  }
132
133
  }}
133
- // @ts-expect-error [FEI-5003] - TS2322 - Type '(event: KeyboardEvent) => void' is not assignable to type 'KeyboardEventHandler<HTMLButtonElement>'.
134
+ // @ts-expect-error - TS2322 - Type '(event: KeyboardEvent) => void' is not assignable to type 'KeyboardEventHandler<HTMLButtonElement>'.
134
135
  onKeyDown={(event: KeyboardEvent) => this.handleKeyDown(event)}
135
136
  aria-disabled={disabled}
136
137
  aria-label={ariaLabel}
@@ -192,7 +193,7 @@ class OptionGroup extends React.Component<{
192
193
  // they're focused on in order to interact with the product!
193
194
  hideFocusState?: boolean;
194
195
  }> {
195
- // @ts-expect-error [FEI-5003] - TS2564 - Property 'focusedElement' has no initializer and is not definitely assigned in the constructor.
196
+ // @ts-expect-error - TS2564 - Property 'focusedElement' has no initializer and is not definitely assigned in the constructor.
196
197
  focusedElement: Element;
197
198
 
198
199
  componentDidMount() {
@@ -214,7 +215,7 @@ class OptionGroup extends React.Component<{
214
215
 
215
216
  return (
216
217
  <div
217
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'Window | null' is not assignable to type 'Top<string | number> | undefined'.
218
+ // @ts-expect-error - TS2322 - Type 'Window | null' is not assignable to type 'Top<string | number> | undefined'.
218
219
  style={{top}}
219
220
  className={css(
220
221
  styles.optionGroup,
@@ -222,7 +223,7 @@ class OptionGroup extends React.Component<{
222
223
  )}
223
224
  >
224
225
  {React.Children.map(children, (child, index) => {
225
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
226
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
226
227
  const selected = selectedValues.includes(child.props.value);
227
228
 
228
229
  const reference =
@@ -230,13 +231,13 @@ class OptionGroup extends React.Component<{
230
231
  ? (node: Element) => (this.focusedElement = node)
231
232
  : null;
232
233
 
233
- // @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
234
+ // @ts-expect-error - TS2769 - No overload matches this call.
234
235
  return React.cloneElement(child, {
235
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
236
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
236
237
  ...child.props,
237
238
  key: index,
238
239
  selected: selected,
239
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
240
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
240
241
  onClick: () => onSelected(child.props.value),
241
242
  optionRenderer: optionRenderer,
242
243
  ref: reference,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
1
2
  /**
2
3
  * DEPRECATED: Use <TextField> from ./text-field.jsx instead.
3
4
  *
@@ -7,11 +8,13 @@
7
8
  * If you need to handle `onSubmit`, please use <TextField> directly with your
8
9
  * own <form> that wraps all text fields in the form.
9
10
  **/
10
- import {globalStyles, components} from "@khanacademy/perseus";
11
+ import {globalStyles} from "@khanacademy/perseus";
11
12
  import Color from "@khanacademy/wonder-blocks-color";
12
13
  import {StyleSheet, css} from "aphrodite";
13
14
  import * as React from "react";
14
15
 
16
+ import type {components} from "@khanacademy/perseus";
17
+
15
18
  type Props = {
16
19
  // This id is used to tie the input field to the label that describes it.
17
20
  // TODO(diedra): Instead of passing in this id to connect the label and input
@@ -164,7 +167,7 @@ class FormWrappedTextField extends React.Component<PropsWithForwardRef, State> {
164
167
  <form
165
168
  className={css(...spanStyle)}
166
169
  style={extraStyles}
167
- // @ts-expect-error [FEI-5003] - TS2322 - Type '((arg1: ChangeEvent<HTMLInputElement>) => unknown) | ((e: Event) => void)' is not assignable to type 'FormEventHandler<HTMLFormElement> | undefined'.
170
+ // @ts-expect-error - TS2322 - Type '((arg1: ChangeEvent<HTMLInputElement>) => unknown) | ((e: Event) => void)' is not assignable to type 'FormEventHandler<HTMLFormElement> | undefined'.
168
171
  onSubmit={onSubmit || this.disableDefault}
169
172
  >
170
173
  {leftSideIcon && wrappedIcon}
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
 
3
- import {PointValue, UNLIMITED, parsePointCount} from "../util/points";
3
+ import {UNLIMITED, parsePointCount} from "../util/points";
4
+
5
+ import type {PointValue} from "../util/points";
4
6
 
5
7
  const GraphPointsCountSelector = ({
6
8
  numPoints = 1,
@@ -151,7 +151,7 @@ const GraphSettings = createReactClass({
151
151
  );
152
152
  };
153
153
 
154
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
154
+ // @ts-expect-error - TS2531 - Object is possibly 'null'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
155
155
  const url = ReactDOM.findDOMNode(this.refs["bg-url"]).value; // eslint-disable-line react/no-string-refs
156
156
  if (url) {
157
157
  Util.getImageSize(url, (width, height) => {
@@ -87,9 +87,9 @@ export default class HoverBehavior extends React.Component<Props, State> {
87
87
  };
88
88
  }
89
89
 
90
- // @ts-expect-error [FEI-5003] - TS2564 - Property 'focusFlag' has no initializer and is not definitely assigned in the constructor.
90
+ // @ts-expect-error - TS2564 - Property 'focusFlag' has no initializer and is not definitely assigned in the constructor.
91
91
  focusFlag: boolean;
92
- // @ts-expect-error [FEI-5003] - TS2564 - Property 'waitingForClick' has no initializer and is not definitely assigned in the constructor.
92
+ // @ts-expect-error - TS2564 - Property 'waitingForClick' has no initializer and is not definitely assigned in the constructor.
93
93
  waitingForClick: boolean;
94
94
 
95
95
  handleClick: (e: React.MouseEvent) => void = (e: React.MouseEvent) => {
@@ -74,7 +74,7 @@ const JsonEditor: any = createReactClass({
74
74
  valid: true,
75
75
  },
76
76
  function () {
77
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
77
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
78
78
  this.props.onChange(json);
79
79
  },
80
80
  );
@@ -105,7 +105,7 @@ const JsonEditor: any = createReactClass({
105
105
  valid: true,
106
106
  },
107
107
  function () {
108
- // @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
108
+ // @ts-expect-error - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
109
109
  this.props.onChange(json);
110
110
  },
111
111
  );
@@ -79,7 +79,7 @@ const SortableArea = createReactClass({
79
79
  _setDragEvents: function () {
80
80
  this._dragItems = this._dragItems || [];
81
81
  const items =
82
- // @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'
82
+ // @ts-expect-error - TS2531 - Object is possibly 'null'
83
83
  ReactDOM.findDOMNode(this).querySelectorAll("[draggable=true]");
84
84
 
85
85
  const oldItems: Array<HTMLElement> = [];
@@ -33,6 +33,6 @@ export function focusWithChromeStickyFocusBugWorkaround(element: Element) {
33
33
  // this is an issue, however, so there isn't currently a way to out of the
34
34
  // `preventScroll` behavior.
35
35
 
36
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'Element'.
36
+ // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'Element'.
37
37
  element.focus({preventScroll: true});
38
38
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
1
2
  import {
2
3
  components,
3
4
  icons,
@@ -35,7 +36,7 @@ const _upgradeWidgetInfo = (props: WidgetEditorProps): React.ReactElement => {
35
36
  // We can't call serialize here because this.refs.widget
36
37
  // doesn't exist before this component is mounted.
37
38
  const filteredProps = _.omit(props, WIDGET_PROP_DENYLIST);
38
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'PerseusWidget' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'. | TS2345 - Argument of type 'Partial<{ id: string; onChange: (widgetInfo: PerseusWidget, cb?: (() => unknown) | undefined, silent?: boolean | undefined) => unknown; onRemove: () => unknown; apiOptions: any; } & CategorizerWidget & { ...; }> | ... 38 more ... | Partial<...>' is not assignable to parameter of type 'PerseusWidget'.
39
+ // @ts-expect-error - TS2322 - Type 'PerseusWidget' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>>'. | TS2345 - Argument of type 'Partial<{ id: string; onChange: (widgetInfo: PerseusWidget, cb?: (() => unknown) | undefined, silent?: boolean | undefined) => unknown; onRemove: () => unknown; apiOptions: any; } & CategorizerWidget & { ...; }> | ... 38 more ... | Partial<...>' is not assignable to parameter of type 'PerseusWidget'.
39
40
  return Widgets.upgradeWidgetInfoToLatestVersion(filteredProps);
40
41
  };
41
42
 
@@ -52,13 +53,13 @@ class WidgetEditor extends React.Component<
52
53
  super(props);
53
54
  this.state = {
54
55
  showWidget: false,
55
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'ReactElement<any, any> | null' is not assignable to type 'PerseusWidget'.
56
+ // @ts-expect-error - TS2322 - Type 'ReactElement<any, any> | null' is not assignable to type 'PerseusWidget'.
56
57
  widgetInfo: _upgradeWidgetInfo(props),
57
58
  };
58
59
  }
59
60
 
60
61
  UNSAFE_componentWillReceiveProps(nextProps: WidgetEditorProps) {
61
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'ReactElement<any, any> | null' is not assignable to type 'PerseusWidget'.
62
+ // @ts-expect-error - TS2322 - Type 'ReactElement<any, any> | null' is not assignable to type 'PerseusWidget'.
62
63
  this.setState({widgetInfo: _upgradeWidgetInfo(nextProps)});
63
64
  }
64
65
 
@@ -78,7 +79,7 @@ class WidgetEditor extends React.Component<
78
79
  ) as WidgetInfo;
79
80
  newWidgetInfo.options = Object.assign(
80
81
  // eslint-disable-next-line react/no-string-refs
81
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
82
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
82
83
  this.refs.widget.serialize(),
83
84
  newProps,
84
85
  );
@@ -105,7 +106,7 @@ class WidgetEditor extends React.Component<
105
106
 
106
107
  getSaveWarnings = () => {
107
108
  // eslint-disable-next-line react/no-string-refs
108
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
109
+ // @ts-expect-error - TS2339 - Property 'getSaveWarnings' does not exist on type 'ReactInstance'.
109
110
  const issuesFunc = this.refs.widget.getSaveWarnings;
110
111
  return issuesFunc ? issuesFunc() : [];
111
112
  };
@@ -121,7 +122,7 @@ class WidgetEditor extends React.Component<
121
122
  static: widgetInfo.static,
122
123
  graded: widgetInfo.graded,
123
124
  // eslint-disable-next-line react/no-string-refs
124
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
125
+ // @ts-expect-error - TS2339 - Property 'serialize' does not exist on type 'ReactInstance'.
125
126
  options: this.refs.widget.serialize(),
126
127
  version: widgetInfo.version,
127
128
  };
@@ -177,7 +178,7 @@ class WidgetEditor extends React.Component<
177
178
  {supportsStaticMode && (
178
179
  <input
179
180
  type="button"
180
- // @ts-expect-error [FEI-5003] - TS2322 - Type '(e: Event) => void' is not assignable to type 'MouseEventHandler<HTMLInputElement>'.
181
+ // @ts-expect-error - TS2322 - Type '(e: Event) => void' is not assignable to type 'MouseEventHandler<HTMLInputElement>'.
181
182
  onClick={this._toggleStatic}
182
183
  className="simple-button--small"
183
184
  value={
@@ -62,7 +62,7 @@ describe("StructuredItemDiff", function () {
62
62
 
63
63
  const addingResult: Array<Path> = [];
64
64
  StructuredItemDiff.generateCompletePathsList(
65
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
65
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
66
66
  beforeList.slice(),
67
67
  afterList.slice(),
68
68
  addingResult,
@@ -72,7 +72,7 @@ describe("StructuredItemDiff", function () {
72
72
 
73
73
  const removingResult = [];
74
74
  StructuredItemDiff.generateCompletePathsList(
75
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
75
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
76
76
  afterList,
77
77
  beforeList,
78
78
  removingResult,
@@ -179,7 +179,7 @@ describe("StructuredItemDiff", function () {
179
179
 
180
180
  const firstResult: Array<Path> = [];
181
181
  StructuredItemDiff.generateCompletePathsList(
182
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
182
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
183
183
  beforeList.slice(),
184
184
  afterList.slice(),
185
185
  firstResult,
@@ -189,7 +189,7 @@ describe("StructuredItemDiff", function () {
189
189
 
190
190
  const secondResult = [];
191
191
  StructuredItemDiff.generateCompletePathsList(
192
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
192
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
193
193
  afterList,
194
194
  beforeList,
195
195
  secondResult,
@@ -301,7 +301,7 @@ describe("StructuredItemDiff", function () {
301
301
 
302
302
  const firstResult: Array<Path> = [];
303
303
  StructuredItemDiff.generateCompletePathsList(
304
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
304
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
305
305
  beforeList.slice(),
306
306
  afterList.slice(),
307
307
  firstResult,
@@ -311,7 +311,7 @@ describe("StructuredItemDiff", function () {
311
311
 
312
312
  const secondResult: Array<Path> = [];
313
313
  StructuredItemDiff.generateCompletePathsList(
314
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
314
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
315
315
  afterList,
316
316
  beforeList,
317
317
  secondResult,
@@ -398,7 +398,7 @@ describe("StructuredItemDiff", function () {
398
398
 
399
399
  const firstResult = [];
400
400
  StructuredItemDiff.generateCompletePathsList(
401
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
401
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
402
402
  beforeList.slice(),
403
403
  afterList.slice(),
404
404
  firstResult,
@@ -408,7 +408,7 @@ describe("StructuredItemDiff", function () {
408
408
 
409
409
  const secondResult = [];
410
410
  StructuredItemDiff.generateCompletePathsList(
411
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
411
+ // @ts-expect-error - TS2345 - Argument of type 'any[][]' is not assignable to parameter of type 'ItemList[]'.
412
412
  afterList,
413
413
  beforeList,
414
414
  secondResult,
@@ -21,17 +21,17 @@ const filterWidgetInfo = function (widgetInfo, showAlignmentOptions: boolean) {
21
21
  showAlignmentOptions &&
22
22
  Widgets.getSupportedAlignments(type).length > 1
23
23
  ) {
24
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'alignment' does not exist on type '{ readonly options: any; }'.
24
+ // @ts-expect-error - TS2339 - Property 'alignment' does not exist on type '{ readonly options: any; }'.
25
25
  filteredWidgetInfo.alignment = alignment;
26
26
  }
27
27
 
28
28
  if (type === "transformer") {
29
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'graded' does not exist on type '{ readonly options: any; }'.
29
+ // @ts-expect-error - TS2339 - Property 'graded' does not exist on type '{ readonly options: any; }'.
30
30
  filteredWidgetInfo.graded = graded;
31
31
  }
32
32
 
33
33
  if (Widgets.supportsStaticMode(type)) {
34
- // @ts-expect-error [FEI-5003] - TS2339 - Property 'static' does not exist on type '{ readonly options: any; }'.
34
+ // @ts-expect-error - TS2339 - Property 'static' does not exist on type '{ readonly options: any; }'.
35
35
  filteredWidgetInfo.static = widgetInfo?.static ?? undefined;
36
36
  }
37
37
 
@@ -12,7 +12,7 @@ const splitDiff = function (diffEntries: any): any {
12
12
  _.each(values, (value, i) => {
13
13
  const isNewline = i > 0;
14
14
  if (isNewline) {
15
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[]' is not assignable to parameter of type 'never'.
15
+ // @ts-expect-error - TS2345 - Argument of type 'any[]' is not assignable to parameter of type 'never'.
16
16
  lines.push(currentLine);
17
17
  currentLine = [];
18
18
  }
@@ -22,7 +22,7 @@ const splitDiff = function (diffEntries: any): any {
22
22
  });
23
23
 
24
24
  if (currentLine.length) {
25
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'any[]' is not assignable to parameter of type 'never'.
25
+ // @ts-expect-error - TS2345 - Argument of type 'any[]' is not assignable to parameter of type 'never'.
26
26
  lines.push(currentLine);
27
27
  }
28
28
  return lines;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
1
2
  /**
2
3
  * A side by side diff view for Perseus exercise items
3
4
  * that do not have the standard question layout.
@@ -55,10 +56,10 @@ function getTitle(path: Path): string {
55
56
  const title: Array<string> = [];
56
57
  for (let i = 0; i < path.length; i++) {
57
58
  if (typeof path[i] === "number") {
58
- // @ts-expect-error [FEI-5003] - TS2365 - Operator '+' cannot be applied to types 'string | number' and 'number'.
59
+ // @ts-expect-error - TS2365 - Operator '+' cannot be applied to types 'string | number' and 'number'.
59
60
  title.push((path[i] + 1).toString() + ":");
60
61
  } else {
61
- // @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'string | number' is not assignable to parameter of type 'string'.
62
+ // @ts-expect-error - TS2345 - Argument of type 'string | number' is not assignable to parameter of type 'string'.
62
63
  title.push(path[i]);
63
64
  }
64
65
  }
@@ -163,11 +164,11 @@ class StructuredItemDiff extends React.Component<Props> {
163
164
  .mapTree(itemToTree(before), shape);
164
165
 
165
166
  buildMapper()
166
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
167
+ // @ts-expect-error - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
167
168
  .setContentMapper((c, _, p) => afterList.push([c, p]))
168
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
169
+ // @ts-expect-error - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
169
170
  .setHintMapper((c, _, p) => afterList.push([c, p]))
170
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
171
+ // @ts-expect-error - TS2322 - Type 'unknown' is not assignable to type 'never'. | TS2322 - Type 'Path' is not assignable to type 'never'.
171
172
  .setTagsMapper((c, _, p) => afterList.push([c, p]))
172
173
  .mapTree(itemToTree(after), shape);
173
174
 
@@ -203,7 +204,7 @@ class StructuredItemDiff extends React.Component<Props> {
203
204
  before = [[], path];
204
205
  }
205
206
  if (!after) {
206
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'Path[]' is not assignable to type 'undefined'.
207
+ // @ts-expect-error - TS2322 - Type 'Path[]' is not assignable to type 'undefined'.
207
208
  after = [[], path];
208
209
  }
209
210
 
@@ -216,9 +217,9 @@ class StructuredItemDiff extends React.Component<Props> {
216
217
  });
217
218
  }
218
219
  const afterTags: Array<string> = [];
219
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
220
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
220
221
  if (Array.isArray(after[0])) {
221
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
222
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
222
223
  after[0].forEach((tagId) => {
223
224
  if (typeof tagId === "string") {
224
225
  afterTags.push(tags.idToName(tagId));
@@ -251,13 +252,13 @@ class StructuredItemDiff extends React.Component<Props> {
251
252
  before = [buildEmptyItemTreeForShape(shapes.content), path];
252
253
  }
253
254
  if (!after) {
254
- // @ts-expect-error [FEI-5003] - TS2322 - Type 'any[]' is not assignable to type 'undefined'.
255
+ // @ts-expect-error - TS2322 - Type 'any[]' is not assignable to type 'undefined'.
255
256
  after = [buildEmptyItemTreeForShape(shapes.content), path];
256
257
  }
257
258
  return (
258
259
  <RendererDiff
259
260
  before={before[0] as any}
260
- // @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
261
+ // @ts-expect-error - TS2532 - Object is possibly 'undefined'.
261
262
  after={after[0] as any}
262
263
  title={currentTitle}
263
264
  showAlignmentOptions={false}
@@ -49,7 +49,7 @@ class ImageDiffSide extends React.Component<any> {
49
49
  return (
50
50
  <div key={index}>
51
51
  <div className={className}>
52
- {/* @ts-expect-error [FEI-5003] - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
52
+ {/* @ts-expect-error - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
53
53
  <SvgImage
54
54
  src={entry.value}
55
55
  title={entry.value}
@@ -227,7 +227,7 @@ class ImageWidgetDiff extends React.Component<any> {
227
227
  "image-removed": beforeSrc !== afterSrc,
228
228
  })}
229
229
  >
230
- {/* @ts-expect-error [FEI-5003] - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
230
+ {/* @ts-expect-error - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
231
231
  <SvgImage src={beforeSrc} title={beforeSrc} />
232
232
  </div>
233
233
  )}
@@ -241,7 +241,7 @@ class ImageWidgetDiff extends React.Component<any> {
241
241
  "image-added": beforeSrc !== afterSrc,
242
242
  })}
243
243
  >
244
- {/* @ts-expect-error [FEI-5003] - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
244
+ {/* @ts-expect-error - TS2741 - Property 'alt' is missing in type '{ src: any; title: any; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'. */}
245
245
  <SvgImage src={afterSrc} title={afterSrc} />
246
246
  </div>
247
247
  )}