Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmd committed Apr 27, 2019
1 parent a8b8448 commit 713578f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ type StateValues<T> = {

type StateValidity<T> = { readonly [A in keyof T]: Maybe<boolean> };

type StateErrors<T, E = string> = {
readonly [A in keyof T]?: E | string
};
type StateErrors<T, E = string> = { readonly [A in keyof T]?: E | string };

// Inputs

Expand Down
8 changes: 4 additions & 4 deletions test/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ function CustomErrorTypesWithStateErrors() {
colors?: string | I18nError;
}

const [formState, input] = useFormState<
FormFields,
FormFieldsErrors
>(initialState, {});
const [formState, input] = useFormState<FormFields, FormFieldsErrors>(
initialState,
{},
);

if (formState.errors.colors && typeof formState.errors.colors !== 'string') {
formState.errors.colors.en;
Expand Down

0 comments on commit 713578f

Please sign in to comment.