Add React.SFC type for Form.create return value #8672 (#8675)

* Add React.SFC type for Form.create return value

* Restore indented.Fixed #8672

* Commit for lint

* Commit for lint
This commit is contained in:
徐坤龙 2017-12-22 16:05:06 +08:00 committed by valleykid
parent 24f0359e2d
commit b06ea2404f

View File

@ -70,7 +70,7 @@ export type GetFieldDecoratorOptions = {
exclusive?: boolean;
/** Normalize value to form component */
normalize?: (value: any, prevValue: any, allValues: any) => any;
/** Whether stop validate on first rule of error for this field. */
/** Whether stop validate on first rule of error for this field. */
validateFirst?: boolean;
};
@ -117,7 +117,7 @@ export type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>;
export interface ComponentDecorator<TOwnProps> {
<P extends FormComponentProps>(
component: React.ComponentClass<P>,
component: React.ComponentClass<P> | React.SFC<P>,
): React.ComponentClass<Omit<P, keyof FormComponentProps> & TOwnProps>;
}