Skip to content

Add OnSubmit and OnError callback to index.d.ts#15

Open
Mikosko wants to merge 1 commit intomasterfrom
Mikosko-patch-2
Open

Add OnSubmit and OnError callback to index.d.ts#15
Mikosko wants to merge 1 commit intomasterfrom
Mikosko-patch-2

Conversation

@Mikosko
Copy link
Contributor

@Mikosko Mikosko commented May 11, 2017

No description provided.

export class Field extends React.Component<FieldProps, any> {
}

export type OnSubmitCallback = (s: {name: string, values: {[key: string]: any}}) => void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be simplified with values: object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it better?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can imagine it as type object = {[key: string]: any}}, therefore yes, it's better 'cause it's former and shorter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants