mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
* Support Partial<> on setState now that TS 2.1 is out * Update readme to reflect setState being typed correctly * Switch setState to Pick * Restore cloneELement portion of readme * Use Pick<> | S for setState due to cast issue * state and props should be readonly * Fix nit + document why we * Add typescript compiler header * Update to properly order headers * Update readme to reflect 2.1.5 fixing stPick * Update readme now that 2.1.5 is out * All that depend on react now require 2.1 * Fix definition that fails due to readonly state
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
// Type definitions for react-jsonschema-form 0.38.1
|
|
// Project: https://github.com/mozilla-services/react-jsonschema-form
|
|
// Definitions by: Dan Fox <https://github.com/iamdanfox>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.1
|
|
|
|
declare module "react-jsonschema-form" {
|
|
import * as React from "react";
|
|
|
|
export interface FormProps {
|
|
schema: {};
|
|
uiSchema?: {};
|
|
formData?: any;
|
|
widgets?: {};
|
|
fields?: {};
|
|
noValidate?: boolean;
|
|
showErrorList?: boolean;
|
|
validate?: (formData: any, errors: any) => any;
|
|
onChange?: (e: IChangeEvent) => any;
|
|
onError?: (e: any) => any;
|
|
onSubmit?: (e: any) => any;
|
|
liveValidate?: boolean;
|
|
safeRenderCompletion?: boolean;
|
|
}
|
|
|
|
export interface IChangeEvent {
|
|
edit: boolean;
|
|
formData: any;
|
|
errors: any[];
|
|
errorSchema: any;
|
|
idSchema: any;
|
|
status: string;
|
|
}
|
|
|
|
export default class Form extends React.Component<FormProps, any> {}
|
|
}
|