/* tslint:disable: no-shadowed-variable */ import { Mutator } from 'final-form'; import * as React from 'react'; import { Field, Form } from 'react-final-form'; const noop = () => {}; // missing required props const C1 = () => { // $ExpectError return
; }; // provided required props const C2 = () => ; const onSubmit = async (values: any) => { // tslint:disable-next-line no-console console.log(values); }; // basic function basic() { return ( )} ); } // simple function simple() { return ( )} ); } function simpleSubscription() { return ( )} ); } const setValue: Mutator = ([name, newValue], state, { changeValue }) => { changeValue(state, name, value => newValue); }; function mutated() { return ( )} ); } const typedOnSubmit = (values: { firstName: string }) => { // tslint:disable-next-line no-console console.log(values); }; // with typed form data and field function withTypedFormData() { return ( )} ); }