mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Fix react-rte tests (#43588)
They check whether a method is defined on props, but the props type doesn't make the method optional. Typescript now catches this error, so I made the method optional.
This commit is contained in:
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import RichTextEditor, { EditorValue } from "react-rte";
|
||||
|
||||
interface Props {
|
||||
onChange: (val: string) => void;
|
||||
onChange?: (val: string) => void;
|
||||
}
|
||||
|
||||
class MyStatefulEditor extends React.Component<Props, any> {
|
||||
|
||||
Reference in New Issue
Block a user