jsx-eslint/eslint-plugin-react
GitHub で見るNo corresponding propTypes declaration when export type with typescript.
Open
#3,253 opened on 2022年3月22日
bughelp wantedtypescript
Repository metrics
- Stars
- (8,630 stars)
- PR merge metrics
- (30d に merged PR はありません)
説明
// Will get error: defaultProp "data" has no corresponding propTypes declaration
// from react/default-props-match-prop-types
export type TableProps = {
data?: any;
};
const defaultProps = {
data: null,
};
const Table: FC<TableProps> = ({ data }) => null;
// working well
type TableProps = {
data?: any;
};
const defaultProps = {
data: null,
};
const Table: FC<TableProps> = ({ data }) => null;